From c8f80bd5aaeb0f3844a7cece4bfe250d4f89f745 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 28 Sep 2003 02:36:18 +0000 Subject: add upload of batch result from TD Canada Trust some global.asa / handler.pl enhancements --- httemplate/misc/upload-batch.cgi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 httemplate/misc/upload-batch.cgi (limited to 'httemplate/misc/upload-batch.cgi') diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi new file mode 100644 index 000000000..565a6da5c --- /dev/null +++ b/httemplate/misc/upload-batch.cgi @@ -0,0 +1,28 @@ +<% + + my $fh = $cgi->upload('batch_results'); + my $filename = $cgi->param('batch_results'); + my $paybatch = basename($filename); + + my $error = defined($fh) + ? FS::cust_pay_batch::import_results( { + 'filehandle' => $fh, + 'format' => $cgi->param('format'), + 'paybatch' => $paybatch, + } ) + : 'No file'; + + if ( $error ) { + %> + + <% + eidiot($error); +# $cgi->param('error', $error); +# print $cgi->redirect( "${p}cust_main-import.cgi + } else { + %> + + <%= header('Batch results upload sucessful') %> <% + } +%> + -- cgit v1.2.1