use C4::Koha;
use C4::Members;
+use Koha::AuthorisedValues;
+
###############################################
# Getting state
$item{'itemtype'} = $iteminformation->{'itemtype'};
$item{'ccode'} = $iteminformation->{'ccode'};
$item{'itemcallnumber'} = $iteminformation->{'itemcallnumber'};
- $item{'location'} = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'});
+ my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $iteminformation->{location} });
+ $item{'location'} = $av->count ? $av->next->lib : '';
# }
$item{counter} = 0;
$item{barcode} = $barcode;
$item{'itemtype'} = $iteminformation->{'itemtype'};
$item{'ccode'} = $iteminformation->{'ccode'};
$item{'itemcallnumber'} = $iteminformation->{'itemcallnumber'};
- $item{'location'} = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'});
+ my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $iteminformation->{location} });
+ $item{'location'} = $av->count ? $av->next->lib : '';
push( @trsfitemloop, \%item );
}