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