From 6c816a356a8b4f9df6833470723b05c9d4bc846b 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. Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- 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 77493baa3c..b0fab0f29c 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.39.5