preliminary batch download
authorivan <ivan>
Sun, 21 Sep 2003 01:22:48 +0000 (01:22 +0000)
committerivan <ivan>
Sun, 21 Sep 2003 01:22:48 +0000 (01:22 +0000)
httemplate/misc/download-batch.cgi [new file with mode: 0644]

diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi
new file mode 100644 (file)
index 0000000..3803c84
--- /dev/null
@@ -0,0 +1,16 @@
+<%
+
+http_header('Content-Type' => 'text/comma-separated-values');
+
+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 %>
+<% } %>