projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ded0451
)
show totals in payment report
author
ivan
<ivan>
Wed, 16 Jul 2003 16:01:39 +0000
(16:01 +0000)
committer
ivan
<ivan>
Wed, 16 Jul 2003 16:01:39 +0000
(16:01 +0000)
httemplate/search/cust_pay.cgi
patch
|
blob
|
history
diff --git
a/httemplate/search/cust_pay.cgi
b/httemplate/search/cust_pay.cgi
index
7a98370
..
0f7b7b7
100755
(executable)
--- a/
httemplate/search/cust_pay.cgi
+++ b/
httemplate/search/cust_pay.cgi
@@
-72,6
+72,7
@@
if (0) {
END
my(%saw, $cust_pay);
END
my(%saw, $cust_pay);
+ my $tot_amount = 0;
foreach my $cust_pay (
sort $sortby grep(!$saw{$_->paynum}++, @cust_pay)
) {
foreach my $cust_pay (
sort $sortby grep(!$saw{$_->paynum}++, @cust_pay)
) {
@@
-83,6
+84,7
@@
END
sprintf("%.2f", $cust_pay->paid),
$cust_pay->_date,
);
sprintf("%.2f", $cust_pay->paid),
$cust_pay->_date,
);
+ $tot_amount += $amount;
my $pdate = time2str("%b %d %Y", $date);
my $rowspan = 1;
my $pdate = time2str("%b %d %Y", $date);
my $rowspan = 1;
@@
-127,7
+129,11
@@
END
print "</TR>";
}
print "</TR>";
}
- print <<END;
+
+ $tot_amount = sprintf("%.2f", $tot_amount);
+ print '</TABLE><BR>'. table(). <<END;
+ <TR><TD> </TD><TH>Total<BR>Amount</TH></TR>
+ <TR><TD><TD ALIGN="right">\$$tot_amount</TD></TR>
</TABLE>
</BODY>
</HTML>
</TABLE>
</BODY>
</HTML>