From afab5be63fbe58ff169d0b941cc096455db9756a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:01:28 +0530 Subject: [PATCH] fix: ignore crm deal in tax_rule search filter (backport #45134) (#45138) fix: ignore crm deal in tax_rule search filter (#45134) (cherry picked from commit dc5bff90089617befa2e42c7d413daa352c3327d) Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --- erpnext/accounts/party.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 396c814dff6..0df9dcb0683 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -676,7 +676,7 @@ def set_taxes( ): from erpnext.accounts.doctype.tax_rule.tax_rule import get_party_details, get_tax_template - args = {party_type.lower(): party, "company": company} + args = {frappe.scrub(party_type): party, "company": company} if tax_category: args["tax_category"] = tax_category @@ -696,10 +696,10 @@ def set_taxes( else: args.update(get_party_details(party, party_type)) - if party_type in ("Customer", "Lead", "Prospect"): + if party_type in ("Customer", "Lead", "Prospect", "CRM Deal"): args.update({"tax_type": "Sales"}) - if party_type in ["Lead", "Prospect"]: + if party_type in ["Lead", "Prospect", "CRM Deal"]: args["customer"] = None del args[frappe.scrub(party_type)] else: