From dadd049cbf23f5e09b323d26c2cdf0763bae77e8 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 2 Aug 2019 19:11:31 +0530 Subject: [PATCH] fix: add serial no button not working for the delivery note --- erpnext/public/js/utils.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 0a363a04fd..ffc5e6ad36 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -60,7 +60,15 @@ $.extend(erpnext, { var me = this; $btn.on("click", function() { - me.show_serial_batch_selector(grid_row.frm, grid_row.doc); + let callback = ''; + let on_close = ''; + + if (grid_row.doc.serial_no) { + grid_row.doc.has_serial_no = true; + } + + me.show_serial_batch_selector(grid_row.frm, grid_row.doc, + callback, on_close, true); }); }, });