Immutable Ledgers in ERPNext: How Accounting & Stock Ledgers Changed in v13
From version 13 onwards, ERPNext introduced a major change to how the Accounting Ledger (General Ledger) and Stock Ledger work making them immutable. There are several reasons ledgers should be immutable:
- Reposting future entries is expensive. To post a backdated transaction, every future entry would need to be reposted.
- FIFO valuations can be upset. In the Stock Ledger, where valuations use First-in-first-out (FIFO), the entire sequence could be regenerated disturbing valuations and profit for the transactions that follow.
- Taxes can change. Taxes already paid for a period could end up altered.
Impacts on day-to-day transactions
1. Reverse entries on cancellation of transactions
When you cancel a transaction, ERPNext no longer deletes its GL Entries. Instead, reverse entries are passed to cancel out the transaction’s effect, posted on the date of cancellation.
Because GL Entries linked to a transaction are never deleted, this also means cancelled transactions and their linked documents can no longer be deleted.
2. Restriction on posting backdated stock entries
Since the ledgers are now immutable, future transactions can’t be updated or reposted, so you can no longer post backdated stock transactions.
For example, suppose a stock transaction has been made for Item A with a posting time of 19-06-2020 23:00:10. After this, you cannot post a transaction for Item A with a posting time before that timestamp.
NOTE
The trade-off is intentional: you give up the ability to delete or backdate, and in return get ledgers that are stable and auditable. A correction is now made by cancelling (which posts reversing entries) and re-entering, rather than by editing history.
TIP
Because backdated stock entries are blocked, enter stock transactions in the correct chronological order and as close to their real time as possible. Getting the posting date and time right the first time avoids being stuck unable to slot in an earlier entry later.
Related Topics
- General Ledger
- Stock Ledger
- Stock Reconciliation
- Accounting Entries
SUMMARY
From version 13, ERPNext’s Accounting and Stock Ledgers are immutable avoiding the expensive reposting of future entries, the upsetting of FIFO valuations, and changes to taxes already paid. Two day-to-day impacts follow: cancelling a transaction now passes reverse entries (on the cancellation date) instead of deleting GL Entries, so cancelled transactions and their linked documents can’t be deleted; and backdated stock transactions are no longer allowed you can’t post a stock entry for an item earlier than its latest posting timestamp. Corrections are made by cancelling and re-entering rather than editing history.