Lines 276-281
if ( $query->param('place_reserve') ) {
Link Here
|
276 |
$canreserve = 0; |
276 |
$canreserve = 0; |
277 |
} |
277 |
} |
278 |
|
278 |
|
|
|
279 |
unless ( C4::Context->preference('OPACHoldsIfAvailableAtPickup') ) { |
280 |
$canreserve = 0 if Koha::Items->search({ biblionumber => $biblioNum, holdingbranch => $branch })->count; |
281 |
} |
282 |
|
279 |
my $itemtype = $query->param('itemtype') || undef; |
283 |
my $itemtype = $query->param('itemtype') || undef; |
280 |
$itemtype = undef if $itemNum; |
284 |
$itemtype = undef if $itemNum; |
281 |
|
285 |
|
Lines 375-380
$template->param('item_level_itypes' => $itemLevelTypes);
Link Here
|
375 |
|
379 |
|
376 |
foreach my $biblioNum (@biblionumbers) { |
380 |
foreach my $biblioNum (@biblionumbers) { |
377 |
|
381 |
|
|
|
382 |
my @not_available_at = (); |
378 |
my $record = GetMarcBiblio($biblioNum); |
383 |
my $record = GetMarcBiblio($biblioNum); |
379 |
# Init the bib item with the choices for branch pickup |
384 |
# Init the bib item with the choices for branch pickup |
380 |
my %biblioLoopIter; |
385 |
my %biblioLoopIter; |
Lines 517-522
foreach my $biblioNum (@biblionumbers) {
Link Here
|
517 |
$biblioLoopIter{force_hold} = 1 if $hold_allowed eq 'F'; |
522 |
$biblioLoopIter{force_hold} = 1 if $hold_allowed eq 'F'; |
518 |
} |
523 |
} |
519 |
$numCopiesAvailable++; |
524 |
$numCopiesAvailable++; |
|
|
525 |
|
526 |
if ( not C4::Context->preference('OPACHoldsIfAvailableAtPickup') ) { |
527 |
push @not_available_at, $itemInfo->{holdingbranch}; |
528 |
} |
520 |
} |
529 |
} |
521 |
|
530 |
|
522 |
$itemLoopIter->{imageurl} = getitemtypeimagelocation( 'opac', $itemTypes->{ $itemInfo->{itype} }{imageurl} ); |
531 |
$itemLoopIter->{imageurl} = getitemtypeimagelocation( 'opac', $itemTypes->{ $itemInfo->{itype} }{imageurl} ); |
Lines 545-550
foreach my $biblioNum (@biblionumbers) {
Link Here
|
545 |
$biblioLoopIter{already_patron_possession} = 1; |
554 |
$biblioLoopIter{already_patron_possession} = 1; |
546 |
} |
555 |
} |
547 |
|
556 |
|
|
|
557 |
if ( $biblioLoopIter{holdable} ) { |
558 |
@not_available_at = uniq @not_available_at; |
559 |
$biblioLoopIter{not_available_at} = \@not_available_at ; |
560 |
} |
561 |
|
562 |
unless ( C4::Context->preference('OPACHoldsIfAvailableAtPickup') ) { |
563 |
@not_available_at = uniq @not_available_at; |
564 |
$biblioLoopIter{not_available_at} = \@not_available_at ; |
565 |
# The record is not holdable is not available at any of the libraries |
566 |
if ( Koha::Libraries->search->count == @not_available_at ) { |
567 |
$biblioLoopIter{holdable} = 0; |
568 |
} |
569 |
} |
570 |
|
548 |
$biblioLoopIter{holdable} &&= CanBookBeReserved($borrowernumber,$biblioNum) eq 'OK'; |
571 |
$biblioLoopIter{holdable} &&= CanBookBeReserved($borrowernumber,$biblioNum) eq 'OK'; |
549 |
|
572 |
|
550 |
# For multiple holds per record, if a patron has previously placed a hold, |
573 |
# For multiple holds per record, if a patron has previously placed a hold, |
551 |
- |
|
|