[Koha-cvs] CVS: koha stats.print.pl,1.1,1.2

Mason James szrj1m at users.sourceforge.net
Mon Aug 22 02:37:14 CEST 2005


Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9386

Modified Files:
	stats.print.pl 
Log Message:
Removed unneeded modules.


Index: stats.print.pl
===================================================================
RCS file: /cvsroot/koha/koha/stats.print.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** stats.print.pl	22 Aug 2005 00:21:41 -0000	1.1
--- stats.print.pl	22 Aug 2005 00:37:11 -0000	1.2
***************
*** 1,15 ****
  #!/usr/bin/perl
  
- #things to do
- 
- # First sort by branch
- #Then sort by surname
- 
- #_Branch_:  Could we have Levin displaying as L, please, not C__
- 
- #_Totals_ :
- #*Total Paid *
- #*Total written off*
- #*Total credits (which will include manual credits and credits for lost books returned*
  
  #use strict;
--- 1,4 ----
***************
*** 22,44 ****
  use Date::Manip;
  use C4::Stats;
- use Data::Dumper;
  
- use Text::CSV_XS;
  
- my $csv = Text::CSV_XS->new(
-     {
-         'quote_char'   => '"',
-         'escape_char'  => '"',
-         'sep_char'     => ',',
-         'binary'       => 1,
-         'always_quote' => 1,
-     }
- );
  
  my $input=new CGI;
  
- #my $time=$input->param('time');
- #my $time="month";
- #my $time="today";
  
  my $date;
--- 11,19 ----
***************
*** 67,78 ****
  }
  
! #my $date=UnixDate($date,'%Y-%m-%d');
! #my $date2=UnixDate($date2,'%Y-%m-%d');
  
- my $date="2005-08-19";
- my $date2="2005-08-20";
- 
- #my $date="2005-01-05";
- #my $date2="2005-01-06";
  
  #get a list of every payment
--- 42,48 ----
  }
  
! my $date=UnixDate($date,'%Y-%m-%d');
! my $date2=UnixDate($date2,'%Y-%m-%d');
  
  
  #get a list of every payment
***************
*** 98,104 ****
--- 68,76 ----
             $totalcharges++;
             $count=@charges;
+ 
             # getting each of the charges and putting them into a array to be printed out
             #this loops per charge per person
             for (my $i2=0;$i2<$count;$i2++){
+ 
                 my $hour=substr($payments[$i]{'timestamp'},8,2);
                 my $min=substr($payments[$i]{'timestamp'},10,2);
***************
*** 107,110 ****
--- 79,83 ----
                 my $time2="$payments[$i]{'date'}";
                 my $branch=Getpaidbranch($time2,$payments[$i]{'borrowernumber'});
+ 
                 my @rows1 = ($branch,          # lets build up a row
                              $payments[$i]->{'datetime'},
***************
*** 116,119 ****
--- 89,93 ----
                              $payments[$i]->{'type'},
                              $payments[$i]->{'value'});
+ 
                 push (@loop1, \@rows1);
             }
***************
*** 125,135 ****
  }
  
- 
- 
  #get credits and append to the bottom of payments
  my @credits=getcredits($date,$date2);
  
- #print Dumper(@credits);
- 
  my $count=@credits;
  my $i=0;
--- 99,105 ----
***************
*** 146,150 ****
  
         push (@loop2, \@rows2);
!        $i++; #increment the while loop
         $totalcredits = $totalcredits + $credits[$i]->{'amount'};
         ;
--- 116,120 ----
  
         push (@loop2, \@rows2);
!        $i++;
         $totalcredits = $totalcredits + $credits[$i]->{'amount'};
         ;
***************
*** 152,160 ****
  }
  #takes off first char minus sign "-100.00"
- 
- 
  $totalcredits = substr($totalcredits, 1);
  
- 
  print $input->header(
      -type       => 'application/vnd.ms-excel',
--- 122,127 ----





More information about the Koha-cvs mailing list