Skip to content

Commit

Permalink
fix: check tax and charges if it is passed
Browse files Browse the repository at this point in the history
(cherry picked from commit 7ec6909)
  • Loading branch information
shariquerik authored and mergify[bot] committed Aug 17, 2023
1 parent c308bd5 commit 1f76c69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def set_other_charges(self):

def validate_enabled_taxes_and_charges(self):
taxes_and_charges_doctype = self.meta.get_options("taxes_and_charges")
if frappe.get_cached_value(taxes_and_charges_doctype, self.taxes_and_charges, "disabled"):
if self.taxes_and_charges and frappe.get_cached_value(taxes_and_charges_doctype, self.taxes_and_charges, "disabled"):
frappe.throw(
_("{0} '{1}' is disabled").format(taxes_and_charges_doctype, self.taxes_and_charges)
)
Expand Down

0 comments on commit 1f76c69

Please sign in to comment.