Merge branch 'develop' into batch-selector
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 98116ec..f75e8b7 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -524,7 +524,7 @@
})
);
}
-
+
for (let i in frm.doc.items) {
let item = frm.doc.items[i];
@@ -675,7 +675,13 @@
});
refresh_field("items");
- if (!d.serial_no) {
+ let no_batch_serial_number_value = !d.serial_no;
+ if (d.has_batch_no && !d.has_serial_no) {
+ // check only batch_no for batched item
+ no_batch_serial_number_value = !d.batch_no;
+ }
+
+ if (no_batch_serial_number_value) {
erpnext.stock.select_batch_and_serial_no(frm, d);
}
}