From: ivan Date: Mon, 22 Dec 2003 21:37:04 +0000 (+0000) Subject: add total cards & amount to pending batch screen X-Git-Tag: NET_WHOIS_RAW_0_31~218 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2c0d7675caacd5891b7f699c92260d321b4d03b5 add total cards & amount to pending batch screen --- diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index d90a03313..3420e97b6 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -14,8 +14,24 @@ Format
-

+
+ +<% + my $statement = "SELECT SUM(amount) from cust_pay_batch"; + my $sth = dbh->prepare($statement) or die dbh->errstr. "doing $statement"; + $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; + my $total = $sth->fetchrow_arrayref->[0]; + + my $c_statement = "SELECT COUNT(*) from cust_pay_batch"; + my $c_sth = dbh->prepare($c_statement) + or die dbh->errstr. "doing $c_statement"; + $c_sth->execute or die "Error executing \"$c_statement\": ". $c_sth->errstr; + my $cards = $c_sth->fetchrow_arrayref->[0]; +%> +<%= $cards %> credit card payments batched
+$<%= sprintf("%.2f", $total) %> total in pending batch
+
<%= &table() %> #