How Sales, Purchase, and Perpetual Inventory Accounting Work in an ERP
A basic guide to sales, purchase, and perpetual inventory accounting in ERPNext.
Back in 2017, when I had joined Frappe Technologies, I had freshly graduated out of college and had zero ideas of Enterprise systems, and likewise, accounting. The idea of learning double-entry accounting was baffling and intimidating, to say the least.
One of the major features of an ERP is to ease and automate stock and accounting entries. ERPs (such as ERPNext) do this using a concept called Perpetual Inventory. When it comes to inventory systems, we have two broad ones that are followed: Periodical Inventory and Perpetual Inventory.
Now, before we move forward, a pre-requisite is that one understands some basic accounting topics, such as the Chart of Accounts, debit-credit, and double-entry accounting and some business terms such as orders, invoices, payment entry, etc. If you want to brush up your terms a bit, refer:
Now that we have our basics in check, let's dive right in!
1. Periodical Inventory vs Perpetual Inventory
|Periodic Inventory||Perpetual Inventory|
|The accounting for stock/inventory is not updated frequently. Stocktake is done at the end of a period (usually, year-end).||The stock/inventory and accounts are updated in tandem, ie, inventory-accounting is done in real-time.|
|You can book the expense of an item right away when booking the purchase invoice.||When booking a Purchase Invoice, the expense is not booked for the items directly. It is booked after the sale of the item is made under Cost of Goods Sold (COGS).|
|COGS needs to be calculated for Periodic Inventory.||COGS is readily available in case of Perpetual Inventory as the booking is done on every sale.|
Setting Up Perpetual Accounting In ERPNext
When setting up a company in ERPNext, the system by default has perpetual inventory enabled. You can check this, by going to the Company master in your instance under the Stocks Settings header:
Note that the system is asking for an inventory account. This is account will be used to record entries in case of inventory action.
Perpetual Inventory in Purchase/Buying Cycle
Let's take a simple case of sales and purchase to see how the accounting entries are generated. You are a trading company that buys and sells cell phones. You are falling short of inventory on a certain model, so you raise a Purchase Order to your supplier for the same:
Once the order is received by the supplier, they ship the device back to you. On receiving the device, you generate a Purchase Receipt/GRN. Submitting the Receipt causes two sets of entries to be generated in the ERP. One is the stock ledger which holds information such as the quantities, the valuation rate, and balance, the other is a general ledger entry that holds the accounting information.
Let's have a look at the General Ledger entry generated for the Receipt:
|Stock In Hand||65,000||0|
|Stock Received But Not Billed||0||65,000|
As you see, since we have accepted the device in our inventory, we have added to the value of our assets. Hence Stock in Hand, our warehouse account from earlier, which falls under Assets in the Chart of Accounts is debited.
An equivalent amount is credited in a Liability account appropriately labeled Stock Received But Not Billed.
At the same time, the stock ledger is updated as well!
Here you can see that 1 quantity has been accepted into the Stores warehouse. This entry is generated on submission of the receipt, at no extra steps!
After the device is received, the supplier then sends the invoice from their end. Now, for simplicity's sake, we are not involving taxes, but if you want to go a touch deeper, you can refer to the documentation.
An invoice is sent to you for ₹65,000. You book the same by creating a Purchase Invoice in the system. On submission, the invoice generates the following entries:
|Stock Received But Not Billed||65,000|
Since you have purchased the device, you now owe the supplier ₹65,000. Hence, Creditors, a liability account is debited. The equivalent amount is credited in Stock Received But Not Billed which you may remember from the previous transaction has a balance of 65,000 Cr. The invoice entry nullifies that account balance and sets it back to 0.
You will see that the expense of the device, is still not booked.
Now since we owe the supplier a sum, that will be promptly reflected in the Accounts Payable report:
Now, you will be making the payment against the invoice from say, your bank account. You create a payment entry record in ERPNext of type Pay.
Since the amount is deducted from your bank account, which is an Asset, an entry will be made crediting 65,000 from the bank account:
The entry is made against Creditors which has a balance of 65000 Dr, which is nullified, and thus you have paid your supplier! This means that the invoice is removed from your Payables as well. This step completes the cycle on the purchase side.
4. Perpetual Inventory In Sales Cycle
Now coming to the sales side. When you close the deal for the device, and the customer sends a Purchase Order from their end, you book a Sales Order in ERPNext. Let's assume you closed the deal for ₹100,000.
After the order is booked, you proceed to deliver the item from the system to the customer and create a Delivery Note in the system.
|Cost of Goods Sold||65,000||0|
|Stock in Hand||0||65,000|
Since delivering the device means reducing its count from your inventory, the stock has been reduced, the asset value we hold has reduced. Hence, the Stock in Hand (an Asset account) has been credited and Cost of Goods Sold, an expense account is debited. Cost of Goods Sold is an expense account, that holds or records the cost of producing and delivering goods and services. It may also be referred to as the account which records the "book value" of goods. As said earlier, this is the point when the expense of the item is booked.
Also, in the stock ledger, we see that 1 quantity of the device/item has been reduced at the stated valuation rate.
We are now sending an invoice to the customer for the sale made. The entries for the Sales Invoice look something like this:
As we have sold the device for ₹100,000 that amount is credited to Sales, an Income account. On the flip side, the customer now owes us ₹100,000. Since we are subscribing to accrual accounting practices, we assume that the sum will be paid on a future date to us. Hence the amount is debited to Debtors, an Asset account.
Another impact the invoice will have is our Accounts Receivable report. This is a similar report to Payables on the sales cycle which shows how much you are owed your customers.
And now we are in the final stage, that of payment. The customer has paid you through a bank transfer. This transfer will be reflected in ERPNext, as a Receive type.
On submission of the payment entry, the following entries are generated:
As the money has been paid to our bank account, the same, represented by HSBC will be debited by 100,000. Equivalent posting is made into Debtors under credit, thus settling the account.
In this manner, your inventory, accounting, sales, and purchases are simplified and kept in sync with ERPNext!
This article first appeared on Medium
Part-time film critic, full-time consultant