Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds

For single bibs we use an ajax select2 dropdown, and we don't use this
value

To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2023-03-10 18:44:21 +00:00 committed by Tomas Cohen Arazi
parent 017694fd95
commit 63772a9cb2
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -681,7 +681,7 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold )
$template->param( reserveloop => \@reserveloop );
}
if ( $patron ) {
if ( $patron && $multi_hold ) {
# Add the valid pickup locations
my @pickup_locations = $biblio->pickup_locations({ patron => $patron })->as_list;
$biblioloopiter{pickup_locations} = \@pickup_locations;