View | Details | Raw Unified | Return to bug 10166
Collapse All | Expand All

(-)a/opac/opac-reserve.pl (-7 / +4 lines)
Lines 349-355 my $notforloan_label_of = get_notforloan_label_of(); Link Here
349
my $biblioLoop = [];
349
my $biblioLoop = [];
350
my $numBibsAvailable = 0;
350
my $numBibsAvailable = 0;
351
my $itemdata_enumchron = 0;
351
my $itemdata_enumchron = 0;
352
my $anyholdable;
352
my $anyholdable = 0;
353
my $itemLevelTypes = C4::Context->preference('item-level_itypes');
353
my $itemLevelTypes = C4::Context->preference('item-level_itypes');
354
$template->param('item_level_itypes' => $itemLevelTypes);
354
$template->param('item_level_itypes' => $itemLevelTypes);
355
355
Lines 526-551 foreach my $biblioNum (@biblionumbers) { Link Here
526
        $numBibsAvailable++;
526
        $numBibsAvailable++;
527
        $biblioLoopIter{bib_available} = 1;
527
        $biblioLoopIter{bib_available} = 1;
528
        $biblioLoopIter{holdable} = 1;
528
        $biblioLoopIter{holdable} = 1;
529
        $anyholdable = 1;
530
    }
529
    }
531
    if ($biblioLoopIter{already_reserved}) {
530
    if ($biblioLoopIter{already_reserved}) {
532
        $biblioLoopIter{holdable} = undef;
531
        $biblioLoopIter{holdable} = undef;
533
        $anyholdable = undef;
534
    }
532
    }
535
    if(not CanBookBeReserved($borrowernumber,$biblioNum)){
533
    if(not CanBookBeReserved($borrowernumber,$biblioNum)){
536
        $biblioLoopIter{holdable} = undef;
534
        $biblioLoopIter{holdable} = undef;
537
        $anyholdable = undef;
538
    }
535
    }
539
    if(not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowernumber,$biblioNum)) {
536
    if(not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowernumber,$biblioNum)) {
540
        $biblioLoopIter{holdable} = undef;
537
        $biblioLoopIter{holdable} = undef;
541
        $biblioLoopIter{already_patron_possession} = 1;
538
        $biblioLoopIter{already_patron_possession} = 1;
542
        $anyholdable = undef;
543
    }
539
    }
544
540
541
    if( $biblioLoopIter{holdable} ){ $anyholdable = 1; }
542
545
    push @$biblioLoop, \%biblioLoopIter;
543
    push @$biblioLoop, \%biblioLoopIter;
546
}
544
}
547
545
548
if ( $numBibsAvailable == 0 || !$anyholdable) {
546
if ( $numBibsAvailable == 0 || $anyholdable == 0) {
549
    $template->param( none_available => 1 );
547
    $template->param( none_available => 1 );
550
}
548
}
551
549
552
- 

Return to bug 10166