fix: Disable Rounded Total always showing field default value

This commit is contained in:
marination 2019-12-11 12:10:05 +05:30
parent f3b393f5e0
commit ca6dbad7cb

View File

@ -30,7 +30,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
&& frappe.meta.has_field(this.frm.doc.doctype, "disable_rounded_total")) {
var df = frappe.meta.get_docfield(this.frm.doc.doctype, "disable_rounded_total");
var disable = df.default || cint(frappe.sys_defaults.disable_rounded_total);
var disable = cint(df.default) || cint(frappe.sys_defaults.disable_rounded_total);
this.frm.set_value("disable_rounded_total", disable);
}