Bug 10403: (follow-up) fix test to use vendor created earlier during test
[koha.git] / opac / opac-reserve.pl
index be72e84..97d136a 100755 (executable)
@@ -307,7 +307,7 @@ if ( $borr->{lost} && ($borr->{lost} == 1) ) {
                      lost    => 1
                     );
 }
-if ( CheckBorrowerDebarred($borrowernumber) ) {
+if ( $borr->{'debarred'} ) {
     $noreserves = 1;
     $template->param(
                      message  => 1,
@@ -490,7 +490,7 @@ foreach my $biblioNum (@biblionumbers) {
         # If there is no loan, return and transfer, we show a checkbox.
         $itemLoopIter->{notforloan} = $itemLoopIter->{notforloan} || 0;
 
-        my $branch = ( C4::Context->preference('ReservesControlBranch') eq 'ItemHomeLibrary' ) ? $itemInfo->{'homebranch'} : $borr->{'branchcode'};
+        my $branch = GetReservesControlBranch( $itemInfo, $borr );
 
         my $branchitemrule = GetBranchItemRule( $branch, $itemInfo->{'itype'} );
         my $policy_holdallowed = 1;