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 IsAvailableForItemLevelRequest ); |
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 $can_item_be_reserved = 0; |
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-688
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 |
$can_item_be_reserved = $can_item_be_reserved || $patron && IsAvailableForItemLevelRequest($item, $patron, undef); |
685 |
$is_available = IsAvailableForItemLevelRequest($item, $patron, $currentbranch) |
|
|
686 |
unless $is_available; |
686 |
|
687 |
|
687 |
# get collection code description, too |
688 |
# get collection code description, too |
688 |
my $ccode = $item->ccode; |
689 |
my $ccode = $item->ccode; |
Lines 758-764
else {
Link Here
|
758 |
} |
759 |
} |
759 |
} |
760 |
} |
760 |
|
761 |
|
761 |
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { |
762 |
my $canReserve = CanBookBeReserved($borrowernumber, $biblionumber, $currentbranch); |
|
|
763 |
if (!$borrowernumber || ($canReserve->{status} eq "OK" && $is_available)) { |
762 |
$template->param( ReservableItems => 1 ); |
764 |
$template->param( ReservableItems => 1 ); |
763 |
} |
765 |
} |
764 |
|
766 |
|
765 |
- |
|
|