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