Bug 9218: fix intranet cart email for non english templates
[koha.git] / opac / opac-reserve.pl
index b633d3d..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;
@@ -556,8 +556,8 @@ if (! $template->{VARS}->{'singleBranchMode'}) {
     $itemTableColspan--;
 }
 $itemTableColspan-- if !$show_holds_count && !$show_priority;
-my $show_notes=C4::Context->preference('OPACShowHoldNotes');
-$template->param(OPACShowHoldNotes=>$show_notes);
+my $show_notes=C4::Context->preference('OpacHoldNotes');
+$template->param(OpacHoldNotes=>$show_notes);
 $itemTableColspan-- if !$show_notes;
 $template->param(itemtable_colspan => $itemTableColspan);