Merge pull request #19893 from marination/rounded_total

fix: Disable Rounded Total always showing field default value
This commit is contained in:
Deepesh Garg 2019-12-11 18:40:56 +05:30 committed by GitHub
commit d10cefa37e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}