| Lines 56-75
          if($itemnumber) {
      
      
        Link Here | 
        
          | 56 |     } | 56 |     } | 
        
          | 57 |  | 57 |  | 
        
          | 58 |     my $av; | 58 |     my $av; | 
          
            
              | 59 |     $av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.notforloan', authorised_value => $item->{notforloan} }); | 59 |     $av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.notforloan', authorised_value => $item->{notforloan} }); | 
            
              | 60 |     $item->{notforloan} = $av->count ? $av->next->lib : ''; | 60 |     $item->{notforloan} = $av ? $av->lib : ''; | 
        
          | 61 |  | 61 |  | 
          
            
              | 62 |     $av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.restricted', authorised_value => $item->{restricted} }); | 62 |     $av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.restricted', authorised_value => $item->{restricted} }); | 
            
              | 63 |     $item->{restricted} = $av->count ? $av->next->lib : ''; | 63 |     $item->{restricted} = $av ? $av->lib : ''; | 
        
          | 64 |  | 64 |  | 
          
            
              | 65 |     $av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.location', authorised_value => $item->{location} }); | 65 |     $av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.location', authorised_value => $item->{location} }); | 
            
              | 66 |     $item->{location} = $av->count ? $av->next->lib : ''; | 66 |     $item->{location} = $av ? $av->lib : ''; | 
        
          | 67 |  | 67 |  | 
          
            
              | 68 |     $av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.collection', authorised_value => $item->{collection} }); | 68 |     $av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.collection', authorised_value => $item->{collection} }); | 
            
              | 69 |     $item->{collection} = $av->count ? $av->next->lib : ''; | 69 |     $item->{collection} = $av ? $av->lib : ''; | 
        
          | 70 |  | 70 |  | 
          
            
              | 71 |     $av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => $item->{materials} }); | 71 |     $av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => $item->{materials} }); | 
            
              | 72 |     $item->{materials} = $av->count ? $av->next->lib : ''; | 72 |     $item->{materials} = $av ? $av->lib : ''; | 
        
          | 73 |  | 73 |  | 
        
          | 74 |     my $itemtype = getitemtypeinfo($item->{itype}); | 74 |     my $itemtype = getitemtypeinfo($item->{itype}); | 
        
          | 75 |     $item->{itemtype} = $itemtype->{description}; | 75 |     $item->{itemtype} = $itemtype->{description}; |