Commit e30a79ef authored by Thierry's avatar Thierry

bug fix : reset of consumption_quantity and production_quantity is now possible (==0)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@275 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5cd3a9d6
...@@ -381,13 +381,13 @@ class Amount(Base, Variated): ...@@ -381,13 +381,13 @@ class Amount(Base, Variated):
quantity = 0.0 quantity = 0.0
if source in (None, ''): if source in (None, ''):
if quantity > 0: if quantity >= 0:
self.setQuantity(quantity) self.setQuantity(quantity)
else: else:
return 0.0 return 0.0
if destination in (None, ''): if destination in (None, ''):
if quantity > 0: if quantity >= 0:
self.setQuantity(- quantity) self.setQuantity(- quantity)
else: else:
return 0.0 return 0.0
...@@ -406,13 +406,13 @@ class Amount(Base, Variated): ...@@ -406,13 +406,13 @@ class Amount(Base, Variated):
quantity = 0.0 quantity = 0.0
if destination in (None, ''): if destination in (None, ''):
if quantity > 0: if quantity >= 0:
self.setQuantity(quantity) self.setQuantity(quantity)
else: else:
return 0.0 return 0.0
if source in (None, ''): if source in (None, ''):
if quantity > 0: if quantity >= 0:
self.setQuantity(- quantity) self.setQuantity(- quantity)
else: else:
return 0.0 return 0.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