|
Lines 393-398
my $numBibsAvailable = 0;
Link Here
|
| 393 |
my $itemdata_enumchron = 0; |
393 |
my $itemdata_enumchron = 0; |
| 394 |
my $anyholdable = 0; |
394 |
my $anyholdable = 0; |
| 395 |
my $itemLevelTypes = C4::Context->preference('item-level_itypes'); |
395 |
my $itemLevelTypes = C4::Context->preference('item-level_itypes'); |
|
|
396 |
my $pickup_locations = Koha::Libraries->search({ pickup_location => 1 }); |
| 396 |
$template->param('item_level_itypes' => $itemLevelTypes); |
397 |
$template->param('item_level_itypes' => $itemLevelTypes); |
| 397 |
|
398 |
|
| 398 |
foreach my $biblioNum (@biblionumbers) { |
399 |
foreach my $biblioNum (@biblionumbers) { |
|
Lines 532-538
foreach my $biblioNum (@biblionumbers) {
Link Here
|
| 532 |
my $policy_holdallowed = !$itemLoopIter->{already_reserved}; |
533 |
my $policy_holdallowed = !$itemLoopIter->{already_reserved}; |
| 533 |
$policy_holdallowed &&= |
534 |
$policy_holdallowed &&= |
| 534 |
IsAvailableForItemLevelRequest($itemInfo,$borr) && |
535 |
IsAvailableForItemLevelRequest($itemInfo,$borr) && |
| 535 |
CanItemBeReserved($borrowernumber,$itemNum,$branch) eq 'OK'; |
536 |
CanItemBeReserved($borrowernumber,$itemNum) eq 'OK'; |
| 536 |
|
537 |
|
| 537 |
if ($policy_holdallowed) { |
538 |
if ($policy_holdallowed) { |
| 538 |
if ( my $hold_allowed = OPACItemHoldsAllowed( $itemInfo, $borr ) ) { |
539 |
if ( my $hold_allowed = OPACItemHoldsAllowed( $itemInfo, $borr ) ) { |
|
Lines 591-597
foreach my $biblioNum (@biblionumbers) {
Link Here
|
| 591 |
} |
592 |
} |
| 592 |
} |
593 |
} |
| 593 |
|
594 |
|
| 594 |
$biblioLoopIter{holdable} &&= CanBookBeReserved($borrowernumber,$biblioNum,$branch) eq 'OK'; |
595 |
$biblioLoopIter{holdable} &&= CanBookBeReserved($borrowernumber,$biblioNum) eq 'OK'; |
| 595 |
|
596 |
|
| 596 |
# For multiple holds per record, if a patron has previously placed a hold, |
597 |
# For multiple holds per record, if a patron has previously placed a hold, |
| 597 |
# the patron can only place more holds of the same type. That is, if the |
598 |
# the patron can only place more holds of the same type. That is, if the |
|
Lines 616-621
foreach my $biblioNum (@biblionumbers) {
Link Here
|
| 616 |
$anyholdable = 1 if $biblioLoopIter{holdable}; |
617 |
$anyholdable = 1 if $biblioLoopIter{holdable}; |
| 617 |
} |
618 |
} |
| 618 |
|
619 |
|
|
|
620 |
unless ($pickup_locations->count) { |
| 621 |
$numBibsAvailable = 0; |
| 622 |
$anyholdable = 0; |
| 623 |
$template->param( |
| 624 |
message => 1, |
| 625 |
no_pickup_locations => 1 |
| 626 |
); |
| 627 |
} |
| 619 |
|
628 |
|
| 620 |
if ( $numBibsAvailable == 0 || $anyholdable == 0) { |
629 |
if ( $numBibsAvailable == 0 || $anyholdable == 0) { |
| 621 |
$template->param( none_available => 1 ); |
630 |
$template->param( none_available => 1 ); |
| 622 |
- |
|
|