Commit 54c0071b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

try to find payment condition not from explanation delivery but from delivery...

try to find payment condition not from explanation delivery but from delivery link movement, to make it possible to have payment condition for each movement (though not supported for now).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33074 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2d8a6370
......@@ -66,10 +66,14 @@ class PaymentSimulationRule(Rule, PredicateMatrix):
payment_conditon_list = []
# try to find local payment conditions
delivery = input_movement.getDeliveryValue()
if delivery is None:
delivery = input_movement.getExplanationValue()
# try to find local payment conditions from the upper level delivery
rule = applied_rule
movement = input_movement
delivery = movement.getDeliveryValue()
while delivery is None and not(rule.isRootAppliedRule()):
rule = movement.getParentValue()
movement = rule.getParentValue()
delivery = movement.getDeliveryValue()
if delivery is not None:
payment_condition_list = delivery.getPaymentConditionValueList()
......
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