mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
fix: ignore crm deal in tax_rule search filter (#45134)
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user