Open jmbrunskill opened 2 days ago
Putting as high as ledger integrity is pretty important and milestone pending Gary's reply on backdating prescriptions release
Gary has confirmed that backdated prescriptions won't be deployed until early 2025, so putting this to be fixed in 2.4 during cooldown period
What went wrong? π²
Discovered while investigating this issue... https://github.com/msupply-foundation/open-msupply/issues/5359
If an invoice is cancelled it creates a duplicate invoice with negative values in it.
However, our stock movements view filters out these canceled invoices, but still includes the uncancelled version.
This means our ledger is incorrect, and results in miss-calculations when backdating stock
Expected behaviour π€
We either need to include cancelled invoice movements in the stock movements OR filter out both the original and the cancellation (treating it as though the stock movement never happened)
I think the first one sounds easier but might have unexpected effects on
item_stats
?How to Reproduce π¨
Steps to reproduce the behaviour:
Your environment π±