diff options
author | ivan <ivan> | 2006-08-23 22:25:39 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-08-23 22:25:39 +0000 |
commit | 3ce7691203a7737406bf2d4442f7fd84b81f847e (patch) | |
tree | 90658b097da96772224f04771888ac6ca1a940aa /httemplate/browse/cust_pay_batch.cgi | |
parent | 15e561850b61b10a92a46d8f3e316d53d4970087 (diff) |
Will things ever be the same again?
It's the final masonize
Diffstat (limited to 'httemplate/browse/cust_pay_batch.cgi')
-rwxr-xr-x | httemplate/browse/cust_pay_batch.cgi | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index 98ea2f5a2..e40e95870 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -1,27 +1,27 @@ <!-- mason kludge --> -<%= include("/elements/header.html","Credit card batch details", menubar( 'Main Menu' => $p,)) %> +<% include("/elements/header.html","Credit card batch details", menubar( 'Main Menu' => $p,)) %> +% +% +%die "No batch specified (bad URL)!" unless $cgi->keywords; +%my($query) = $cgi->keywords; +%$query =~ /^(\d+)$/; +%my $batchnum = $1; +%my $pay_batch = qsearchs('pay_batch',{'batchnum'=>$batchnum}); +%die "Batch not found!" unless $pay_batch; +% +% -<% -die "No batch specified (bad URL)!" unless $cgi->keywords; -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $batchnum = $1; -my $pay_batch = qsearchs('pay_batch',{'batchnum'=>$batchnum}); -die "Batch not found!" unless $pay_batch; - -%> - -<FORM ACTION="<%=$p%>misc/download-batch.cgi" METHOD="POST"> +<FORM ACTION="<%$p%>misc/download-batch.cgi" METHOD="POST"> Download batch in format <SELECT NAME="format"> <OPTION VALUE="">Default batch mode</OPTION> <OPTION VALUE="csv-td_canada_trust-merchant_pc_batch">CSV file for TD Canada Trust Merchant PC Batch</OPTION> <OPTION VALUE="PAP">80 byte file for TD Canada Trust PAP Batch</OPTION> <OPTION VALUE="BoM">Bank of Montreal ECA batch</OPTION> -</SELECT><INPUT TYPE="hidden" NAME="batchnum" VALUE="<%= $batchnum %>"><INPUT TYPE="submit" VALUE="Download"></FORM> +</SELECT><INPUT TYPE="hidden" NAME="batchnum" VALUE="<% $batchnum %>"><INPUT TYPE="submit" VALUE="Download"></FORM> <BR><BR> -<FORM ACTION="<%=$p%>misc/upload-batch.cgi" METHOD="POST" ENCTYPE="multipart/form-data"> +<FORM ACTION="<%$p%>misc/upload-batch.cgi" METHOD="POST" ENCTYPE="multipart/form-data"> Upload results<BR> Filename <INPUT TYPE="file" NAME="batch_results"><BR> Format <SELECT NAME="format"> @@ -32,26 +32,26 @@ Format <SELECT NAME="format"> </SELECT><BR> <INPUT TYPE="submit" VALUE="Upload"></FORM> <BR> +% +% 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 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]; +% -<% - 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 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<BR> -$<%= sprintf("%.2f", $total) %> total in batch<BR> +<% $cards %> credit card payments batched<BR> +$<% sprintf("%.2f", $total) %> total in batch<BR> <BR> -<%= &table() %> +<% &table() %> <TR> <TH>#</TH> <TH><font size=-1>inv#</font></TH> @@ -62,35 +62,35 @@ $<%= sprintf("%.2f", $total) %> total in batch<BR> <TH>Amount</TH> <TH>Status</TH> </TR> +% +%foreach my $cust_pay_batch ( sort { $a->paybatchnum <=> $b->paybatchnum } +% qsearch('cust_pay_batch', {'batchnum'=>$batchnum} ) +%) { +% my $cardnum = $cust_pay_batch->payinfo; +% #$cardnum =~ s/.{4}$/xxxx/; +% $cardnum = 'x'x(length($cardnum)-4). substr($cardnum,(length($cardnum)-4)); +% +% $cust_pay_batch->exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/; +% my( $mon, $year ) = ( $2, $1 ); +% $mon = "0$mon" if $mon < 10; +% my $exp = "$mon/$year"; +% +% -<% -foreach my $cust_pay_batch ( sort { $a->paybatchnum <=> $b->paybatchnum } - qsearch('cust_pay_batch', {'batchnum'=>$batchnum} ) -) { - my $cardnum = $cust_pay_batch->payinfo; - #$cardnum =~ s/.{4}$/xxxx/; - $cardnum = 'x'x(length($cardnum)-4). substr($cardnum,(length($cardnum)-4)); - - $cust_pay_batch->exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/; - my( $mon, $year ) = ( $2, $1 ); - $mon = "0$mon" if $mon < 10; - my $exp = "$mon/$year"; - -%> <TR> - <TD><%= $cust_pay_batch->paybatchnum %></TD> - <TD><A HREF="../view/cust_bill.cgi?<%= $cust_pay_batch->invnum %>"><%= $cust_pay_batch->invnum %></TD> - <TD><A HREF="../view/cust_main.cgi?<%= $cust_pay_batch->custnum %>"><%= $cust_pay_batch->custnum %></TD> - <TD><%= $cust_pay_batch->get('last'). ', '. $cust_pay_batch->first %></TD> - <TD><%= $cust_pay_batch->payname %></TD> - <TD><%= $cardnum %></TD> - <TD><%= $exp %></TD> - <TD align="right">$<%= $cust_pay_batch->amount %></TD> - <TD><%= $cust_pay_batch->status %></TD> + <TD><% $cust_pay_batch->paybatchnum %></TD> + <TD><A HREF="../view/cust_bill.cgi?<% $cust_pay_batch->invnum %>"><% $cust_pay_batch->invnum %></TD> + <TD><A HREF="../view/cust_main.cgi?<% $cust_pay_batch->custnum %>"><% $cust_pay_batch->custnum %></TD> + <TD><% $cust_pay_batch->get('last'). ', '. $cust_pay_batch->first %></TD> + <TD><% $cust_pay_batch->payname %></TD> + <TD><% $cardnum %></TD> + <TD><% $exp %></TD> + <TD align="right">$<% $cust_pay_batch->amount %></TD> + <TD><% $cust_pay_batch->status %></TD> </TR> +% } -<% } %> </TABLE> </BODY> |