From cd6707b49e29d62397c1e4107803965282ee0115 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 21 Sep 2003 01:22:48 +0000 Subject: preliminary batch download --- httemplate/misc/download-batch.cgi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 httemplate/misc/download-batch.cgi (limited to 'httemplate/misc/download-batch.cgi') 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 %> +<% } %> -- cgit v1.2.1 From 95b6fff06bd55cfc97647b056cb321b1b57c2d78 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 21 Sep 2003 06:52:30 +0000 Subject: eliminate extraneous newlines --- httemplate/misc/download-batch.cgi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'httemplate/misc/download-batch.cgi') diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi index 3803c8464..5ee12f174 100644 --- a/httemplate/misc/download-batch.cgi +++ b/httemplate/misc/download-batch.cgi @@ -11,6 +11,5 @@ 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 %> +%>,,,,<%= $cust_pay_batch->cardnum %>,<%= $exp %>,<%= $cust_pay_batch->amount %>,<%= $cust_pay_batch->paybatchnum %> <% } %> -- cgit v1.2.1 From 8ba4df7e0fab1faa2032b8311a195d297502e4b2 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 21 Sep 2003 07:31:27 +0000 Subject: remove trancode from batching --- httemplate/misc/download-batch.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/misc/download-batch.cgi') diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi index 5ee12f174..ecb80d256 100644 --- a/httemplate/misc/download-batch.cgi +++ b/httemplate/misc/download-batch.cgi @@ -1,6 +1,6 @@ <% -http_header('Content-Type' => 'text/comma-separated-values'); +http_header('Content-Type' => 'text/comma-separated-values' ); for my $cust_pay_batch ( sort { $a->paybatchnum <=> $b->paybatchnum } qsearch('cust_pay_batch', {} ) -- cgit v1.2.1 From d993eaef639b1abd95973b26e7c336fc5e588041 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Sep 2003 12:48:11 +0000 Subject: IE doesn't like downloading MIME type text/comma-separated-values --- httemplate/misc/download-batch.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/download-batch.cgi') diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi index ecb80d256..306ef5d63 100644 --- a/httemplate/misc/download-batch.cgi +++ b/httemplate/misc/download-batch.cgi @@ -1,6 +1,7 @@ <% -http_header('Content-Type' => 'text/comma-separated-values' ); +#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', {} ) -- cgit v1.2.1