Skip to content

Commit

Permalink
fix: ignore crm deal in tax_rule search filter (backport #45134) (#45138
Browse files Browse the repository at this point in the history
)

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

(cherry picked from commit dc5bff9)

Co-authored-by: Venkatesh <[email protected]>
  • Loading branch information
mergify[bot] and venkat102 authored Jan 17, 2025
1 parent dd58e4c commit afab5be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions erpnext/accounts/party.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit afab5be

Please sign in to comment.