Perpetual Inventory

The flagship feature of ERPNext and really any worthwhile stock-keeping application, is and should be, Perpetual Inventory. The core idea is that changes to inventory, in quantity or value, are automatically reflected on the balance sheet. This automated cost accounting system ensures that every stock movement generates the appropriate General Ledger entries without manual intervention.

How it Works

The perpetual inventory system automatically handles the drudgery of cost accounting through a series of interconnected documents and their corresponding Stock Ledger and General Ledger entries. In the purchasing cycle, when a Company receives an Item and places it in a Warehouse, a Purchase Receipt records the transaction, which has two notable side effects:

  1. it creates one or more Stock Ledger Entries that record the Item, quantity, valuation and location (Warehouse)
  2. it creates a pair of General Ledger entries that reflect the value added to the Inventory or Stock account, balanced by an entry to another account, which can be against any root type but is not typically against equity.

Purchase Receipt

AccountStock LedgerDebitCredit
Inventory on Hand+5 @ $20.00$100.00
Inventory Received But Not Billed$100.00

When a user creates a Purchase Invoice to reflect the payable portion of that same activity, it converts the Inventory Received But Not Billed liability into a proper Accounts Payable entry on the Supplier's subledger, where they are referenced as a Party. This separation of receipt and payable acknowledgement allows for accurate inventory valuation even when timing differences exist between receiving goods and processing invoices. It even allows the Company to use the inventory in downstream transactions where value is added before the payable is processed.

Purchase Invoice

AccountStock LedgerDebitCredit
Inventory Received But Not Billed$100.00
Accounts Payable$100.00

ERPNext's ability to map warehouses to specific accounts provides granular control over inventory valuation on the balance sheet. This feature supports several common business scenarios. When items require inspection or fail quality checks, they can be stored in a quarantine warehouse mapped to a "Quarantined Inventory" account. This segregates potentially problematic inventory both physically and financially.

Purchase Receipt to Quarantine

AccountStock LedgerDebitCredit
Inventory on Hand+98 @ $15.00$1,470.00
Quarantined Inventory+2 @ $15.00$30.00
Inventory Received But Not Billed$1,500.00

Manufacturing operations can use dedicated Work in Process or Work in Progress warehouses to track the value of materials and components during production. Each production stage can have its own warehouse-account mapping to show the accumulation of value.

Transfer to WIP

AccountStock LedgerDebitCredit
Work in Process+50 @ $20.00$1,000.00
Raw Materials-50 @ $20.00$1,000.00

A scrap warehouse mapped to a "Scrap Inventory" account allows tracking of damaged or obsolete items. This separation helps monitor waste and enables accurate costing of disposal or recycling activities.

Scrap Transfer

AccountStock LedgerDebitCredit
Scrap Inventory+25 @ $10.00$250.00
Inventory on Hand-25 @ $10.00$250.00

For items sent to subcontractors for processing, a dedicated warehouse-to-account mapping tracks inventory value at external locations. This maintains visibility of company-owned materials while segregating them from on-premise inventory. This same technique works for material transferred to a Supplier where it is being sold on consignment.

Transfer to Subcontractor

AccountStock LedgerDebitCredit
Subcontractor Inventory+200 @ $5.00$1,000.00
Inventory on Hand-200 @ $5.00$1,000.00

The warehouse-to-account mapping feature ensures that stock movements between these specialized locations automatically generate appropriate accounting entries, maintaining the integrity of perpetual inventory while providing detailed visibility into inventory status and location. While this functionality is convenient, it does create maintenance overhead and should really only be used when reporting on slices of inventory must be tied to a specific account. Most businesses find that the built in reporting for Inventory meets their needs without creating additional stock accounts.

On the sales side, when the Company sells an item, a Delivery Note credits the inventory account (typically "Inventory on Hand") and debits the expense account (typically 'Cost of Goods Sold'). The corresponding Sales Invoice handles the revenue recognition, recording a credit to Sales and a debit to Accounts Receivable.

Delivery Note

AccountStock LedgerDebitCredit
Inventory on Hand-5 @ $20.00$100.00
Cost of Goods Sold$100.00

Sales Invoice

AccountStock LedgerDebitCredit
Sales$120.00
Accounts Receivable$120.00

Why is Perpetual Inventory Valuable?

The primary advantage of Perpetual Inventory is that you have realtime information about the valuation of items in-process, in the location in which they occur. While each individual stock movement does create a discrete General Ledger entry - making the Inventory account(s) relatively noisy compared to systems where inventory is managed separately and reconciled at month end - this granularity provides crucial visibility into your actual inventory position at any moment.

This realtime valuation becomes especially valuable in a manufacturing context where the additive value of parts (and if desired, labor) can be added to items at each step in the process. For detailed examples of how manufacturing transactions interact with Perpetual Inventory, refer to the Manufacturing documentation.

Similarly, ERPNext's Landed Cost Voucher can allocate additional costs (such as shipping, customs, and handling) to received Items, automatically adjusting their inventory valuation. This ensures that your inventory valuation includes all costs associated with getting items into your warehouse. For more information on this process, see the Landed Cost Voucher documentation. Of note, the Landed Cost Voucher and ERPNext in general allow back dating of inventory, which re-computes the inventory valuations as appropriate.

ERPNext's Perpetual Inventory automatically handles the thankless repetitive parts of cost accounting, leaving only the strategic and thoughtful work to be managed manually. The system maintains a complete audit trail by creating appropriate ledger entries for every stock movement, providing both accuracy and transparency in inventory valuation. While this creates more individual transactions than periodic inventory systems, the benefit of having realtime, accurate stock valuation far outweighs the additional ledger entries.

The Zero Value Inventory Problem

This error usually begins at Item receipt or master data setup when unknown costs are entered as zero. See Items for why that choice corrupts costing across the system. The ledger entries below show how the distortion propagates through perpetual inventory and manufacturing.

The accounting impact becomes evident when replacement gaskets are eventually purchased:

Initial Stock Entry (Incorrect)

AccountStock LedgerDebitCredit
Inventory - Gaskets+20 @ $0.00$0.00
Stock Received but Not Billed$0.00

Manufacturing Entry (Understated)

AccountStock LedgerDebitCredit
Work in Process$1,480.00
Inventory - Components$1,480.00
Inventory - Gaskets-1 @ $0.00$0.00

Subsequent Purchase (Variance Emerges)

AccountStock LedgerDebitCredit
Inventory - Gaskets+20 @ $5.00$100.00
Accounts Payable$100.00

The moving average now shows dramatic "inflation" that merely corrects the original error. Sales quoted assuming 40% margins discover actual margins of 37%, while financial statements have understated inventory throughout the error period.

Please contact us for corrections, additions, questions, or to request a topic.

© 2026 AgriTheory. All Rights Reserved.