koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/reports borrowers_stats.pl


From: passini
Subject: [Koha-cvs] koha/reports borrowers_stats.pl
Date: Thu, 21 Jun 2007 15:43:43 -0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Changes by:     passini <hpassini>      07/06/21 15:43:39

Modified files:
        reports        : borrowers_stats.pl 

Log message:
        add zipcode list and bsort1 list

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/reports/borrowers_stats.pl?cvsroot=koha&r1=1.15&r2=1.16

Patches:
Index: borrowers_stats.pl
===================================================================
RCS file: /cvsroot/koha/koha/reports/borrowers_stats.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- borrowers_stats.pl  14 Jun 2007 15:37:50 -0000      1.15
+++ borrowers_stats.pl  21 Jun 2007 15:43:39 -0000      1.16
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: borrowers_stats.pl,v 1.15 2007/06/14 15:37:50 hpassini Exp $
+# $Id: borrowers_stats.pl,v 1.16 2007/06/21 15:43:39 hpassini Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -28,6 +28,7 @@
 use C4::Acquisition;
 use C4::Output;
 use C4::Circulation;
+use C4::Input;
 
 =head1 NAME
 
@@ -132,21 +133,41 @@
             );
     push @branchloop, \%row;
 }
+       $req = $dbh->prepare( "select distinctrow zipcode from borrowers order 
by zipcode");
+       $req->execute;
+       my @select_zipcode;
+       push @select_zipcode,"";
+       while (my ($value) =$req->fetchrow) {
+               if ($value) {
+                       push @select_zipcode, $value;
+               }
+       }
+# 
+       my $CGIZipCode=CGI::scrolling_list( -name     => 'Filter',
+                               -id => 'Filter',
+                               -values   => address@hidden,
+                               -size     => 1,
+                               -multiple => 0 );
        
-       $req = $dbh->prepare( "select distinctrow sort1 from borrowers order by 
sort1");
+       $req = $dbh->prepare( "SELECT authorised_value,lib FROM 
authorised_values WHERE category='Bsort1' order by lib");
        $req->execute;
        my @select_sort1;
+       my %select_sort1;
        push @select_sort1,"";
+       $select_sort1{""}="";
        my $hassort1;
-       while (my ($value) =$req->fetchrow) {
-               if ($value) {
+       while (my ($auth_value,$lib) =$req->fetchrow) {
+               if ($auth_value) {
                        $hassort1=1;
-                       push @select_sort1, $value;
+                       push @select_sort1, $auth_value;
+                       $select_sort1{$auth_value}=$lib
                }
        }
+# 
        my $CGIsort1=CGI::scrolling_list( -name     => 'Filter',
                                -id => 'Filter',
                                -values   => address@hidden,
+                               -labels =>\%select_sort1,
                                -size     => 1,
                                -multiple => 0 );
        
@@ -186,7 +207,9 @@
                                -values   => address@hidden,
                                -size     => 1,
                                -multiple => 0 );
+
        $template->param(               CGICatCode => $CGICatCode,
+                                       CGIZipCode => $CGIZipCode,
                                        CGISort1 => $CGIsort1,
                                        hassort1 => $hassort1,
                                        CGISort2 => $CGIsort2,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]