fix: Batch/Serial Selector for Batched Item

This commit is contained in:
marination 2021-01-11 10:27:05 +05:30
parent c7aecb8148
commit 7646d7b741

View File

@ -524,7 +524,7 @@ frappe.ui.form.on('Stock Entry', {
})
);
}
for (let i in frm.doc.items) {
let item = frm.doc.items[i];
@ -675,7 +675,13 @@ frappe.ui.form.on('Stock Entry Detail', {
});
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);
}
}