Skip to content

Commit

Permalink
small update to handle negative demand quantities more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
jdetaeye committed Oct 23, 2024
1 parent af70795 commit 760ac88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frepple/controllers/outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ def getReservedQuantity(stock_move_id):
),
due,
priority,
j["picking_policy"] == "one" and qty or 0.0,
qty - reserved_quantity if j["picking_policy"] == "one" and qty - reserved_quantity > 0 else 0.0,
"open" if qty - reserved_quantity > 0 else "closed",
quoteattr(product["name"]),
quoteattr(customer),
Expand Down Expand Up @@ -2047,7 +2047,7 @@ def getReservedQuantity(stock_move_id):
qty,
due,
priority,
j["picking_policy"] == "one" and qty or 0.0,
qty if j["picking_policy"] == "one" and qty > 0 else 0.0,
status,
quoteattr(product["name"]),
quoteattr(customer),
Expand Down

0 comments on commit 760ac88

Please sign in to comment.