summaryrefslogtreecommitdiff
path: root/httemplate/misc/upload-batch.cgi
diff options
context:
space:
mode:
authorivan <ivan>2003-09-28 02:36:18 +0000
committerivan <ivan>2003-09-28 02:36:18 +0000
commitc8f80bd5aaeb0f3844a7cece4bfe250d4f89f745 (patch)
tree66edb155311f88b162e7073e2c6c14ac33c56db5 /httemplate/misc/upload-batch.cgi
parentc2a0b1b8e9d437434e326a3b573d7134c5697213 (diff)
add upload of batch result from TD Canada Trust
some global.asa / handler.pl enhancements
Diffstat (limited to 'httemplate/misc/upload-batch.cgi')
-rw-r--r--httemplate/misc/upload-batch.cgi28
1 files changed, 28 insertions, 0 deletions
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 ) {
+ %>
+ <!-- mason kludge -->
+ <%
+ eidiot($error);
+# $cgi->param('error', $error);
+# print $cgi->redirect( "${p}cust_main-import.cgi
+ } else {
+ %>
+ <!-- mason kludge -->
+ <%= header('Batch results upload sucessful') %> <%
+ }
+%>
+