fix: broken apply on other item pricing rule

(cherry picked from commit e5119a749c)
This commit is contained in:
ruthra kumar
2024-09-12 15:25:32 +05:30
committed by Mergify
parent 90b7ce2dd6
commit 5d6451fca7

View File

@@ -446,7 +446,10 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False):
if isinstance(pricing_rule, str):
pricing_rule = frappe.get_cached_doc("Pricing Rule", pricing_rule)
update_pricing_rule_uom(pricing_rule, args)
pricing_rule.apply_rule_on_other_items = get_pricing_rule_items(pricing_rule) or []
fetch_other_item = True if pricing_rule.apply_rule_on_other else False
pricing_rule.apply_rule_on_other_items = (
get_pricing_rule_items(pricing_rule, other_items=fetch_other_item) or []
)
if pricing_rule.get("suggestion"):
continue