From b541a7851e891c8fb8150ba930c90600a4c68465 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 16 Jul 2003 16:01:39 +0000 Subject: [PATCH] show totals in payment report --- httemplate/search/cust_pay.cgi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi index 7a983703f..0f7b7b791 100755 --- a/httemplate/search/cust_pay.cgi +++ b/httemplate/search/cust_pay.cgi @@ -72,6 +72,7 @@ if (0) { END my(%saw, $cust_pay); + my $tot_amount = 0; foreach my $cust_pay ( sort $sortby grep(!$saw{$_->paynum}++, @cust_pay) ) { @@ -83,6 +84,7 @@ END sprintf("%.2f", $cust_pay->paid), $cust_pay->_date, ); + $tot_amount += $amount; my $pdate = time2str("%b %d %Y", $date); my $rowspan = 1; @@ -127,7 +129,11 @@ END print ""; } - print <
'. table(). <                Total
Amount + \$$tot_amount -- 2.11.0