From de4f6901d6170e91659a6e1a1ff61cb55ea39ec9 Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 16 Mar 2020 16:29:10 +0530 Subject: [PATCH] fix: serial_no_selector showing for non serialized batched item (#20851) --- erpnext/stock/doctype/stock_entry/stock_entry.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 170a80fdf3..2840a70dd0 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -964,10 +964,8 @@ erpnext.stock.select_batch_and_serial_no = (frm, item) => { } } - if(item && item.has_serial_no - && frm.doc.purpose === 'Material Receipt') { - return; - } + if(item && !item.has_serial_no && item.has_batch_no) return; + if (frm.doc.purpose === 'Material Receipt') return; frappe.require("assets/erpnext/js/utils/serial_no_batch_selector.js", function() { new erpnext.SerialNoBatchSelector({