Lines 60-66
use C4::External::Syndetics qw(
Link Here
|
60 |
use C4::Members; |
60 |
use C4::Members; |
61 |
use C4::XSLT qw( XSLTParse4Display ); |
61 |
use C4::XSLT qw( XSLTParse4Display ); |
62 |
use C4::ShelfBrowser qw( GetNearbyItems ); |
62 |
use C4::ShelfBrowser qw( GetNearbyItems ); |
63 |
use C4::Reserves qw( GetReserveStatus ); |
63 |
use C4::Reserves qw( GetReserveStatus IsAvailableForItemLevelRequest CanBookBeReserved ); |
64 |
use C4::Charset qw( SetUTF8Flag ); |
64 |
use C4::Charset qw( SetUTF8Flag ); |
65 |
use MARC::Field; |
65 |
use MARC::Field; |
66 |
use List::MoreUtils qw( any ); |
66 |
use List::MoreUtils qw( any ); |
Lines 658-664
if ( C4::Context->preference('OPACAcquisitionDetails' ) ) {
Link Here
|
658 |
}; |
658 |
}; |
659 |
} |
659 |
} |
660 |
|
660 |
|
661 |
my $allow_onshelf_holds; |
661 |
my $is_available; |
662 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
662 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
663 |
if ( not $viewallitems and $items->count > $max_items_to_display ) { |
663 |
if ( not $viewallitems and $items->count > $max_items_to_display ) { |
664 |
$template->param( |
664 |
$template->param( |
Lines 682-690
else {
Link Here
|
682 |
$item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; |
682 |
$item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; |
683 |
$item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; |
683 |
$item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; |
684 |
|
684 |
|
685 |
$allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy( |
685 |
$is_available = IsAvailableForItemLevelRequest($item, $patron, $currentbranch) |
686 |
{ item => $item, patron => $patron } ) |
686 |
unless $is_available; |
687 |
unless $allow_onshelf_holds; |
|
|
688 |
|
687 |
|
689 |
# get collection code description, too |
688 |
# get collection code description, too |
690 |
my $ccode = $item->ccode; |
689 |
my $ccode = $item->ccode; |
Lines 759-765
else {
Link Here
|
759 |
} |
758 |
} |
760 |
} |
759 |
} |
761 |
|
760 |
|
762 |
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { |
761 |
my $canReserve = CanBookBeReserved($borrowernumber, $biblionumber, $currentbranch); |
|
|
762 |
if (!$borrowernumber || ($canReserve->{status} eq "OK" && $is_available)) { |
763 |
$template->param( ReservableItems => 1 ); |
763 |
$template->param( ReservableItems => 1 ); |
764 |
} |
764 |
} |
765 |
|
765 |
|
766 |
- |
|
|