Commit aa788b76 authored by Sebastien Robin's avatar Sebastien Robin

fixed bug, isDivergent must return 1 if the delivery_ratio is equal to 0

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6093 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0f38eab5
......@@ -472,10 +472,12 @@ class SimulationMovement(Movement):
if d_error is None:
d_error = 0
delivery_ratio = self.getDeliveryRatio()
#LOG('SimulationMovement.isDivergent d_quantity',0,d_quantity)
#LOG('SimulationMovement.isDivergent quantity + d_error',0,quantity + d_error)
# if the delivery_ratio is None, make sure that we are
# divergent even if the delivery quantity is 0
if delivery_ratio is not None:
d_quantity *= delivery_ratio
if delivery_ratio == 0 and quantity >0:
return 1
if d_quantity != quantity + d_error:
return 1
return 0
......
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