Commit d642ab37 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

consider delivery_error if decision_movement is delivery of prevision_movement.

parent 283985a3
......@@ -79,10 +79,12 @@ class FloatEquivalenceTester(Predicate, EquivalenceTesterMixin):
prevision_value = self._getTestedPropertyValue(prevision_movement,
tested_property) or 0.0
if prevision_movement.getDelivery() == decision_movement.getRelativeUrl():
# use delivery_ratio if specified
if self.getProperty('use_delivery_ratio') and \
prevision_movement.getDelivery() == decision_movement.getRelativeUrl():
if self.getProperty('use_delivery_ratio'):
decision_value *= prevision_movement.getDeliveryRatio()
if tested_property == 'quantity':
prevision_value += prevision_movement.getDeliveryError(0.0)
if self.isDecimalAlignmentEnabled():
decision_value = self._round(decision_value)
......
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