mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-14 15:57:41 +00:00
fix: Make discount_account mandatory if discount accounting is enabled
This commit is contained in:
@@ -40,6 +40,7 @@ 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(doctype, "discount_account", "mandatory", enable_discount_accounting, "Check", validate_fields_for_doctype=False)
|
||||
|
||||
for doctype in ["Sales Invoice", "Purchase Invoice"]:
|
||||
make_property_setter(doctype, "additional_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False)
|
||||
|
||||
Reference in New Issue
Block a user