<%
- my $statement = "SELECT SUM(amount) from cust_pay_batch";
+ my $statement = "SELECT SUM(amount) from cust_pay_batch WHERE batchnum=".
+ $batchnum;
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_statement = "SELECT COUNT(*) from cust_pay_batch WHERE batchnum=".
+ $batchnum;
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
+$<%= sprintf("%.2f", $total) %> total in batch
<%= &table() %>
@@ -45,11 +60,12 @@ $<%= sprintf("%.2f", $total) %> total in pending batch