X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=reports%2Fissues_stats.pl;h=3c1ba1facb18efe5c156aa8d8986c081317fe66a;hb=dde66129aa419b45bf8dcb9f3fff2690f30ec99b;hp=25d2278993009355d51cb2e3dd81dd445c3c3675;hpb=bab92d51e56ade24c89087ded6163ffa43f53915;p=koha_ffzg diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 25d2278993..3c1ba1facb 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -17,8 +17,7 @@ # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use Date::Manip; @@ -34,6 +33,7 @@ use C4::Members; use Koha::AuthorisedValues; use Koha::DateUtils; +use Koha::ItemTypes; use C4::Members::AttributeTypes; =head1 NAME @@ -87,11 +87,12 @@ $sep = "\t" if ($sep eq 'tabulation'); $template->param(do_it => $do_it, ); -our $itemtypes = GetItemTypes(); +our $itemtypes = Koha::ItemTypes->search_with_localization->unblessed; + our @patron_categories = Koha::Patron::Categories->search_limited({}, {order_by => ['description']}); -my $locations = { map { ( $_->authorised_value => $_->lib ) } Koha::AuthorisedValues->search_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) }; -my $ccodes = { map { ( $_->authorised_value => $_->lib ) } Koha::AuthorisedValues->search_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' }, { order_by => ['description'] } ) }; +our $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) }; +our $ccodes = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' }, { order_by => ['description'] } ) }; our $Bsort1 = GetAuthorisedValues("Bsort1"); our $Bsort2 = GetAuthorisedValues("Bsort2"); @@ -135,6 +136,12 @@ if ($do_it) { print map { $_->{value} . $sep } @$x; print $line->{totalrow}, "\n"; } + + # footer + print "TOTAL"; + $cols = @$results[0]->{loopfooter}; + print map {$sep.$_->{totalcol}} @$cols; + print $sep.@$results[0]->{total}; } exit; } @@ -145,12 +152,6 @@ my @values; my %labels; my %select; -# create itemtype arrayref for