From 1e17d6a6079d1f65980c3735f180f35fb7d265ab Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 14 Dec 2021 14:58:20 +0530 Subject: [PATCH] fix: qty filter not working if apply_multiple_pricing_rules is enabled --- erpnext/accounts/doctype/pricing_rule/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 02bfc9defd..1bd18bca86 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -67,13 +67,12 @@ def sorted_by_priority(pricing_rules, args, doc=None): if not pricing_rule.get('priority'): pricing_rule['priority'] = 1 - if pricing_rule.get('apply_multiple_pricing_rules'): - pricing_rule_dict.setdefault(cint(pricing_rule.get("priority")), []).append(pricing_rule) + pricing_rule_dict.setdefault(cint(pricing_rule.get("priority")), []).append(pricing_rule) for key in sorted(pricing_rule_dict): pricing_rules_list.extend(pricing_rule_dict.get(key)) - return pricing_rules_list or pricing_rules + return pricing_rules_list def filter_pricing_rule_based_on_condition(pricing_rules, doc=None): filtered_pricing_rules = []