diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 2df5634132d..297012d78fe 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -223,9 +223,7 @@ erpnext.SerialNoBatchSelector = Class.extend({ frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); } else { row = this.frm.doc.items.find(i => i.batch_no === batch_no); - if (row) { - frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); - } + frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); } if (!row) { @@ -274,9 +272,7 @@ erpnext.SerialNoBatchSelector = Class.extend({ frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); } else { row = this.frm.doc.items.find(i => i.batch_no === batch_no); - if (row) { - frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); - } + frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); } const values = { 'qty': serial_no.length, diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index c44f23f2dae..15a0a351aa0 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -10,7 +10,7 @@ frappe.ui.form.on('Batch', { 'is_stock_item': 1, 'has_batch_no': 1 } - }; + } }; frm.set_query('selling_price', function() {