fix: list lookup with undefined variable (#25210)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
This commit is contained in:
Sun Howwrongbum 2021-04-15 14:52:13 +05:30 committed by GitHub
parent 640b5e00ce
commit c50fbc6897
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,9 +353,9 @@ erpnext.SerialNoBatchSelector = Class.extend({
return row.on_grid_fields_dict.batch_no.get_value(); return row.on_grid_fields_dict.batch_no.get_value();
} }
}); });
if (selected_batches.includes(val)) { if (selected_batches.includes(batch_no)) {
this.set_value(""); this.set_value("");
frappe.throw(__('Batch {0} already selected.', [val])); frappe.throw(__('Batch {0} already selected.', [batch_no]));
} }
if (me.warehouse_details.name) { if (me.warehouse_details.name) {