Commit f03d8f09 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

support delivery_ratio and order_ratio, that should be specified for quantity divergence.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31226 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 09cf1845
......@@ -74,6 +74,16 @@ class FloatDivergenceTester(Predicate, DivergenceTesterMixin):
decision_value = decision_movement.getProperty(tested_property)
prevision_value = prevision_movement.getProperty(tested_property)
# use delivery_ratio if specified
if self.getProperty('use_delivery_ratio') and \
prevision_movement.getDelivery() == decision_movement.getRelativeUrl():
decision_value *= prevision_movement.getDeliveryRatio()
# XXX do we need to support order_ratio too?
if self.getProperty('use_order_ratio') and \
decision_movement.getOrder() == prevision_movement.getRelativeUrl():
prevision_value *= decision_movement.getOrderRatio()
delta = decision_value - prevision_value
# XXX we should use appropriate property sheets and getter methods
# for these properties.
......
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