| Lines 305-312
          sub filter_by_available {
      
      
        Link Here | 
        
          | 305 |             withdrawn       => 0, | 305 |             withdrawn       => 0, | 
        
          | 306 |             damaged         => 0, | 306 |             damaged         => 0, | 
        
          | 307 |             notforloan      => { '<='    => 0 }, | 307 |             notforloan      => { '<='    => 0 }, | 
            
              | 308 |             'me.itype'      => { -not_in => \@item_types_notforloan }, |  |  | 
        
          | 309 |             restricted      => [ { '!=' => 0 }, undef ], | 308 |             restricted      => [ { '!=' => 0 }, undef ], | 
            
              |  |  | 309 |             'me.itype'      => { -not_in => \@item_types_notforloan }, | 
        
          | 310 |         } | 310 |         } | 
        
          | 311 |     ); | 311 |     ); | 
        
          | 312 | } | 312 | } | 
  
    | Lines 599-605
          sub search {
      
      
        Link Here | 
        
          | 599 |         } | 599 |         } | 
        
          | 600 |         if ( $status eq 'not_for_loan' ) { | 600 |         if ( $status eq 'not_for_loan' ) { | 
        
          | 601 |             my @item_types_notforloan = Koha::ItemTypes->search( { notforloan => { '!=' => 0 } } )->get_column('itemtype'); | 601 |             my @item_types_notforloan = Koha::ItemTypes->search( { notforloan => { '!=' => 0 } } )->get_column('itemtype'); | 
          
            
              | 602 |             $self = $self->search( [ { notforloan => { '<=' => 0 } }, { 'me.itype' => \@item_types_notforloan } ] ); | 602 |             $self = $self->search( [ { notforloan => { '>' => 0 } }, { 'me.itype' => \@item_types_notforloan } ] ); | 
        
          | 603 |         } | 603 |         } | 
        
          | 604 |         if ( $status eq 'on_hold' ) { | 604 |         if ( $status eq 'on_hold' ) { | 
        
          | 605 |             $self = $self->filter_by_has_holds; | 605 |             $self = $self->filter_by_has_holds; | 
  
    | Lines 613-622
          sub search {
      
      
        Link Here | 
        
          | 613 |         } | 613 |         } | 
        
          | 614 |  | 614 |  | 
        
          | 615 |         if ( $status eq 'restricted' ) { | 615 |         if ( $status eq 'restricted' ) { | 
          
            
              | 616 |             $self = $self->search( { restricted => [ { '!=' => 0 }, undef ] } ); | 616 |             $self = $self->search( { restricted => [ { '!=' => 0 } ] } ); | 
        
          | 617 |         } | 617 |         } | 
        
          | 618 |     } | 618 |     } | 
            
              | 619 |  |  |  | 
        
          | 620 |     return $self->SUPER::search( $params, $attributes ); | 619 |     return $self->SUPER::search( $params, $attributes ); | 
        
          | 621 | } | 620 | } | 
        
          | 622 |  | 621 |  | 
            
              | 623 | -  |  |  |