From 0a7832d8d38e3e47bebd3ec53e2cd180eb357460 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Sun, 15 Dec 2024 22:55:24 +0530 Subject: [PATCH] fix: update discount when pricing rule is changed (cherry picked from commit 8338d1d5b45dc20049130d96546fad002a64ba99) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 902af5c2a772..2f8332377630 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -328,6 +328,8 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): "parent": args.parent, "parenttype": args.parenttype, "child_docname": args.get("child_docname"), + "discount_percentage": 0.0, + "discount_amount": 0, } )