koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha stats.pl [dev_week]


From: Joshua Ferraro
Subject: [Koha-cvs] koha stats.pl [dev_week]
Date: Tue, 11 Jul 2006 13:57:45 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Joshua Ferraro <kados>  06/07/11 13:57:45

Modified files:
        .              : stats.pl 

Log message:
        sync with rel_2_2

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/stats.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.10.4.3&r2=1.10.4.3.2.1

Patches:
Index: stats.pl
===================================================================
RCS file: /sources/koha/koha/Attic/stats.pl,v
retrieving revision 1.10.4.3
retrieving revision 1.10.4.3.2.1
diff -u -b -r1.10.4.3 -r1.10.4.3.2.1
--- stats.pl    5 Feb 2006 21:59:21 -0000       1.10.4.3
+++ stats.pl    11 Jul 2006 13:57:45 -0000      1.10.4.3.2.1
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: stats.pl,v 1.10.4.3 2006/02/05 21:59:21 kados Exp $
+# $Id: stats.pl,v 1.10.4.3.2.1 2006/07/11 13:57:45 kados Exp $
 
 #written 14/1/2000
 #script to display reports
@@ -78,10 +78,10 @@
 my $oldtime;
 my $totalw=0;
 my @loop;
-my %row;
 my $i=0;
+# parse all lines for today
 while ($i<$count){
-       warn " pay : ".$payments[$i]{'timestamp'};
+#      warn " pay : ".$payments[$i]{'timestamp'};
        my $time=$payments[$i]{'datetime'};
        my $payments=$payments[$i]{'value'};
        my $charge=0;
@@ -95,13 +95,14 @@
        my $temptotalren=0;
        my $temptotalw=0;
        for (my $i2=0;$i2<$count;$i2++){
+#      warn "I2 : $i2 i=$i";
                $charge+=$charges[$i2]->{'amount'};
-               %row = ( name   => $charges[$i2]->{'description'},
-                                       type   => 
$charges[$i2]->{'accounttype'},
-                                       time   => $charges[$i2]->{'timestamp'},
-                                       amount => $charges[$i2]->{'amount'},
-                                       branch => 
$charges[$i2]->{'amountoutstanding'} );
-               push(@loop, \%row);
+#              %row = ( name   => $charges[$i2]->{'description'},
+#                                      type   => 
$charges[$i2]->{'accounttype'},
+#                                      time   => $charges[$i2]->{'timestamp'},
+#                                      amount => $charges[$i2]->{'amount'},
+#                                      branch => 
$charges[$i2]->{'amountoutstanding'} );
+#              push(@loop, \%row);
                if ($payments[$i]{'accountytpe'} ne 'W'){
                        if ($charges[$i2]->{'accounttype'} eq 'Rent'){
                                
$temptotalr+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
@@ -139,10 +140,10 @@
                        $payments[$i]{'amount'}=$payments[$i]{'amount'}*-1;
                        $total+=$payments[$i]{'amount'};
                }
-
-               %row = ( name   => 
"<b>".$payments[$i]{'firstname'}.$payments[$i]{'surname'} . "</b>",
+               my %row = ( name   => "<b>".$payments[$i]{'firstname'}.' 
'.$payments[$i]{'surname'} . "</b>",
                                        type   => $payments[$i]{'accounttype'}, 
time   => $payments[$i]{'date'},
-                                       amount => $payments[$i]{'amount'}, 
branch => $branch );
+                                       amount => $payments[$i]{'amount'}, 
branch => $branch,
+                                       description =>  
$payments[$i]{'description'});
                push(@loop, \%row);
                $oldtype=$payments[$i]{'accounttype'};
                $oldtime=$payments[$i]{'timestamp'};




reply via email to

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