Stock that left and never arrived
Goods left a central warehouse every day. The stores received them, used them and sold them. But in the system, nobody confirmed the arrival. Thousands of units were stuck “in transit”, and the stores showed negative stock.
The fix was not complicated, but it had to be careful. I built a tool that receives each pending transfer with the quantities signed when it left the warehouse. I tested it on a copy of the data first, more than once.
Then I ran it for real at night, with the stores closed, and checked the numbers before and after. All 48 overdue transfers closed in one go.
Closing the old ones was only half of it. I also added a rule that stops a store from receiving more than was sent, so the same mess cannot build up again.