X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fupload-batch.cgi;h=742bbc0c69dfe1aceec01a0550b95ad2276ed146;hp=746b81b17ee3d871c55330e5770ead7fe9c7a3cb;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi index 746b81b17..742bbc0c6 100644 --- a/httemplate/misc/upload-batch.cgi +++ b/httemplate/misc/upload-batch.cgi @@ -1,30 +1,34 @@ -<% +% +% +% my $fh = $cgi->upload('batch_results'); +% my $filename = $cgi->param('batch_results'); +% $filename =~ /^(.*[\/\\])?([^\/\\]+)$/ +% or die "unparsable filename: $filename\n"; +% my $paybatch = $2; +% +% my $error = defined($fh) +% ? FS::cust_pay_batch::import_results( { +% 'filehandle' => $fh, +% 'format' => $cgi->param('format'), +% 'paybatch' => $paybatch, +% } ) +% : 'No file'; +% +% if ( $error ) { +% - my $fh = $cgi->upload('batch_results'); - my $filename = $cgi->param('batch_results'); - $filename =~ /^(.*[\/\\])?([^\/\\]+)$/ - or die "unparsable filename: $filename\n"; - my $paybatch = $2; - - 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 { - %> +% +% eidiot($error); +%# $cgi->param('error', $error); +%# print $cgi->redirect( "${p}cust_main-import.cgi +% } else { +% + - <%= include("/elements/header.html",'Batch results upload successful') %> <% - } -%> + <% include("/elements/header.html",'Batch results upload successful') %> +% +% } +% +