From 310e11d940983a038467958bc1028cfa04b6b047 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Tue, 7 Feb 2017 17:53:52 +0200 Subject: [PATCH] Bug 7614: Check branch transfer limits in opac-reserve.pl --- opac/opac-reserve.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index f1fe2ff..36e65f4 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -256,7 +256,7 @@ if ( $query->param('place_reserve') ) { # holdingbranch, force the value $rank and $found. my $rank = $biblioData->{rank}; if ( $itemNum ne '' ) { - $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum ) eq 'OK'; + $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum, $branch ) eq 'OK'; $rank = '0' unless C4::Context->preference('ReservesNeedReturns'); my $item = GetItem($itemNum); if ( $item->{'holdingbranch'} eq $branch ) { @@ -265,7 +265,7 @@ if ( $query->param('place_reserve') ) { } } else { - $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum ) eq 'OK'; + $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum, $branch ) eq 'OK'; # Inserts a null into the 'itemnumber' field of 'reserves' table. $itemNum = undef; @@ -511,7 +511,7 @@ foreach my $biblioNum (@biblionumbers) { my $policy_holdallowed = !$itemLoopIter->{already_reserved}; $policy_holdallowed &&= IsAvailableForItemLevelRequest($itemInfo,$borr) && - CanItemBeReserved($borrowernumber,$itemNum) eq 'OK'; + CanItemBeReserved($borrowernumber,$itemNum,$branch) eq 'OK'; if ($policy_holdallowed) { if ( my $hold_allowed = OPACItemHoldsAllowed( $itemInfo, $borr ) ) { @@ -548,7 +548,7 @@ foreach my $biblioNum (@biblionumbers) { $biblioLoopIter{already_patron_possession} = 1; } - $biblioLoopIter{holdable} &&= CanBookBeReserved($borrowernumber,$biblioNum) eq 'OK'; + $biblioLoopIter{holdable} &&= CanBookBeReserved($borrowernumber,$biblioNum,$branch) eq 'OK'; # For multiple holds per record, if a patron has previously placed a hold, # the patron can only place more holds of the same type. That is, if the -- 1.9.1