Merge pull request #17822 from rohitwaghchaure/pricing_rule_applying_on_the_non_conditional_item
fix: pricing rule is applying on the incorrect item
This commit is contained in:
commit
09d8bb8aa9
@ -480,10 +480,10 @@ def apply_pricing_rule(doc, pr_doc, item_row, value, do_not_validate=False):
|
||||
rule_applied = {}
|
||||
|
||||
for item in doc.get("items"):
|
||||
if item.get(apply_on) in items:
|
||||
if not item.pricing_rules:
|
||||
item.pricing_rules = item_row.pricing_rules
|
||||
|
||||
if item.get(apply_on) in items:
|
||||
for field in ['discount_percentage', 'discount_amount', 'rate']:
|
||||
if not pr_doc.get(field): continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user