Merge pull request #49175 from AssemBahnasy/fix-pricing-rule-utils-final

fix: Pricing rule validation not working for Sales Invoice when validate_applied_rule is enabled
This commit is contained in:
Mihir Kandoi
2025-08-27 22:10:57 +05:30
committed by GitHub

View File

@@ -583,11 +583,7 @@ def apply_pricing_rule_on_transaction(doc):
if not d.get(pr_field):
continue
if (
d.validate_applied_rule
and doc.get(field) is not None
and doc.get(field) < d.get(pr_field)
):
if d.validate_applied_rule and (doc.get(field) or 0) < d.get(pr_field):
frappe.msgprint(_("User has not applied rule on the invoice {0}").format(doc.name))
else:
if not d.coupon_code_based: