fix: exclude fully-delivered reservations from the conflict message

This commit is contained in:
Mihir Kandoi
2026-07-15 11:27:19 +05:30
parent 7cd7e4ab0f
commit 555c607f2f

View File

@@ -1366,8 +1366,10 @@ class StockController(AccountsController):
continue
key = (row.batch_no, row.warehouse)
outstanding_qty[key] += flt(row.qty) - flt(row.delivered_qty)
reservations[key].append(row)
outstanding = flt(row.qty) - flt(row.delivered_qty)
outstanding_qty[key] += outstanding
if outstanding > 0:
reservations[key].append(row)
for (batch_no, warehouse), reserved_qty in outstanding_qty.items():
if reserved_qty <= 0: