fix: Only display Additional Discount Account if Enable Discount Accounting is checked

This commit is contained in:
GangaManoj 2021-07-15 22:02:43 +05:30
parent 8e96e2d5a2
commit 40412f7e61

View File

@ -41,4 +41,5 @@ class AccountsSettings(Document):
for doctype in ["Sales Invoice Item", "Purchase Invoice Item"]:
make_property_setter(doctype, "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False)
make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False)
make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False)
make_property_setter("Sales Invoice", "additional_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False)