summaryrefslogtreecommitdiff
path: root/httemplate/misc/download-batch.cgi
blob: 306ef5d63055de62a3acddaede3e932a6e3d5914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<%

#http_header('Content-Type' => 'text/comma-separated-values' ); #IE chokes
http_header('Content-Type' => 'text/plain' );

for my $cust_pay_batch ( sort { $a->paybatchnum <=> $b->paybatchnum }
                              qsearch('cust_pay_batch', {} )
) {

$cust_pay_batch->exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
my( $mon, $y ) = ( $2, $1 );
$mon = "0$mon" if $mon < 10;
my $exp = "$mon$y";

%>,,,,<%= $cust_pay_batch->cardnum %>,<%= $exp %>,<%= $cust_pay_batch->amount %>,<%= $cust_pay_batch->paybatchnum %>
<% } %>