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