use C4::Output;
use C4::Reports;
use C4::Members;
+use Koha::AuthorisedValues;
use Koha::DateUtils;
use Koha::Libraries;
use Koha::Patron::Categories;
my $itemtypes = GetItemTypes();
my @patron_categories = Koha::Patron::Categories->search_limited({}, {order_by => ['description']});
-my $ccodes = GetKohaAuthorisedValues("items.ccode");
-my $locations = GetKohaAuthorisedValues("items.location");
-my $authvalue = GetKohaAuthorisedValues("items.authvalue");
+my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) };
+my $ccodes = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' }, { order_by => ['description'] } ) };
my $Bsort1 = GetAuthorisedValues("Bsort1");
my $Bsort2 = GetAuthorisedValues("Bsort2");
}
sub display_value {
my ( $crit, $value ) = @_;
- my $ccodes = GetKohaAuthorisedValues("items.ccode");
- my $locations = GetKohaAuthorisedValues("items.location");
+ my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) };
+ my $ccodes = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' }, { order_by => ['description'] } ) };
my $itemtypes = GetItemTypes();
- my $authvalue = GetKohaAuthorisedValues("items.authvalue");
my $Bsort1 = GetAuthorisedValues("Bsort1");
my $Bsort2 = GetAuthorisedValues("Bsort2");
my $display_value =