fix: ignore crm deal in tax_rule search filter (#45134)

This commit is contained in:
Venkatesh
2025-01-07 17:11:31 +05:30
committed by GitHub
parent 3bc74f219a
commit dc5bff9008

View File

@@ -681,7 +681,7 @@ def set_taxes(
): ):
from erpnext.accounts.doctype.tax_rule.tax_rule import get_party_details, get_tax_template 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: if tax_category:
args["tax_category"] = tax_category args["tax_category"] = tax_category
@@ -701,10 +701,10 @@ def set_taxes(
else: else:
args.update(get_party_details(party, party_type)) 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"}) args.update({"tax_type": "Sales"})
if party_type in ["Lead", "Prospect"]: if party_type in ["Lead", "Prospect", "CRM Deal"]:
args["customer"] = None args["customer"] = None
del args[frappe.scrub(party_type)] del args[frappe.scrub(party_type)]
else: else: