Commit 5f189ed5 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

RuleMixin: No need to compensate when missing quantity is 0

parent 89b10801
......@@ -371,7 +371,7 @@ class RuleMixin(Predicate):
updatable_compensation_movement.setQuantity(
updatable_compensation_movement.getQuantity() + missing_quantity)
updatable_compensation_movement.clearRecordedProperty('quantity')
else:
elif missing_quantity:
# We must create a profit and loss movement
new_movement = self._newProfitAndLossMovement(prevision_movement)
if new_movement is not None:
......
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