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

(-)a/C4/Reserves.pm (-3 / +3 lines)
Lines 465-473 sub CanBookBeReserved{ Link Here
465
    push (@$items,@hostitems);
465
    push (@$items,@hostitems);
466
    }
466
    }
467
467
468
	my $canReserve;
468
    my $canReserve;
469
    foreach my $item (@$items){
469
    foreach my $item (@$items) {
470
		$canReserve = CanItemBeReserved($borrowernumber, $item);
470
        $canReserve = CanItemBeReserved( $borrowernumber, $item );
471
        return 'OK' if $canReserve eq 'OK';
471
        return 'OK' if $canReserve eq 'OK';
472
    }
472
    }
473
    return $canReserve;
473
    return $canReserve;
(-)a/opac/opac-reserve.pl (-8 / +5 lines)
Lines 548-561 foreach my $biblioNum (@biblionumbers) { Link Here
548
    if ($biblioLoopIter{already_reserved}) {
548
    if ($biblioLoopIter{already_reserved}) {
549
        $biblioLoopIter{holdable} = undef;
549
        $biblioLoopIter{holdable} = undef;
550
    }
550
    }
551
	my $canReserve = CanBookBeReserved($borrowernumber,$biblioNum);
551
    my $canReserve = CanBookBeReserved($borrowernumber,$biblioNum);
552
	if ($canReserve eq 'OK') {
552
    unless ($canReserve eq 'OK') {
553
		#All is OK!
553
        $biblioLoopIter{holdable} = undef;
554
	}
554
        $biblioLoopIter{ $canReserve } = 1;
555
	else {
555
    }
556
		$biblioLoopIter{holdable} = undef;
557
		$biblioLoopIter{ $canReserve } = 1;
558
	}
559
    if(not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowernumber,$biblioNum)) {
556
    if(not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowernumber,$biblioNum)) {
560
        $biblioLoopIter{holdable} = undef;
557
        $biblioLoopIter{holdable} = undef;
561
        $biblioLoopIter{already_patron_possession} = 1;
558
        $biblioLoopIter{already_patron_possession} = 1;
(-)a/reserve/request.pl (-14 / +14 lines)
Lines 191-210 foreach my $biblionumber (@biblionumbers) { Link Here
191
191
192
    my $dat = GetBiblioData($biblionumber);
192
    my $dat = GetBiblioData($biblionumber);
193
193
194
	my $canReserve = CanBookBeReserved($borrowerinfo->{borrowernumber}, $biblionumber);
194
    my $canReserve = CanBookBeReserved( $borrowerinfo->{borrowernumber}, $biblionumber );
195
	if ($canReserve eq 'OK') {
195
    if ( $canReserve eq 'OK' ) {
196
		#All is OK and we can continue
196
197
	}
197
        #All is OK and we can continue
198
	elsif ( $canReserve eq 'tooManyReserves' ) {
198
    }
199
		$maxreserves = 1;
199
    elsif ( $canReserve eq 'tooManyReserves' ) {
200
        $maxreserves = 1;
201
    }
202
    elsif ( $canReserve eq 'ageRestricted' ) {
203
        $template->param( $canReserve => 1 );
204
        $biblioloopiter{$canReserve} = 1;
205
    }
206
    else {
207
        $biblioloopiter{$canReserve} = 1;
200
    }
208
    }
201
	elsif ( $canReserve eq 'ageRestricted' ) {
202
		$template->param( $canReserve => 1 );
203
		$biblioloopiter{ $canReserve } = 1;
204
	}
205
	else {
206
		$biblioloopiter{ $canReserve } = 1;
207
	}
208
209
209
    my $alreadypossession;
210
    my $alreadypossession;
210
    if (not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowerinfo->{borrowernumber},$biblionumber)) {
211
    if (not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowerinfo->{borrowernumber},$biblionumber)) {
211
- 

Return to bug 13116