Rev 36331 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 36332 2026-04-21 17:37:58
- Author: amit
- Log message:
- moveToBill: fix loop reassigning order back to worse warehouse
- Break after first warehouse that covers remaining qty; loop used to
fall through and overwrite fulfilment WH with every subsequent snapshot,
so orders ended up pinned to the last (least-available) candidate.
- Sort candidates by net availability (availability - reserved) desc
so the best warehouse is tried first.
- Track remainingQty across splits; keep current orderId on the chunk
being placed and move the leftover to the deferred order.
- Null guard on itemSnapshots when no vendor under the billing WH has
stock/reservation for the item.