From 06434f1a30319977c4af119eb874cb20819d3641 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 21 Nov 2017 14:01:39 +0000 Subject: [PATCH] Bug 19671: Map itemtypes to hash for correct display in issues_stats.pl To test: 1 - Run the circulation wizard with itemtypes as columns, shelving locations as rows - display on screen 2 - Note all itemtype values are blank 3 - Switch rows/columns - same issue 4 - Apply patch 5 - Re-run reports 6 - Itemtypes should diplsay correctly --- reports/issues_stats.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 75c54ba..d0b74b5 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -88,6 +88,8 @@ $sep = "\t" if ($sep eq 'tabulation'); $template->param(do_it => $do_it, ); +our $itemtypes = { map { $_->{itemtype} => $_ } @{ 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'] } ) }; @@ -151,9 +153,6 @@ my @values; my %labels; my %select; -# create itemtype arrayref for