[freeside-commits] freeside/bin cust_pay_histogram,1.1,1.2

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Jun 29 07:45:29 PDT 2009


Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv23878

Modified Files:
	cust_pay_histogram 
Log Message:
show total number of payments

Index: cust_pay_histogram
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/cust_pay_histogram,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cust_pay_histogram	29 Jun 2009 13:55:39 -0000	1.1
+++ cust_pay_histogram	29 Jun 2009 14:45:27 -0000	1.2
@@ -34,7 +34,9 @@
                     );
 
 my $max = 0;
+my $sum = 0;
 foreach (@payrow) {
+  $sum += $_->quantity;
   $max = $_->quantity if $_->quantity > $max;
 }
 my $scale = int($max/60) + 1;
@@ -45,6 +47,7 @@
 print " VIA $opt{p}" if $opt{p};
 print " BY AGENT $opt{a}" if $opt{a};
 print "\n\n";
+print "Total number of payments: $sum\n\n";
 print "(each * represents $scale)\n\n" if $scale > 1;
 
 foreach my $payrow ( @payrow ) {



More information about the freeside-commits mailing list