Commit bef70976 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

if original quantity is recorded, we use it to decide if update / compensate is required or not.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31703 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b3f76a9d
......@@ -269,7 +269,10 @@ class RuleMixin:
# First, we update all properties (exc. quantity) which could be divergent
# and if we can not, we compensate them
for decision_movement in decision_movement_list:
decision_movement_quantity = decision_movement.getQuantity()
if decision_movement.isPropertyRecorded('quantity'):
decision_movement_quantity = decision_movement.getRecordedProperty('quantity')
else:
decision_movement_quantity = decision_movement.getQuantity()
decision_quantity += decision_movement_quantity
if self._isProfitAndLossMovement(decision_movement):
if decision_movement.isFrozen():
......
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