Revert "fix: Set batch values"

This reverts commit 0bbb55d6cc.
This commit is contained in:
Deepesh Garg
2021-01-15 10:05:37 +05:30
parent 8bc69d3fe0
commit 0868bf5d45

View File

@@ -269,10 +269,9 @@ erpnext.SerialNoBatchSelector = Class.extend({
'qty', this.values.warehouse);
} else if (!this.batch_exists(batch_no)) {
row = this.frm.add_child("items", { ...this.item });
frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no);
row.batch_no = batch_no;
} else {
row = this.frm.doc.items.find(i => i.batch_no === batch_no);
frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no);
}
const values = {
'qty': serial_no.length,