From 3c251663bb1a9bddd61092abecd01fbf2b743168 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Fri, 5 Apr 2019 14:10:05 +0530 Subject: [PATCH] style: add type comparison for boolean expression --- erpnext/buying/doctype/purchase_order/purchase_order.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 7d22160bea2..2ed0515e04a 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -36,7 +36,7 @@ frappe.ui.form.on("Purchase Order", { }, refresh: function(frm) { - if(frm.doc.docstatus == 1 && frm.doc.status != 'Closed' + if(frm.doc.docstatus === 1 && frm.doc.status !== 'Closed' && flt(frm.doc.per_received) < 100 && flt(frm.doc.per_billed) < 100) { frm.add_custom_button(__('Update Items'), () => { erpnext.utils.update_child_items({