Skip to content

Commit

Permalink
fix: pricing rule with and without 'apply multiple' and priority
Browse files Browse the repository at this point in the history
Either all of the pricing rules identified for an item should have
'apply multiple' enabled. If not, Priority is applied and only the
highest priority is applied
  • Loading branch information
ruthra-kumar committed Jun 21, 2024
1 parent 7479459 commit 5e875b2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions erpnext/accounts/doctype/pricing_rule/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,9 @@ def _get_pricing_rules(apply_on, args, values):


def apply_multiple_pricing_rules(pricing_rules):
apply_multiple_rule = [
d.apply_multiple_pricing_rules for d in pricing_rules if d.apply_multiple_pricing_rules
]

if not apply_multiple_rule:
return False
for d in pricing_rules:
if not d.apply_multiple_pricing_rules:
return False

return True

Expand Down

0 comments on commit 5e875b2

Please sign in to comment.