Merge pull request #16439 from nabinhait/disable-rounded-total
fix: Disable rounded total field's value honours docfield's default value
This commit is contained in:
commit
48fa697d54
@ -28,7 +28,10 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
|||||||
|
|
||||||
if (this.frm.doc.__islocal
|
if (this.frm.doc.__islocal
|
||||||
&& frappe.meta.has_field(this.frm.doc.doctype, "disable_rounded_total")) {
|
&& frappe.meta.has_field(this.frm.doc.doctype, "disable_rounded_total")) {
|
||||||
this.frm.set_value("disable_rounded_total", cint(frappe.sys_defaults.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);
|
||||||
|
this.frm.set_value("disable_rounded_total", disable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
@ -427,4 +430,3 @@ erpnext.buying.get_items_from_product_bundle = function(frm) {
|
|||||||
});
|
});
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@ -352,7 +353,7 @@
|
|||||||
"fieldname": "to_emp",
|
"fieldname": "to_emp",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 1,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
@ -618,7 +619,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-08-21 16:15:42.627233",
|
"modified": "2019-01-21 17:10:39.822125",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Setup",
|
"module": "Setup",
|
||||||
"name": "Authorization Rule",
|
"name": "Authorization Rule",
|
||||||
|
Loading…
Reference in New Issue
Block a user