On cancellation of any transaction instead of deleting the General Ledger Entry(GLE) or Stock Ledger Entry(SLE) a new GLE or SLE will be posted on the date of cancellation that will reverse the impact of that transaction.
In accounting, we have journal entries to record transactions. When journal entries are posted (in ERPNext - submitted), a set of General Ledger entries are generated for the purpose of generating reports like Trial Balance, Balance Sheet, Income Statement, etc.
Previously, when Journal Entries are cancelled, the corresponding General Ledger Entries are also cancelled. When you amend the Journal Entries, a new set of corresponding General Ledger Entries are generated. So, there is a one-to-one mapping between Journal Entry (in our case Stock Entry) to the General Ledger Entry.
Now, with immutable ledger, when you cancel a Stock Entry, the General (Stock) Ledger entries that were generated when we submitted (posted) the Stock Entry are not cancelled. Instead, a new set of General (Stock) Ledger with TODAY’S date is generated to reverse the previous General Ledger Entries.
So, what we have now is One Cancelled Journal Entry (meaning - no longer valid), and yet we have two sets of existing General Ledger entries with no Journal (Stock) Entry to stand on for support. The original set of General Ledger Entries no longer has the Journal Entry since it has been cancelled, and the New set of General Ledger entries with Today’s date appears out of nowhere without a Journal Entry with the Today’s date.
This is why, if we want to implement Immutable Ledger entries, the present procedure of generating Ledger entries for cancelled entries seems dubious.
It is better to know outright with immutable ledgers, CANCELLED ENTRIES are not possible.
Also, you wlil discover the unpleasant surprise that you cannot Amend the cancelled entry because it pre-dates the General Ledger entries generated for the cancellation. You will get Backdated error.