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 inventoryPeriodic inventory
When accounting entries are madeOn every stock transaction, automaticallyAt the end of a period, by hand
Stock value in the Balance SheetAlways currentCorrect only after the period-end entry
Cost of goods soldBooked on each delivery, at the valuation ratePurchases are booked as expenses, then adjusted at period end
Setting in ERPNextEnable Perpetual Inventory selected in the CompanyEnable 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 fieldAccount typeWhat ERPNext posts to it
Default Inventory AccountAsset (Stock)The value of stock in hand, when no other inventory account applies
Stock Received But Not BilledLiabilityThe value of goods received on a Purchase Receipt that is not yet billed
Stock Adjustment AccountExpenseDifferences in stock value, for example from a Stock Reconciliation or a Stock Entry without an expense account
Default Cost CenterCost CenterThe default cost center for the ledger entries

Each warehouse can post to its own inventory account. ERPNext looks for the account in this order:

  1. The Account field in the Warehouse.
  2. The Account field in the parent warehouse, and up the warehouse tree.
  3. 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:

AccountAmountConsider Tax or Charge for
Shipping Charges100Total and Valuation
VAT (10%)200Total
Customs Duty150Valuation

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.

AccountDebitCredit
Stores2,250
Stock Received But Not Billed2,000
Shipping Charges100
Customs Duty150

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.

AccountDebitCredit
Cost of Goods Sold1,125
Stores1,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 typeDebitCredit
Material Receipt into StoresStoresStock Adjustment Account (or the expense account in the row)
Material Issue from StoresStock Adjustment Account (or the expense account in the row)Stores
Material Transfer from Stores to Work In ProgressWork In ProgressStores

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.