| Lines 63-69
          use C4::External::Syndetics qw(
      
      
        Link Here | 
        
          | 63 | use C4::Members; | 63 | use C4::Members; | 
        
          | 64 | use C4::XSLT qw( XSLTParse4Display ); | 64 | use C4::XSLT qw( XSLTParse4Display ); | 
        
          | 65 | use C4::ShelfBrowser qw( GetNearbyItems ); | 65 | use C4::ShelfBrowser qw( GetNearbyItems ); | 
          
            
              | 66 | use C4::Reserves qw( GetReserveStatus ); | 66 | use C4::Reserves qw( GetReserveStatus IsAvailableForItemLevelRequest CanBookBeReserved ); | 
        
          | 67 | use C4::Charset qw( SetUTF8Flag ); | 67 | use C4::Charset qw( SetUTF8Flag ); | 
        
          | 68 | use MARC::Field; | 68 | use MARC::Field; | 
        
          | 69 | use List::MoreUtils qw( any ); | 69 | use List::MoreUtils qw( any ); | 
  
    | Lines 698-704
          if ( C4::Context->preference('OPACAcquisitionDetails' ) ) {
      
      
        Link Here | 
        
          | 698 |     }; | 698 |     }; | 
        
          | 699 | } | 699 | } | 
        
          | 700 |  | 700 |  | 
          
            
              | 701 | my $allow_onshelf_holds; | 701 | my $is_available; | 
        
          | 702 | my ( $itemloop_has_images, $otheritemloop_has_images ); | 702 | my ( $itemloop_has_images, $otheritemloop_has_images ); | 
        
          | 703 | if ( not $viewallitems and @items > $max_items_to_display ) { | 703 | if ( not $viewallitems and @items > $max_items_to_display ) { | 
        
          | 704 |     $template->param( | 704 |     $template->param( | 
  
    | Lines 711-718
          if ( not $viewallitems and @items > $max_items_to_display ) {
      
      
        Link Here | 
        
          | 711 |     $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} }; | 711 |     $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} }; | 
        
          | 712 |     $itm->{priority} = $priority{ $itm->{itemnumber} }; | 712 |     $itm->{priority} = $priority{ $itm->{itemnumber} }; | 
        
          | 713 |  | 713 |  | 
          
            
              | 714 |     $allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => $patron } ) | 714 |     $is_available = IsAvailableForItemLevelRequest($item, $patron, $currentbranch) | 
            
              | 715 |       unless $allow_onshelf_holds; | 715 |       unless $is_available; | 
        
          | 716 |  | 716 |  | 
        
          | 717 |     # get collection code description, too | 717 |     # get collection code description, too | 
        
          | 718 |     my $ccode = $itm->{'ccode'}; | 718 |     my $ccode = $itm->{'ccode'}; | 
  
    | Lines 776-782
          if ( not $viewallitems and @items > $max_items_to_display ) {
      
      
        Link Here | 
        
          | 776 |   } | 776 |   } | 
        
          | 777 | } | 777 | } | 
        
          | 778 |  | 778 |  | 
          
            
              | 779 | if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { | 779 | my $canReserve = CanBookBeReserved($borrowernumber, $biblionumber, $currentbranch); | 
            
              |  |  | 780 | if ( $canReserve->{status} eq "OK" && $is_available) { | 
        
          | 780 |     $template->param( ReservableItems => 1 ); | 781 |     $template->param( ReservableItems => 1 ); | 
        
          | 781 | } | 782 | } | 
        
          | 782 |  | 783 |  | 
            
              | 783 | -  |  |  |