Merge pull request #28203 from frappe/mergify/bp/version-13-hotfix/pr-28202
fix: Serial Nos not set in the row after scanning in popup (backport #28202)
This commit is contained in:
@@ -202,8 +202,10 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
var me = this;
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
|
||||
if (item.serial_no && item.qty === item.serial_no.split(`\n`).length) {
|
||||
return;
|
||||
// check if serial nos entered are as much as qty in row
|
||||
if (item.serial_no) {
|
||||
let serial_nos = item.serial_no.split(`\n`).filter(sn => sn.trim()); // filter out whitespaces
|
||||
if (item.qty === serial_nos.length) return;
|
||||
}
|
||||
|
||||
if (item.serial_no && !item.batch_no) {
|
||||
|
||||
Reference in New Issue
Block a user