Trending November 2023 # Codeigniter Active Record: Insert, Select, Update, Delete # Suggested December 2023 # Top 14 Popular

You are reading the article Codeigniter Active Record: Insert, Select, Update, Delete updated in November 2023 on the website Hatcungthantuong.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested December 2023 Codeigniter Active Record: Insert, Select, Update, Delete

Data is the bloodline of most applications. The data needs to be stored in such a way that it can be further analyzed to provide insights and facilitate business decisions. The data is usually stored in the database. Among the chief concerns when interacting with the database is security, ease of access and database vendor specific implementations of Structured Query Language (SQL).

Active record is a design pattern that makes it easy to interact with the database in ease, secure and eloquent way.

Insert, update and delete records with simple method chains of active record

Submits the user input in a secure way using parameters

Allows you to work with multiple database engines such as MySQL, SQL Server, etc. without rewriting the application code

CodeIgniter uses drivers specific for each database engine in the background.

In this tutorial, you will learn:

How to use Active Record: Example

In this tutorial, we will discuss the tutorial database. We will have two tables, one with orders the other with details.

This tutorial assumes you have MySQL database installed up and running.

Run the following scripts to create tutorial database:

CREATE SCHEMA ci_active_record; USE ci_active_record; CREATE TABLE `order_details` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` int(11) DEFAULT NULL, `item` varchar(245) DEFAULT NULL, `quantity` int(11) DEFAULT '0', `price` decimal(10,2) DEFAULT '0.00', `sub_total` decimal(10,2) DEFAULT '0.00', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT = 1; CREATE TABLE `orders` ( `id` int(11) NOT NULL AUTO_INCREMENT, `date` timestamp NULL DEFAULT NULL, `customer_name` varchar(245) DEFAULT NULL, `customer_address` varchar(245) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT = 1;

The above code creates a database named ci_active_record and creates two tables namely orders and order_details. The relationship between the two tables is defined by the column id in orders and order_id in order_details table.

CodeIgniter Database Configuration

We will now configure our application to be able to communicate with this database.

Open database configuration file located in application/config/database.php

locate the following lines in the configuration file

Update the above code to the following

Note: you will need to replace the username and password to the ones that match your configuration of MySQL.

Step 1) Open the following file application/config/autoload.php

Step 2) Locate the $autoload array key libraries and load the database library as shown below

$autoload['libraries'] = array('database');

HERE,

CodeIgniter Insert Active Record

For testing purposes, we will create a controller and defined routes that we will be using to interact with our application via active record.

Create a new file application/controllers/ActiveRecordController.php

Add the following code to ActiveRecordController.php

<?php defined('BASEPATH') OR exit('No direct script access allowed'); class ActiveRecordController extends CI_Controller { public function store_order(){ $data = [ ]; echo 'order has successfully been created'; } }

HERE,

$data = […] defines an array variable data that uses database table names as array keys and assigns values to them

Now that we have successfully created the controller method for active record, we will now need to create a route that we will call to execute the controller method.

Now open chúng tôi in application/config/routes.php

add the following line to the routes

$route['ar/insert'] = 'activerecordcontroller/store_order';

HERE,

We define a route ar/insert that calls the store_order of the ActiveRecordController.

Let’s now start the web server to test our method.

Run the following command to start the built-in server for PHP

cd C:Sitesci-app php -S localhost:3000

HERE,

The above command browser to the command line and start the built-in server at port 3000.

You will get the following results

order has successfully been created

Open the MySQL tutorial database and check the orders table

You will able to newly created row as shown in the image below

CodeIgniter Select Active Record

In this section, we will see how to read the records that we have in the database and display them in the web browser as an unordered list

Add the following method to the ActiveRecordController

public function index() { } }

HERE,

Before you load the following URL, you can load a couple more records to the database.

Lets now define a route for the SELECT query

Open application/config/routes.php table

Add the following route

$route['ar'] = 'activerecordcontroller';

HERE,

The route ar points to the index method of ActiveRecordController class. This is by default that’s why we didn’t specify the index method as you did for the route that inserts records

You should be able to see results which is very much similar to the following in your web browser

CodeIgniter Update Active Record

In this section, we will tal about how to use the active record to update the database. Let’s say we want to update the customer name Joe Thomas to Joe.

Add the following method to ActiveRecordController class

public function update_order() { $data = [ ]; echo 'order has successfully been updated'; }

HERE,

$data = […] defines the fields and values that we wish to update in the database table

The above code will produce the following SQL statement

UPDATE orders SET customer_name = 'Joe' WHERE id = 1;

Let’s now update the chúng tôi application/config/routes.php

Add the following route

$route['ar/update'] = 'activerecordcontroller/update_order';

Save the changes

Load the following URL in the web browser

Let’s now display the database records and see if the changes have been affected.

As you can see from the above-given Image, the first record has been updated from Joe Thomas to Joe.

CodeIgniter Delete Active Record

We will now delete a record from the database. We will delete the record with the id of 3.

Add the following method to the ActiveRecordController

public function delete_order() { echo 'order has successfully been deleted'; }

HERE,

To execute the above code, load the following URL in our web browser

Summary

In this tutorial, you have learned how to work with an active record to insert, update, delete and select records from the database. We worked with static values to create records, update and delete. In the next tutorial, we will create a user interface that the user can use to create records dynamically in the database.

You're reading Codeigniter Active Record: Insert, Select, Update, Delete

How To Insert, Move Or Delete Page Breaks In An Excel Worksheet

Microsoft Excel worksheets are beneficial in keeping data organized and fluid. It’s straightforward to move or shift things around in a worksheet, especially if you know how to manipulate data using Excel. Page Breaks refer to the separators that mark the division of each page when printing.

When you use Excel, the page breaks are inserted automatically depending on the paper size, scale, and margin options. Well, if in case the default settings won’t work with your requirements or preferences, then you can opt to insert the page breaks manually. This is very helpful, especially if you are printing tables and need to know the exact number of pages needed or where to separate documents.

How to Insert, Move or Delete Page Breaks in an Excel Worksheet

Here are the steps to follow when you want to insert, move, or delete page breaks in a Microsoft Excel worksheet.

Insert a Page Break in Excel

Move a Page Break in Excel

Delete a Page Break in Excel

If you do anything that has accidentally changed what you do not need, press Ctrl + Z to reverse.

1] Insert a Page Break in Excel

Choose the column or row you want to insert the page break.

When you have inserted the page break on the desired location but would still want to change or delete the page breaks that were set u.

Under Page Break Preview, you can now drag each page break freely.

Drag the page break right onto the preview edge if you want to change or delete chosen page breaks.

Here are the steps to follow if you want to create a vertical page break:

Place the cell pointer to highlight Row 1 to the right of the column where you would want to place the page break.

 Go to the Excel menu and then choose the Insert Page Break option.

You will then see a vertical line on your worksheet which indicates where exactly the page will break.

If you want to make a horizontal page break, here’s what you do:

Place the cell pointer in Column A or right below the row on which you want to insert the page break.

Go to the Excel menu, and then select Insert Page Break. Y

ou will see a horizontal line across the worksheet that indicates where the page will break.

When you check on the Page Break Preview option under the status bar, you will see the actual result or where the page breaks would appear once the document is printed out. This will also show the changes you made to the document.

Read: How to customize the Quick Access Toolbar in Excel to make it work for you.

2] Move a Page Break in Excel

Open the worksheet you wish to modify.

To move a Page Break, just drag it to a new location.

Select the row or column of the page break you intend to delete.

Conclusion

I hope the post was easy to follow, and you were able to insert, move or delete Page Breaks in an Excel Worksheet.

What is the Page Break shortcut in Microsoft Office Excel?

You can view Page Break Preview (Alt + WI). Press (Alt + WN) to revert to Normal view. If you want to add a page break, select the row quickly and press Alt + P + B + I to insert the page break. Depending on the layout, you can add page breaks in both vertical and horizontal modes.

Why is page break used?

The purpose of a page break is to end a page without filling it with text. You should insert a page break after the date on your title page to separate it from the signature page.

The Physics Of Usain Bolt’s Record

In 2009, at the World Championships in Berlin, Usain Bolt beat his own previous world record by 0.11 seconds, running a 9.58-second 100-meter dash. The record is getting more and more difficult to break, as it’s history shows (and as we may be nearing the limit of human speed), making each new record-breaking performance intriguing to physicists. A study, published today in the European Journal of Physics, examines the physics of Bolt’s historic feat.

Tailwind: 0.9 m/s (~2 mph)

Using approximate race-day conditions (temperature, altitude, Bolt’s surface area) along with measurements from the race’s laser velocity guard device (which measured Bolt’s position and speed every 0.1 second), the researchers were able to calculate the immense amount of drag that Bolt overcame. Bolt used 81.58 kJ of energy during the race, but 92.21% of that energy was absorbed by the drag! Additionally, Bolt’s maximum power output was 2619.5 watts after only 0.89 seconds of the race–more than enough energy to power a large vacuum cleaner (or the Pirate Bay).

Bolt Takes Off

At the 2012 London Olympics

The researchers’ equations mapped so perfectly onto Bolt’s actual performance that they were also able to make predictions based on hypotheticals: if there had been no tailwind at Berlin, Bolt would’ve ran a 9.68; with a stronger tailwind of 2 m/s, he would’ve ran a 9.46 (which would’ve actually beaten the purported limit to how fast a human can run); and obviously, “if Bolt were to run on a planet with a much less dense atmosphere, he could achieve records of fantastic proportions,” the lead researcher says in a press release. However, the equations won’t work for greater distance sprints, for their calculations assume that in a 100m race the runner is able to maintain “a constant horizontal force,” as opposed to, say, a 400m race in which the force gradually tapers off due to extended exertion. It might take extraterrestrial conditions for anyone to beat Bolt’s extraordinary feat anytime soon–he’s nearly superhuman.

Bolt Defeating Drag

At the 2009 World Championships in Berlin

Mysql Select Statement With Examples

What is SELECT query in MySQL?

SELECT QUERY is used to fetch the data from the MySQL database. Databases store data for later retrieval. The purpose of MySQL Select is to return from the database tables, one or more rows that match a given criteria. Select query can be used in scripting language like PHP, Ruby, or you can execute it via the command prompt.

SQL SELECT statement syntax

It is the most frequently used SQL command and has the following general syntax

HERE

SELECT is the SQL keyword that lets the database know that you want to retrieve data.

FROM tableName is mandatory and must contain at least one table, multiple tables must be separated using commas or joined using the JOIN keyword.

WHERE condition is optional, it can be used to specify criteria in the result set returned from the query.

GROUP BY is used to put together records that have the same field values.

HAVING condition is used to specify criteria when working using the GROUP BY keyword.

ORDER BY is used to specify the sort order of the result set.

*

The Star symbol is used to select all the columns in table. An example of a simple SELECT statement looks like the one shown below.

SELECT * FROM `members`;

The above statement selects all the fields from the members table. The semi-colon is a statement terminate. It’s not mandatory but is considered a good practice to end your statements like that.

Practical examples

You can learn to import the .sql file into MySQL WorkBench

The Examples are performed on the following two tables

Table 1: members table

membership_ number full_names gender date_of_ birth physical_ address postal_ address contct_ number email

1 Janet Jones Female 21-07-1980 First Street Plot No 4 Private Bag 0759 253 542 [email protected]

2 Janet Smith Jones Female 23-06-1980 Melrose 123 NULL NULL

3 Robert Phil Male 12-07-1989 3rd Street 34 NULL 12345

4 Gloria Williams Female 14-02-1984 2nd Street 23 NULL NULL NULL

Table 2: movies table

movie_id title director year_released category_id

1 Pirates of the Caribean 4 Rob Marshall 2011 1

2 Forgetting Sarah Marshal Nicholas Stoller 2008 2

3 X-Men NULL 2008 NULL

4 Code Name Black Edgar Jimz 2010 NULL

5 Daddy’s Little Girls NULL 2007 8

6 Angels and Demons NULL 2007 6

7 Davinci Code NULL 2007 6

9 Honey mooners John Schultz 2005 8

16 67% Guilty NULL 2012 NULL

Getting members listing

Let’s suppose that we want to get a list of all the registered library members from our database, we would use the script shown below to do that.

SELECT * FROM `members`;

Executing the above script in MySQL workbench produces the following results.

membership_ number full_names gender date_of_ birth physical_ address postal_ address contct_ number email

1 Janet Jones Female 21-07-1980 First Street Plot No 4 Private Bag 0759 253 542 [email protected]

2 Janet Smith Jones Female 23-06-1980 Melrose 123 NULL NULL

3 Robert Phil Male 12-07-1989 3rd Street 34 NULL 12345

4 Gloria Williams Female 14-02-1984 2nd Street 23 NULL NULL NULL

Our above query has returned all the rows and columns from the members table.

Let’s say we are only interested in getting only the full_names, gender, physical_address and email fields only. The following script would help us to achieve this.

SELECT `full_names`,`gender`,`physical_address`, `email` FROM `members`;

Executing the above script in MySQL workbench produces the following results.

full_names gender physical_address email

Janet Jones Female First Street Plot No 4 [email protected]

Janet Smith Jones Female Melrose 123

Robert Phil Male 3rd Street 34

Gloria Williams Female 2nd Street 23 NULL

Getting movies listing

Remember in our above discussion that we mention expressions been used in SELECT statements. Let’s say we want to get a list of movie from our database. We want to have the movie title and the name of the movie director in one field. The name of the movie director should be in brackets. We also want to get the year that the movie was released. The following script helps us do that.

SELECT Concat(`title`, ' (', `director`, ')') , `year_released` FROM `movies`;

HERE

The Concat () MySQL function is used join the columns values together.

The line “Concat (`title`, ‘ (‘, `director`, ‘)’) gets the title, adds an opening bracket followed by the name of the director then adds the closing bracket.

String portions are separated using commas in the Concat () function.

Executing the above script in MySQL workbench produces the following result set.

Concat(`title`, ‘ (‘, `director`, ‘)’) year_released

Pirates of the Caribean 4 ( Rob Marshall) 2011

Forgetting Sarah Marshal (Nicholas Stoller) 2008

NULL 2008

Code Name Black (Edgar Jimz) 2010

NULL 2007

NULL 2007

NULL 2007

Honey mooners (John Schultz) 2005

NULL 2012

Alias field names

The above example returned the Concatenation code as the field name for our results. Suppose we want to use a more descriptive field name in our result set. We would use the column alias name to achieve that. The following is the basic syntax for the column alias name

HERE

“[AS]” is the optional keyword before the alias name that denotes the expression, value or field name will be returned as.

“`alias_name`” is the alias name that we want to return in our result set as the field name.

The above query with a more meaningful column name

SELECT Concat(`title`, ' (', `director`, ')') AS 'Concat', `year_released` FROM `movies`;

We get the following result

Concat year_released

Pirates of the Caribean 4 ( Rob Marshall) 2011

Forgetting Sarah Marshal (Nicholas Stoller) 2008

NULL 2008

Code Name Black (Edgar Jimz) 2010

NULL 2007

NULL 2007

NULL 2007

Honey mooners (John Schultz) 2005

NULL 2012

Getting members listing showing the year of birth

Suppose we want to get a list of all the members showing the membership number, full names and year of birth, we can use the LEFT string function to extract the year of birth from the date of birth field. The script shown below helps us to do that.

SELECT `membership_number`,`full_names`,LEFT(`date_of_birth`,4) AS `year_of_birth` FROM members;

HERE

“LEFT(`date_of_birth`,4)” the LEFT string function accepts the date of birth as the parameter and only returns 4 characters from the left.

“AS `year_of_birth`” is the column alias name that will be returned in our results. Note the AS keyword is optional, you can leave it out and the query will still work.

Executing the above query in MySQL workbench against the myflixdb gives us the results shown below.

membership_number full_names year_of_birth

1 Janet Jones 1980

2 Janet Smith Jones 1980

3 Robert Phil 1989

4 Gloria Williams 1984

SQL using MySQL Workbench

We are now going to use MySQL workbench to generate the script that will display all the field names from our categories table.

2. MySQL workbench will automatically create a SQL query and paste in the editor.

3. Query Results will be show

Notice that we didn’t write the SELECT statement ourselves. MySQL workbench generated it for us.

Why use the SELECT SQL command when we have MySQL Workbench?

Now, you might be thinking why learn the SQL SELECT command to query data from the database when you can simply use a tool such as MySQL workbench’s to get the same results without knowledge of the SQL language. Of course that is possible, but learning how to use the SELECT command gives you more flexibility and control over your SQL SELECT statements.

MySQL workbench falls in the category of “Query by Example” QBE tools. It’s intended to help generate SQL statements faster to increase the user productivity.

Learning the SQL SELECT command can enable you to create complex queries that cannot be easily generated using Query by Example utilities such as MySQL workbench.

To improve productivity you can generate the code using MySQL workbench then customize it to meet your requirements. This can only happen if you understand how the SQL statements work!

Summary

The SQL SELECT keyword is used to query data from the database and it’s the most commonly used command.

The simplest form has the syntax “SELECT * FROM tableName;”

Expressions can also be used in the select statement . Example “SELECT quantity + price FROM Sales”

The SQL SELECT command can also have other optional parameters such as WHERE, GROUP BY, HAVING, ORDER BY. They will be discussed later.

MySQL workbench can help develop SQL statements, execute them and produce the output result in the same window.

How To Record Inventory Vouchers In Tallyprime

 PDF

Inventory Management in TallyPrime allows you to keep track of your inventory from placing an order for goods with your supplier to getting them delivered. You can keep track of the goods at all stages using inventory vouchers in TallyPrime. You can send a receipt note to your supplier once you receive the goods at your location. Moreover, you can record the transfer of materials from one location to another and have visibility of what goods and quantity are available with you at any point in time. You have features that will help you place an order for goods with your supplier when the stock is below the limit that is defined by you.

Inventory vouchers in TallyPrime allow you to track the items that you have sent to your customers and send them delivery notes with the goods sent. Record job works vouchers and manufacturing journal that will give you a clear view of what quantity of items and what items were used for manufacturing. You also have the option to record the finished good, co-products, by-products, and scrap that are generated during manufacturing.

Moreover, if you have opted for Edit Log, then you can view Edit Log for all transactions including the Inventory vouchers in TallyPrime.

Multiple stock items creation in TallyPrime is a simple facility using which you can create multiple stock items on a single screen.

Select All Items – If you need to assign different stock groups for each stock item that you are creating.

Select an existing stock group – If you are creating multiple stock items under an existing stock group.

Note: You can add any number of sub-groups to an already created or selected group. The sub-groups inherit the characteristics of the parent groups.

As always, press Ctrl+A to save.

You can use these stock items in transactions, including the inventory vouchers in TallyPrime.

You may want to delete the unused stock items that you do not trade with anymore.

Press Spacebar to select the stock items to be deleted.

The selected stock items will be deleted.

Stock Journal in TallyPrime is one of the inventory vouchers in TallyPrime and helps you keep track of all your stock adjustments. When you have to transfer stock from one location to another, keep track of additional cost or expenses incurred due to transfer of goods, keep track of wastage of goods or need to update the right quantity of goods, you can do all of these using a Stock Journal voucher.

The need for recording inventory vouchers for stock adjustment may be due to the following reasons:

Inter-Location Transfer: This is useful to transfer the goods from one location to another. The quantity of stock remains the same, but the location changes.

Additional cost/expenses involved in the Transfer of goods: You can also account the additional cost incurred in connection of transfer of materials from one location to another.

Accounting for wastage of stock or shortage of stock: There may be a shortage or wastage of stock items, the quantity may have got changes. In such cases, you have to enter a stock journal to account for the increase or decrease in the Stock Item.

You can record inventory vouchers in TallyPrime for manufacturing processes, if you are involved in the manufacturing process in which raw materials are consumed and finished goods are produced, then you can create a manufacturing Journal Voucher.

Press F2 (Date) and change the date, if needed.

Enter the reference number in Reference No. field, if any.

Under Source (Consumption):

Select the Godown from which goods are getting transferred.

Note: The Location address can be printed in a stock journal voucher.

The Amount will get calculated automatically.

Under Destination (Production):

Select the Godown to which goods are being transferred.

The rate and amount will be displayed automatically.

Note: You can have a different Rate for Source (Consumption) and for Destination (Production) column for the same stock item.

If you do not see the Additional Cost Details screen:

Set Track Additional Costs for Purchases to Yes.

Provide the details of additional cost.

Type of Cost: select the ledger created for transportation cost, packing cost, or other, applicable to your business.

%-age: enter the percentage with respect to the Amount of the stock items.

What you see on the screen can vary based on your choices. Press

F12 (Configure) to change the options.

Provide Narration, if needed.

Press Ctrl+A to save, as always.

Options

Description

Skip the Date field during voucher creation

Provide Reference No. and Date

Enable this option to add the voucher reference field in Stock Journal.

Provide Additional Descriptions for Stock Items

You can Provide the additional description for the stock Item in the transactions

Show message on negative Stock Balance

By default, a warning message is displayed for negative stock balance. If you set it to No, the error message will not be displayed.

Use Expired Batches for Stock items

Show Batches with Zero Quantity

It will display the zero quantity batches for the stock item

Show Balance as on Voucher Date

Skip Co-product/By-Product/Scrap details

When the option Skip Co-Product/By-Product/Scrap Stock Item is set to Yes, and while recording a manufacturing journal for a stock item for which the BoM is created by capturing the details of Co-Products/ By-Products /Scrap; then the configuration is ignored and the details of Co-Products/ By-Products /Scrap are captured. You can also modify the details in the Co-Products/By-Products/Scrap section.

(For Manufacturing Journals only)

Show Compound Unit based on Rate

Enable this option to show the compound unit of item based on the unit provided in the Rate Per column

Show details of Compound Unit

Enable this option to display details of compound unit in the Quantity field. If Kgs is typed in the Rate Per field, then the Quantity field will display as 12 Kgs.250 gms.

While you already have some inventory vouchers in TallyPrime, you may have a particular requirement for which you can create voucher class. Stock Journal voucher classes allow you to handle transfers from one location to another, for companies having Multi-Location Inventory and at least two location.

To know more, refer to the section Stock Journal Voucher Class in the Voucher Types in TallyPrime topic.

In your business, you may be transferring materials from one location to another for which you can record inventory vouchers in TallyPrime to keep your books updated.

Press F2 (Date) and change the date, if needed.

Provide the details of the goods at the source.

Source (Consumption): select the items and the location from where you are transferring the goods.

The Rate and Amount field gets prefilled if you have specified it for the goods selected.

Provide the details of the goods at the destination.

Destination (Production): select the items and the location to where the goods should be sent.

As always, press Ctrl+A to save.

It is important to keep track of the goods that you have sent to your customers or received from vendors. It will be a document of proof between you and your customer or vendor that goods are delivered as per order and accepted in good condition to avoid discrepancies during payment. You can record the order information like item details, quantity, delivery address, the location from where the item is being sent, and so on.

Select Yes or press Y to proceed.

Press F2 (Date) and change the date, if needed.

 Party A/C name: select the party to whom the goods have to be delivered and provide the party and order details, as applicable.

Provide the details of the items being sent for delivery.

Select the items.

Provide Narration, if needed.

As always, press Ctrl+A to save.

Options

Description

Provide Buyer details

Enable this option to enter buyer details in the Party Details screen

Provide Dispatch, Order and Export details

Select common Ledger Account for Item Allocation

Enable this option to allocate all the items selected in the invoice to a common sales or purchase account. If each item in the invoice has to be allocated to different ledger accounts, then this option should be set to No.

Provide Additional Descriptions for Ledgers

Enable this option to specify the description for each Ledger selected in the Accounting Invoice entries.

Provide Additional Descriptions for Stock Items

Enable this option to specify description for each item selected in the invoice.

Show message on negative Stock Balance

Enable this option to warn if the item selected reaches a negative balance.

Use Expired Batches for Stock items

Select Cost Center/Class

Provide Reference No. and Date

Enable this option to add the voucher reference field in Stock Journal also.

Provide Accounting Allocations in Order/Delivery Note

Skip the Date field during voucher creation

Show Turnover from selected Party A/c

Enable this option to view the turnover achieved till date with a particular customer.

Show Current Balance of Ledgers

Show Balances as on Voucher date

Show Compound Unit based on Rate

Enable this option to show the compound unit of item based on the unit provided in the Rate Per column.

Show details of Compound Unit

Enable this option to display full details of compound unit in the Quantity field. If Kgs is typed in Rate Per field, then the Quantity field will display as 12 Kgs.250 gms.

Provide Marks or Container No

Enable this option to specify Marks for every item selected in the invoice.

Modify MRP in Vouchers

Calculate Tax on Current Subtotal

(Else Calculations are on inventory total only)

Enable this option to calculate tax on the current subtotal value and not on inventory total value.

Modify Tax Rate details of GST

Enable this option to modify tax details for GST.

Modify Tax Rate details for VAT

Enable this option to modify tax details for VAT.

Provide Excise details

Enable this option to provide the Excise details.

A Rejection In is one of the inventory vouchers in TallyPrime and is used when goods are rejected or returned by the customer. The transaction is recorded after raising a delivery note, but before raising a sales voucher.

To know more, Refer to the Record Rejections In against Delivery Note section in the Record Sales of Goods Dispatched topics.

When you purchase goods from your supplier, and the supplier sends these goods to you, you may want to acknowledge that you have received the goods that you had requested. To account for this, you can record a receipt voucher in TallyPrime. The receipt note includes your supplier information, goods that you have received, amount, and so on. Receipt Note voucher keeps track of receipt of goods at your location.

Select Yes or press Y to proceed.

Provide the voucher details.

Press F2 and change the date if needed.

Enter the Reference No. and Date.

Provide the details of Party and the respective order.

Party A/c name: select the party from whom you have received the goods and the respective purchase ledger.

The Party Details screen appears.

Enter the required information about the party.

Configure to provide supplier, receipt, order, and import details.

Press F12 (Configure).

Provide Supplier details: Yes.

The Stock Item Allocations screen appears,

Note: A Receipt Note with Tracking No. marked as Not Applicable will be an inventory document, affecting only the inventory values. This will not affect the accounts. A purchase voucher with Tracking No. marked as Not Applicable will update the accounts without increasing the stock. The Purchase Bills Pending list is generated as Bills Recd. but Goods not Recd.

Select the items and include the item details like Quantity, Rate, and any specific location, if applicable.

As always, you can use Ctrl+A to save.

Options

Description

Provide Supplier details

Enable this option to enter supplier details in the Party Details screen

Provide Receipt, Order and Import details

Select common Ledger Account for Item Allocation

Enable this option to allocate all the items selected in the invoice to a common sales or purchase account. If each item in the invoice has to be allocated to different ledger accounts, then this option should be set to No.

Provide Additional Descriptions for Ledgers

Enable this option to specify the description for each Ledger selected in the Accounting Invoice entries.

Provide Additional Descriptions for Stock Items

Enable this option to specify description for each item selected in the invoice.

Show message on negative Stock Balance

Enable this option to warn if the item selected reaches a negative balance.

Use Expired Batches for Stock items

Select Cost Center/Class

Provide Reference No. and Date

Enable this option to add the voucher reference field in Stock Journal also.

Provide Accounting Allocations in Order/Receipt Note

Skip the Date field during voucher creation

Show Turnover from selected Party A/c

Enable this option to view the turnover achieved till date with a particular customer.

Show Current Balance of Ledgers

Show Balances as on Voucher date

Show Compound Unit based on Rate

Enable this option to show the compound unit of item based on the unit provided in the Rate Per column.

Show details of Compound Unit

Enable this option to display full details of compound unit in the Quantity field. If Kgs is typed in the Rate Per field, the Quantity field will display as12 Kgs.250 gms.

Provide Marks or Container No

Enable this option to specify Marks for every item selected in the invoice.

Modify MRP in Vouchers

Calculate Tax on Current Subtotal

(Else Calculations are on inventory total only)

Enable this option to calculate tax on the current subtotal value and not on inventory total value.

Modify Tax Rate details of GST

Enable this option to modify tax details for GST.

Modify Tax Rate details for VAT

Enable this option to modify tax details for VAT.

Provide Excise details

Enable this option to provide the Excise details.

The Rejections Out Voucher records goods that are rejected and returned to a supplier.

When there are differences in the actual stock available at your location and the stock that is displayed in your company books, you can record a Physical Stock voucher. The physical stock voucher is among the inventory vouchers in TallyPrime and recording it will reflect the stock that is actually available for use or sale for your business.

Press F2 to change the stock taking date.

Provide the details of stock items.

Batch details will appear only if, Batch wise details are activated in the Stock Item Master screen .

Provide Narration, if needed.

As always, press Ctrl+A to save.

Options

Description

Skip the Date field during voucher creation

Provide Additional Descriptions for Stock Items

Provide the additional description for the stock Item in the transactions.

When you receive the raw material from your customers for job works, you can keep track of the goods received using Material In voucher.

To know more, refer to the Receipt of Material Towards a Job Order section in the Record Job Work In Order Transactions in TallyPrime topic.

Select Yes or press Y to proceed.

Provide the details related to the party.

The Party Details screen appears.

Select the required Order No(s) and provide the other details.

Press Ctrl+A to save.

Select the appropriate location in Source Location field, based on the type of Job Order.

If the Job Worker is receiving the raw material from the principal manufacturer, then the Source Location should be set to Not Applicable.

If the Principal Manufacturer is receiving the finished goods from the Job Worker, then then Location enabled with Our Stock with Third Party should be selected for Consumption Location.

The Source Location appears as the Consumption Location when the Principal Manufacturer receives the finished goods from the Job Worker, using the:

Location enabled with Our Stock with Third Party

Material in voucher type configured to Allow Consumption

The Stock Item Allocations screen appears.

Provide the stock item allocation details.

Consider as Primary Item: Yes, if the selected item is the primary item for which the consumption has to take place.

Select the required BoM Name.

This option will be skipped when Consider as Primary Item is set to Yes.

Select the Location.

The Amount gets automatically calculated.

Note: You can set the stock item either as Primary Item or Scrap. For the location selected in the Stock Item Allocation screen, ensure the options Our Stock with Third Party and Third Party Stock with us are set to No.

Provide Narration, if needed.

As always, press Ctrl+A to save.

Options

Description

Provide Party details

Enable this option to enter party details in the Party Details screen.

Provide Order and Export/Import details

Provide Reference No. and Date

Enable this option to add the Voucher Reference field in Stock Journal also.

Provide Additional Descriptions for Ledgers

Enable this option to specify the description for each Ledger selected in the Accounting Invoice entries.

Provide Additional Descriptions for Stock Items

Enable this option to specify description for each item selected in the invoice.

Show message on negative Stock Balance

By default, a warning message is displayed for negative stock balance. If you set it to No, then the error message will not be displayed

Use Expired Batches for Stock items

Show batches with Zero Quantity

It will display the zero quantity batches for the stock item.

Skip the Date field during voucher creation

Show Current Balances of Ledgers

Show Balances as on Voucher date

Show Compound Unit based on Rate

Enable this option to show the compound unit of item based on the unit provided in the Rate Per column.

Show details of Compound Unit

Enable this option to display details of compound unit in the Quantity field. If Kgs is typed in the Rate Per field, the Quantity field will display as12 Kgs.250 gms.

Provide Marks of Container No.

Enable this option to specify Marks for every item selected in the invoice.

When you send the raw material to your customers for job works, you can keep track of the goods sent using Material Out voucher.

Select Yes or press Y to proceed.

Provide the details related to the supplier.

The Party Details screen appears.

Select the required Order No(s) and provide the other details. 

Press Ctrl+A to save.

Select the appropriate location in Destination Location field, based on the type of Job Order.

If the Job Worker is receiving the raw material from the principal manufacturer, then the Destination Location should be set to Not Applicable.

If the Principal Manufacturer is receiving the finished goods from the Job Worker, then the Location enabled with Our Stock with Third Party should be selected for Consumption Location.

If the Job Worker is for issuing the finished goods to the principal company, then the Destination Location should be set to Not Applicable.

If the principal company is issuing the raw material to the Job Worker, then the Location enabled with Our Stock with Third Party should be selected for Destination Location.

The Stock Item Allocations screen appears.

Provide the stock item allocation details.

Select the Location.

The Amount gets calculated automatically.

Note: The Component of field will automatically display the Primary Item of the selected component.

As in other transactions, press Ctrl+A to save.

Options

Description

Provide Party details

Enable this option to enter party details in the Party Details screen.

Provide Order and Export/Import details

Provide Reference No. and Date

Enable this option to add the voucher reference field in Stock Journal also.

Provide Additional Descriptions for Ledgers

Enable this option to specify the description for each Ledger selected in the Accounting Invoice entries.

Provide Additional Descriptions for Stock Items

Enable this option to specify description for each item selected in the invoice.

Show message on negative Stock Balance

By default, a warning message is displayed for negative stock balance. If you set it to No, the error message will not be displayed.

Use Expired Batches for Stock items

Show batches with Zero Quantity

It will display the zero quantity batches for the stock item.

Skip the Date field during voucher creation

Show Current Balances of Ledgers

Show Balances as on Voucher date

Show Compound Unit based on Rate

Enable this option to show the compound unit of item based on the unit provided in the Rate Per column.

Show details of Compound Unit

Enable this option to display details of compound unit in the Quantity field. If Kgs is typed in Rate Per field, then the Quantity field will display as12 Kgs.250 gms.

Provide Marks of Container No.

Enable this option to specify Marks for every item selected in the invoice.

You can keep track of all the goods used to produce the finished goods, co-products, by-products, and scrap during the manufacturing process. It provides a clear view of the items that are consumed or damaged during the process.

Manufacturing Journal Voucher Type is one of inventory vouchers in TallyPrime provided for manufacturing entries. In Manufacturing/Assembling organisations, there are number of components that go into the manufacturing/ assembling of finished Goods. Once, the Bill of materials is created, you can use Manufacturing Journal and specify the quantity of finished goods that are to be manufactured. 

You can create a manufacturing journal and enter details of the components used to produce the finished goods, or the Co-Products/By-Products/Scrap produced during the manufacture of the finished goods, and so on.

To know more, refer to the Manage Inventory in Manufacturing topic. 

If you have opted for Edit Log in TallyPrime and want to know how to view Edit Log for transactions, then refer to the View Edit Log for Transactions section in the Accounting Entry in TallyPrime topic.

TallyPrime allows users to evaluate stock in different methods. Each stock item can be set up to have a different stock valuation method. There are instances where only a particular method of stock valuation is applicable; for example, to assess the replacement value or saleable value of stock.

To know more, refer to the Stock Valuation Methods topic.

TallyPrime uses a voucher type for each transaction type including for the inventory vouchers in TallyPrime. You can create voucher types that cater to your needs. Apart from the default voucher types that TallyPrime provides, you can create voucher types to serve your custom needs.

In TallyPrime, you can define the method of voucher number, as per your need. You may need the method as Automatic or Manual. You have the flexibility to set the method of voucher number in inventory vouchers in TallyPrime too.

To know more, refer to the Methods of voucher number section in the Voucher Types in TallyPrime topic. Define Voucher Numbering for more information.

You cannot use a voucher class in voucher alteration.

Stock Journal voucher Class

Stock Journal classes allow you to handle transfers from one location to another, for companies having Multi-Location Inventory and at least two locations. Once the class is selected, you will need to specify the Destination and provide the list of items to be transferred. Through this class, all items/batches will be exactly mirrored to the destination, including Batch Number, Rate and Value.

The facility of creating voucher class is provided for all the accounting and inventory vouchers in TallyPrime.

You can either alter the existing Stock Journal or create a new voucher type based on the requirements.

The Class: Transfer screen is displayed.

As always, you can press Ctrl+A to save.

Pros And Cons Of Active Noise

On paper, active noise-cancelling headphones seem outright better than regular ones. They also seem better than passive noise-cancellation headphones, which depend on headphone material and design instead of using active-cancellation methods.

Let’s explore the pros and cons of active noise-cancelling headphones and how they compare to other headphones.

Advantages of Active Noise Cancellation Personalized Cancellation of Environment

As we covered in our article on how noise cancellation works, using active headphones will attempt to deafen the sounds around you at the time. It does this by listening to the sound waves approaching your ear, then transmitting a counter-wave to dull it.

Passive cancellation doesn’t have this luxury. All it does is provide a case for your ears and hope that it’s strong enough to block the sounds around you. As such, active cancellation wins out on actually cancelling out unwanted noise.

Toggleable Cancellation

Perhaps you don’t want to cancel out the outside world all the time. Perhaps you want to hear your surroundings, then turn the cancellation on when you’re in transit or the neighbors get noisy.

Active noise-cancelling headphones typically have a switch that turns the cancellation on and off. This means you can turn it off when you want to hear the doorbell and turn it on when it’s time to zone into a game. This is better than regular headphones (which don’t cancel sounds) and passive cancellation (which can’t be “turned off”).

Active Cancellation Headphones Are More Expensive

Active cancellation requires electronics within the headphones to listen to your surroundings. Normal and passive-cancelling headphones don’t need this, as they’re designed to block sound through their materials rather than technology. As such, active noise-cancelling headphones will ask for a little more to cover the additional cost.

Active Cancellation May Distort Your Music a Little

Because active headphones need to counter the outside world with sound waves, you may find the audio quality drop when you turn on the active cancellation. Passive headphones don’t need to alter the sound, which means you won’t hear any quality degradation.

Active Cancellation Requires Power

If you purchase wired active noise-cancelling headphones, you may be surprised to see that they need charging, even if they can’t be used wirelessly. That’s because the on-board technology can’t be charged via the audio port on the headphones. As such, you’ll need to manually charge them every time you want to use the cancellation.

Regular and passive cancellation headphones don’t have this caveat, so take this into consideration when buying a new pair of headphones.

Are Active Noise-Cancelling Headphones For You?

In short, active cancellation headphones are fantastic for blocking your surroundings. You have to pay a premium for them, they require charging, and your music quality may suffer as a result; however, the personalized cancellation and the ability to turn them off whenever you like make it a top choice for some users.

Do you prefer active noise-cancelling headphones over passive models? Let us know below.

Simon Batt

Simon Batt is a Computer Science graduate with a passion for cybersecurity.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.

By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.

Update the detailed information about Codeigniter Active Record: Insert, Select, Update, Delete on the Hatcungthantuong.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!