mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 11:44:11 +00:00
fix: ignore crm deal in tax_rule search filter (#45134)
(cherry picked from commit dc5bff9008)
Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com>
This commit is contained in:
@@ -676,7 +676,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
|
||||||
@@ -696,10 +696,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