From b142902a7694936a50ab73783040e5a2b75f2ecf Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 14 Dec 2021 16:47:54 +0000 Subject: [PATCH] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row. --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index f05766153c..17e00dd4a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -1538,7 +1538,7 @@ const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim() }); const expected = []; let found = 0; - $('#items-bundle-contents-table tr').each(function () { + $('#items-bundle-contents-table tbody > tr').each(function () { const barcode = this.getAttribute('data-barcode'); expected.push(barcode); if (barcodes.includes(barcode)) { -- 2.20.1