summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-12-22 21:37:05 +0000
committerivan <ivan>2003-12-22 21:37:05 +0000
commit3e334bcc6999b65067251efe54ca2b68ddd7b38a (patch)
tree2b9f31e426326a6363190d5de743c59b65017f29
parent2ee3a78a58063d46ec871e19cdc6edc15fedb9e9 (diff)
add total cards & amount to pending batch screen
-rwxr-xr-xhttemplate/browse/cust_pay_batch.cgi18
1 files changed, 17 insertions, 1 deletions
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 <SELECT NAME="format">
<OPTION VALUE="csv-td_canada_trust-merchant_pc_batch">CSV results from TD Canada Trust Merchant PC Batch</OPTION>
</SELECT><BR>
<INPUT TYPE="submit" VALUE="Upload"></FORM>
-<BR><BR>
+<BR>
+
+<%
+ 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<BR>
+$<%= sprintf("%.2f", $total) %> total in pending batch<BR>
+<BR>
<%= &table() %>
<TR>
<TH>#</TH>