mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-12 14:58:24 +00:00
fix: pricing rule with and without 'apply multiple' and priority
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user