summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-09-21 01:22:47 +0000
committerivan <ivan>2003-09-21 01:22:47 +0000
commit93e1384be824131bf1a0e1eb6dd62fa6d2345275 (patch)
tree11a4fad97d664218d61e5724a965bd9b8c96039c
parent7882429fa42fd35a863b6bf4e0e50747344cd290 (diff)
preliminary batch download
-rw-r--r--httemplate/misc/download-batch.cgi16
1 files changed, 16 insertions, 0 deletions
diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi
new file mode 100644
index 000000000..3803c8464
--- /dev/null
+++ b/httemplate/misc/download-batch.cgi
@@ -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 %>
+<% } %>