How perpetual inventory works
Perpetual inventory is a method of stock accounting in which ERPNext posts general ledger entries for every stock transaction. The value of your stock in the Stock Ledger and the balance of your stock accounts stay equal at all times.
The value of available stock is a current asset in your chart of accounts. You need this value in the Balance Sheet. There are two methods to account for it: perpetual inventory and periodic inventory.
Perpetual and periodic inventory
| Perpetual inventory | Periodic inventory | |
|---|---|---|
| When accounting entries are made | On every stock transaction, automatically | At the end of a period, by hand |
| Stock value in the Balance Sheet | Always current | Correct only after the period-end entry |
| Cost of goods sold | Booked on each delivery, at the valuation rate | Purchases are booked as expenses, then adjusted at period end |
| Setting in ERPNext | Enable Perpetual Inventory selected in the Company | Enable Perpetual Inventory cleared in the Company |
Perpetual inventory is the default for a new company. To use periodic inventory instead, see Record stock value with periodic inventory.
Accounts that perpetual inventory uses
ERPNext creates these default accounts for a new company. You can change them in the Company form, on the Stock and Manufacturing tab.
| Company field | Account type | What ERPNext posts to it |
|---|---|---|
| Default Inventory Account | Asset (Stock) | The value of stock in hand, when no other inventory account applies |
| Stock Received But Not Billed | Liability | The value of goods received on a Purchase Receipt that is not yet billed |
| Stock Adjustment Account | Expense | Differences in stock value, for example from a Stock Reconciliation or a Stock Entry without an expense account |
| Default Cost Center | Cost Center | The default cost center for the ledger entries |
Each warehouse can post to its own inventory account. ERPNext looks for the account in this order:
- The Account field in the Warehouse.
- The Account field in the parent warehouse, and up the warehouse tree.
- The Default Inventory Account in the Company.
You can also use item-wise inventory accounts instead of warehouse-wise accounts. Learn how to set inventory accounts for warehouses and items.
Accounting entries for common stock transactions
The examples below use a company with three warehouses: Stores, Work In Progress, and Finished Goods. Each warehouse is linked to a stock account with the same name. The item is valued with FIFO.
Purchase Receipt
You receive 10 units of item RM0001 at 200 into the Stores warehouse. The Purchase Receipt has these taxes and charges:
| Account | Amount | Consider Tax or Charge for |
|---|---|---|
| Shipping Charges | 100 | Total and Valuation |
| VAT (10%) | 200 | Total |
| Customs Duty | 150 | Valuation |
The charges that count for valuation add 250 to the stock value. The valuation amount of the item is 2,000 + 250 = 2,250, and the valuation rate is 225.
| Account | Debit | Credit |
|---|---|---|
| Stores | 2,250 | |
| Stock Received But Not Billed | 2,000 | |
| Shipping Charges | 100 | |
| Customs Duty | 150 |
ERPNext credits the charge accounts for the amount that it added to the stock value. When you book the same charges on the Purchase Invoice, the two entries cancel, so the expense is not counted twice.
Purchase Invoice
When the supplier bill arrives, you create a Purchase Invoice against the Purchase Receipt. ERPNext debits Stock Received But Not Billed for the item amount and credits the supplier (Creditors). The balance that the Purchase Receipt left in Stock Received But Not Billed becomes zero. Learn more about the Stock Received But Not Billed account.
Delivery Note
You deliver 5 units of RM0001 from Stores at a selling rate of 300. ERPNext books the cost of the delivered stock at its valuation rate, not at the selling rate: 5 × 225 = 1,125.
| Account | Debit | Credit |
|---|---|---|
| Cost of Goods Sold | 1,125 | |
| Stores | 1,125 |
The sales amount and the taxes go to the ledger when you submit the Sales Invoice.
Sales Invoice with Update Stock
If you deliver from the Sales Invoice with Update Stock selected, and do not create a Delivery Note, the Sales Invoice posts both sets of entries: the usual receivable, income, and tax entries, and the Stores and Cost of Goods Sold entries shown for the Delivery Note.
Stock Entry
| Stock Entry type | Debit | Credit |
|---|---|---|
| Material Receipt into Stores | Stores | Stock Adjustment Account (or the expense account in the row) |
| Material Issue from Stores | Stock Adjustment Account (or the expense account in the row) | Stores |
| Material Transfer from Stores to Work In Progress | Work In Progress | Stores |
A transfer between two warehouses that use the same inventory account posts no ledger entry, because the total stock value does not change.
Back-dated transactions and reposting
With perpetual inventory, the accounting value of stock depends on the valuation rate. When you create a back-dated stock transaction, or cancel or amend a submitted one, ERPNext recalculates the later Stock Ledger entries and their general ledger entries. The same happens when you add costs to a submitted Purchase Receipt with a Landed Cost Voucher. Learn more about reposting item valuation.
WARNING
Because every entry uses the valuation rate, check the rate on every incoming transaction: Purchase Receipt, Material Receipt, Manufacture, and Repack. A wrong rate changes the value of stock and the cost of goods sold.