refactor: dont harcode "serial_no" field
This commit is contained in:
parent
98468fab18
commit
b58b1343bb
@ -145,7 +145,8 @@ erpnext.utils.BarcodeScanner = class BarcodeScanner {
|
||||
}
|
||||
|
||||
is_duplicate_serial_no(row, serial_no) {
|
||||
const is_duplicate = !!serial_no && !!row.serial_no && row.serial_no.includes(serial_no);
|
||||
const is_duplicate = !!serial_no && !!row[this.serial_no_field]
|
||||
&& row[this.serial_no_field].includes(serial_no);
|
||||
|
||||
if (is_duplicate) {
|
||||
frappe.show_alert(
|
||||
|
Loading…
x
Reference in New Issue
Block a user