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