This PR changes the way Accounting Ledger(General Ledger) and Stock Ledger works in ERPNext.
Posting back dated stock entries is computationally expensive since all the future entries needs to be reposted which takes a lot of time
If the stock valuation is based on FIFO(First In First Out), on posting back dated stock transactions the entire fifo queue gets regenerated which upsets the valuation in the subsequent transactions
Currently on cancellation of any transaction we delete the GLE/SLE which shouldn’t be done as per International Financial Reporting Standards
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.
Also you won’t be able to delete the cancelled transaction anymore since it will be linked to the corresponding GLE or SLE
Back dated entries that affect the Stock Ledger will be allowed only after the last stock transaction’s posting time which means there will be no need of any reposting of future transactions.