summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main.cgi
diff options
context:
space:
mode:
authorivan <ivan>2001-12-21 21:40:24 +0000
committerivan <ivan>2001-12-21 21:40:24 +0000
commitc00273147a2d400779fcdaf34f171b2180faa453 (patch)
treecf8b9a0a245162d5493144c94ed88ba86056c8d8 /httemplate/view/cust_main.cgi
parent29a315f2dc4187e5558315f76c3d27d11e287620 (diff)
add name/address to post payment screen
get rid of some $-0.00 yay for ieee fp
Diffstat (limited to 'httemplate/view/cust_main.cgi')
-rwxr-xr-xhttemplate/view/cust_main.cgi6
1 files changed, 4 insertions, 2 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index d43575a9a..b17c9277a 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,5 +1,5 @@
<%
-#<!-- $Id: cust_main.cgi,v 1.14 2001-10-30 14:54:07 ivan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.15 2001-12-21 21:40:24 ivan Exp $ -->
use strict;
use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral
@@ -470,6 +470,8 @@ foreach $item (sort keyfield_numerically @history) {
$refund ||= 0;
$balance += $charge - $payment;
$balance -= $credit - $refund;
+ $balance = sprintf("%.2f", $balance);
+ $balance =~ s/^\-0\.00$/0.00/; #yay ieee fp
print "<TR><TD><FONT SIZE=-1>",time2str("%D",$date),"</FONT></TD>",
"<TD><FONT SIZE=-1>$desc</FONT></TD>",
@@ -485,7 +487,7 @@ foreach $item (sort keyfield_numerically @history) {
"<TD><FONT SIZE=-1>",
( $refund ? "\$".sprintf("%.2f",$refund) : '' ),
"</FONT></TD>",
- "<TD><FONT SIZE=-1>\$" . sprintf("%.2f",$balance),
+ "<TD><FONT SIZE=-1>\$" . $balance,
"</FONT></TD>",
"\n";
}