From 13db3275a16e4cd910cc6bb6a23c367dad7564b0 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 9 Jan 2026 20:47:53 +0000 Subject: [PATCH] Bug 35211: Move other_holdings_count outside of loop so it is only calculated once --- catalogue/detail.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index caec6916630..f7a2f00c348 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -381,11 +381,13 @@ if ( C4::Context->preference('SeparateHoldingsByGroup') ) { $total_group_holdings_count += $group_holdings_count; push @lib_groups, $group; - $other_holdings_count = ( $items_to_display->count ) - $total_group_holdings_count; } } } + #only need to calculate the other_holdings_count once + $other_holdings_count = ( $items_to_display->count ) - $total_group_holdings_count; + $template->param( lib_groups => \@lib_groups, branchcode_hash => \%branchcode_hash, -- 2.39.5