Merge pull request #36685 from shariquerik/api-fix
This commit is contained in:
commit
5d9dde92fa
@ -716,7 +716,9 @@ class AccountsController(TransactionBase):
|
|||||||
|
|
||||||
def validate_enabled_taxes_and_charges(self):
|
def validate_enabled_taxes_and_charges(self):
|
||||||
taxes_and_charges_doctype = self.meta.get_options("taxes_and_charges")
|
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(
|
frappe.throw(
|
||||||
_("{0} '{1}' is disabled").format(taxes_and_charges_doctype, self.taxes_and_charges)
|
_("{0} '{1}' is disabled").format(taxes_and_charges_doctype, self.taxes_and_charges)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user