Revert "fix: Minor Issues"

This reverts commit 1907c8f30b.
This commit is contained in:
Deepesh Garg
2021-01-15 10:05:21 +05:30
parent cd3d6ade04
commit 8bc69d3fe0
2 changed files with 3 additions and 7 deletions

View File

@@ -223,10 +223,8 @@ erpnext.SerialNoBatchSelector = Class.extend({
frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no);
} else { } else {
row = this.frm.doc.items.find(i => i.batch_no === batch_no); 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) { if (!row) {
row = this.item; row = this.item;
@@ -274,10 +272,8 @@ erpnext.SerialNoBatchSelector = Class.extend({
frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no);
} else { } else {
row = this.frm.doc.items.find(i => i.batch_no === batch_no); 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 = { const values = {
'qty': serial_no.length, 'qty': serial_no.length,
'serial_no': serial_no.join('\n') 'serial_no': serial_no.join('\n')

View File

@@ -10,7 +10,7 @@ frappe.ui.form.on('Batch', {
'is_stock_item': 1, 'is_stock_item': 1,
'has_batch_no': 1 'has_batch_no': 1
} }
}; }
}; };
frm.set_query('selling_price', function() { frm.set_query('selling_price', function() {