fix: set disable rounded total if it is globally enabled (#25789)
This commit is contained in:
parent
b6d061fa8c
commit
dd5b31f8c4
@ -59,13 +59,15 @@ class GlobalDefaults(Document):
|
||||
|
||||
# Make property setters to hide rounded total fields
|
||||
for doctype in ("Quotation", "Sales Order", "Sales Invoice", "Delivery Note",
|
||||
"Supplier Quotation", "Purchase Order", "Purchase Invoice"):
|
||||
"Supplier Quotation", "Purchase Order", "Purchase Invoice", "Purchase Receipt"):
|
||||
make_property_setter(doctype, "base_rounded_total", "hidden", self.disable_rounded_total, "Check", validate_fields_for_doctype=False)
|
||||
make_property_setter(doctype, "base_rounded_total", "print_hide", 1, "Check", validate_fields_for_doctype=False)
|
||||
|
||||
make_property_setter(doctype, "rounded_total", "hidden", self.disable_rounded_total, "Check", validate_fields_for_doctype=False)
|
||||
make_property_setter(doctype, "rounded_total", "print_hide", self.disable_rounded_total, "Check", validate_fields_for_doctype=False)
|
||||
|
||||
make_property_setter(doctype, "disable_rounded_total", "default", cint(self.disable_rounded_total), "Text", validate_fields_for_doctype=False)
|
||||
|
||||
def toggle_in_words(self):
|
||||
self.disable_in_words = cint(self.disable_in_words)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user