X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=reports%2Freserves_stats.pl;h=79dd39190e1af640eff2a46542521e6e04315011;hb=c5a758d9a06dba412a8564c8574c68eebf0b6ff8;hp=fe1d73c3700967a34beaf2b604587dfb79cc233e;hpb=f66cc4dfcca243e6210c3323586efbfbd6cfe0cd;p=koha.git diff --git a/reports/reserves_stats.pl b/reports/reserves_stats.pl index fe1d73c370..79dd39190e 100755 --- a/reports/reserves_stats.pl +++ b/reports/reserves_stats.pl @@ -30,6 +30,7 @@ use C4::Koha; use C4::Output; use C4::Reports; use C4::Members; +use Koha::AuthorisedValues; use Koha::DateUtils; use Koha::Libraries; use Koha::Patron::Categories; @@ -83,9 +84,8 @@ $template->param(do_it => $do_it, 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"); @@ -330,10 +330,9 @@ sub null_to_zzempty ($) { } 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 =