fix: fixed rounding off ordered percent to 100 in condition (#26148)

This commit is contained in:
Noah Jacob 2021-06-22 17:54:16 +05:30 committed by GitHub
parent e3a697c582
commit ce72d0c2c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,8 @@ frappe.ui.form.on('Material Request', {
}
if (frm.doc.docstatus == 1 && frm.doc.status != 'Stopped') {
if (flt(frm.doc.per_ordered, 2) < 100) {
let precision = frappe.defaults.get_default("float_precision");
if (flt(frm.doc.per_ordered, precision) < 100) {
let add_create_pick_list_button = () => {
frm.add_custom_button(__('Pick List'),
() => frm.events.create_pick_list(frm), __('Create'));