X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=reports%2Fissues_stats.pl;h=3c1ba1facb18efe5c156aa8d8986c081317fe66a;hb=2578b9469141a4f0c7f24b4fd5743fa2ce4fbca2;hp=42413937a3fdee5eebeabfd90ef58ea55eac57ef;hpb=ca81da74c4c3a20c1b9c6d68155f4077d3602aee;p=koha.git diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 42413937a3..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,7 +87,8 @@ $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']}); our $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) }; @@ -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