Flow
Order of steps for a blocked store line
1Plan with everyone
Split the cases with blocked and ready stores both included.
2Zero the blocked rows
Count the units removed and give them to nobody.
3Round the total down
If the supplier would raise the smaller total, order none.
4Trim ready stores
Take one step at a time from where it hurts least.
5Attach a note
Record removed units, trimmed units and the final total.
6Rebuild in the checker
The checker runs the same steps and must agree.
When one store was blocked from ordering a product, my order planner gave another store in the same order more of it. Nobody there asked for more. The rounding did it, and one of my tests said that was fine.
Why the stores share one rounding
A lot of my suppliers only ship whole cases. So the planner adds up what every store wants for a product, rounds that total to whole cases once, and then splits the cases back out. Each store gets as close to its request as the steps allow. One store can be set up to take the extra.
The blocked line just vanished
Each store's line passes a readiness check before it can be ordered. If the product isn't orderable there, or the stock numbers look off, or a person needs to check it, the line is blocked.
The planner dealt with a blocked line by leaving it out before the case math. The checker that rebuilds the plan before a cart is saved did the same thing by treating its request as zero. Both planned a smaller order than the one people had reviewed.
That's a problem because the rounding is shared. Take one store out and the leftover lands on someone else. The old test showed it: a store that wanted a little over two cases got three, because its blocked neighbor wasn't there to own the third.
Blocked stores keep a share, then lose it
Now the planner splits the cases with every store in, blocked or not. Then it sets the blocked stores to zero. Those units are gone, not moved. The core of it is small.
Split with everyone in, then set the blocked stores to zero.
That can leave a total that isn't whole cases. When it does, the planner rounds down, never up. If the supplier's rules would push the smaller total back up, it orders none of that product. Then it trims the ready stores one step at a time, from wherever the cut hurts least.
If you build something like this, these are the checks I'd want in place:
- The blocked row ends at zero.
- No other store ends above its normal share.
- The supplier total is still whole cases.
- The planner and the checker use the same rule, so they agree on who owns what.
Each affected cart row also gets a note saying how much was removed and how much was trimmed.
Two blocked stores, untested
The trimming takes the cheapest single cut each round, which may not always be the best overall. And every test blocks exactly one store, so two blocked stores on the same product is the test I'd write next.