Bug 28854: Make barcode comparison case insensative

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2021-12-15 11:15:42 +00:00 committed by Tomas Cohen Arazi
parent 6c816a356a
commit dd858180db
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 2 additions and 2 deletions

View File

@ -1535,11 +1535,11 @@
$('#verify-items-bundle-contents-barcodes').on('input', function (ev) {
let char = ev.target.value.slice(-1);
if ( char.match(/\n/) ) {
const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim() });
const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim().toUpperCase() });
const expected = [];
let found = 0;
$('#items-bundle-contents-table tbody > tr').each(function () {
const barcode = this.getAttribute('data-barcode');
const barcode = this.getAttribute('data-barcode').toUpperCase();
expected.push(barcode);
if (barcodes.includes(barcode)) {
this.classList.add('ok');