little fixes for update_child feature.
[koha_fer] / reports / borrowers_stats.pl
index 1911352..2f2cff1 100755 (executable)
@@ -1,7 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
-
 # Copyright 2000-2002 Katipo Communications
 #
 # This file is part of Koha.
@@ -25,6 +23,7 @@ use C4::Auth;
 use C4::Context;
 use C4::Branch; # GetBranches
 use C4::Koha;
+use C4::Dates;
 use C4::Acquisition;
 use C4::Output;
 use C4::Circulation;
@@ -120,7 +119,7 @@ if ($do_it) {
                $select_catcode{$catcode} = $description;
        }
        my $CGICatCode=CGI::scrolling_list( -name     => 'Filter',
-                               -id => 'Filter',
+                               -id => 'catcode',
                                -values   => \@select_catcode,
                                -labels   => \%select_catcode,
                                -size     => 1,
@@ -133,7 +132,7 @@ my @select_branch;
 #my %select_branches;
 push @select_branch,"";
 #$select_branches{""}="";
-foreach my $thisbranch (keys %$branches) {
+foreach my $thisbranch (sort keys %$branches) {
        push @select_branch,$thisbranch;
    # my $selected = 1 if $thisbranch eq $branch;
     my %row =(value => $thisbranch,
@@ -143,7 +142,7 @@ foreach my $thisbranch (keys %$branches) {
     push @branchloop, \%row;
 }
     my $CGIBranch=CGI::scrolling_list( -name     => 'Filter',
-                             -id => 'Filter',
+                             -id => 'branch',
                              -values   => \@select_branch,
 #                             -labels   => \%select_branches,
                              -size     => 1,
@@ -161,7 +160,7 @@ foreach my $thisbranch (keys %$branches) {
        }
 # 
        my $CGIZipCode=CGI::scrolling_list( -name     => 'Filter',
-                               -id => 'Filter',
+                               -id => 'zipcode',
                                -values   => \@select_zipcode,
                                -size     => 1,
                                -multiple => 0 );
@@ -183,7 +182,7 @@ foreach my $thisbranch (keys %$branches) {
        }
 # 
        my $CGIsort1=CGI::scrolling_list( -name     => 'Filter',
-                               -id => 'Filter',
+                               -id => 'sort1',
                                -values   => \@select_sort1,
                                -labels =>\%select_sort1,
                                -size     => 1,
@@ -201,7 +200,7 @@ foreach my $thisbranch (keys %$branches) {
                }
        }
        my $CGIsort2=CGI::scrolling_list( -name     => 'Filter',
-                               -id => 'Filter',
+                               -id => 'sort2',
                                -values   => \@select_sort2,
                                -size     => 1,
                                -multiple => 0 );
@@ -228,16 +227,15 @@ foreach my $thisbranch (keys %$branches) {
 
        $template->param(               CGICatCode => $CGICatCode,
                                        CGIZipCode => $CGIZipCode,
-#                                      CGIBranch => $CGIBranch,
                                        CGISort1 => $CGIsort1,
                                        hassort1 => $hassort1,
                                        CGISort2 => $CGIsort2,
                                        hassort2 => $hassort2,
                                        CGIextChoice => $CGIextChoice,
                                        CGIsepChoice => $CGIsepChoice,
-                                       CGIBranch => $CGIBranch
-#                                      CGIBranch => \@branchloop
-                                       );
+                                       CGIBranch => $CGIBranch,
+                                       DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+                    );
 
 }
 output_html_with_http_headers $input, $cookie, $template->output;