Commit 813442ae authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Titouan Soulard

Builder: Fix builder to check absolute quantity

parent 80fb586b
...@@ -737,7 +737,7 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -737,7 +737,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
# if total quantity is 0 no need to create anything # if total quantity is 0 no need to create anything
total_quantity = 0 total_quantity = 0
for movement in movement_group_node.getMovementList(): for movement in movement_group_node.getMovementList():
total_quantity += movement.getQuantity() total_quantity += abs(movement.getQuantity())
if total_quantity == 0: if total_quantity == 0:
return delivery_list return delivery_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment