Lines 1537-1547
Link Here
|
1537 |
$('#verify-items-bundle-contents-barcodes').on('input', function (ev) { |
1537 |
$('#verify-items-bundle-contents-barcodes').on('input', function (ev) { |
1538 |
let char = ev.target.value.slice(-1); |
1538 |
let char = ev.target.value.slice(-1); |
1539 |
if ( char.match(/\n/) ) { |
1539 |
if ( char.match(/\n/) ) { |
1540 |
const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim() }); |
1540 |
const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim().toUpperCase() }); |
1541 |
const expected = []; |
1541 |
const expected = []; |
1542 |
let found = 0; |
1542 |
let found = 0; |
1543 |
$('#items-bundle-contents-table tbody > tr').each(function () { |
1543 |
$('#items-bundle-contents-table tbody > tr').each(function () { |
1544 |
const barcode = this.getAttribute('data-barcode'); |
1544 |
const barcode = this.getAttribute('data-barcode').toUpperCase(); |
1545 |
expected.push(barcode); |
1545 |
expected.push(barcode); |
1546 |
if (barcodes.includes(barcode)) { |
1546 |
if (barcodes.includes(barcode)) { |
1547 |
this.classList.add('ok'); |
1547 |
this.classList.add('ok'); |
1548 |
- |
|
|