fix: Minor Issues

This commit is contained in:
Deepesh Garg
2020-12-31 11:03:42 +05:30
parent 0bbb55d6cc
commit 1907c8f30b
2 changed files with 7 additions and 3 deletions

View File

@@ -223,7 +223,9 @@ erpnext.SerialNoBatchSelector = Class.extend({
frappe.model.set_value(row.doctype, row.name, '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);
if (row) {
frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no);
}
}
if (!row) {
@@ -272,7 +274,9 @@ erpnext.SerialNoBatchSelector = Class.extend({
frappe.model.set_value(row.doctype, row.name, '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);
if (row) {
frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no);
}
}
const values = {
'qty': serial_no.length,

View File

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