Fixes alphabetization for the item type, library and collection drop-down lists 
in the Checkout Statistics wizard form.
---
 reports/issues_stats.pl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl
index 63ea68e..11ecc77 100755
--- a/reports/issues_stats.pl
+++ b/reports/issues_stats.pl
@@ -133,13 +133,13 @@ my %select;
 
 # create itemtype arrayref for <select>.
 my @itemtypeloop;
-for my $itype ( keys(%$itemtypes)) {
+for my $itype ( sort {$itemtypes->{$a}->{description} cmp 
$itemtypes->{$b}->{description}} keys(%$itemtypes)) {
        push @itemtypeloop, { code => $itype , description => 
$itemtypes->{$itype}->{description} } ;
 }
 
 my $branches=GetBranches();
 my @branchloop;
-foreach (keys %$branches) {
+foreach (sort {$branches->{$a}->{'branchname'} cmp 
$branches->{$b}->{'branchname'}} keys %$branches) {
        my $thisbranch = ''; # FIXME 
        my %row = (
                branchcode => $_,
@@ -157,7 +157,7 @@ foreach (sort keys %$locations) {
 }
     
 my @ccodes;
-foreach (keys %$ccodes) {
+foreach (sort {$ccodes->{$a} cmp $ccodes->{$b}} keys %$ccodes) {
        push @ccodes, { code => $_, description => $ccodes->{$_} };
 }
 
-- 
1.5.6.5

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to