summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorjeff <jeff>2009-06-29 14:45:27 +0000
committerjeff <jeff>2009-06-29 14:45:27 +0000
commit5571989e5ca4e76951caed237d07e51ffaed71a3 (patch)
tree8869900b2575e88585f28b24079cf75740febf6d /bin
parente49700a33746088e547b9333025e2a8dc185ec7c (diff)
show total number of payments
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cust_pay_histogram3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/cust_pay_histogram b/bin/cust_pay_histogram
index d43a4d162..714b32140 100755
--- a/bin/cust_pay_histogram
+++ b/bin/cust_pay_histogram
@@ -34,7 +34,9 @@ my @payrow = qsearch( { table => 'cust_pay',
);
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 " UNTIL $opt{e}" if $opt{e};
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 ) {