Remove unused code (#14526)
diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
index 61f4b60..90c7d50 100644
--- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
+++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
@@ -7,7 +7,4 @@
from frappe.model.document import Document
class TaxWithholdingCategory(Document):
- def validate(self):
- if not frappe.db.get_value("Tax Withholding Category",
- {"is_default": 1, "name": ("!=", self.name)}, "name"):
- self.is_default = 1
\ No newline at end of file
+ pass
\ No newline at end of file
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 1db6ced..909856c 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -529,8 +529,6 @@
def set_tax_withholding_details(tax_mapper, ref_doc, tax_withholding_category=None, use_default=0):
if tax_withholding_category:
tax_withholding = frappe.get_doc("Tax Withholding Category", tax_withholding_category)
- else:
- tax_withholding = frappe.get_doc("Tax Withholding Category", {'is_default': 1, 'enabled': 1})
if tax_withholding.book_on_invoice and ref_doc.doctype=='Purchase Invoice' \
or tax_withholding.book_on_advance and ref_doc.doctype in ('Payment Entry', 'Journal Entry'):