ignore filenames and rely on selected batch number
[freeside.git] / httemplate / misc / upload-batch.cgi
1 %
2 %
3 %  my $fh = $cgi->upload('batch_results');
4 %  $cgi->param('batchnum') =~ /^(\d+)$/;
5 %  my $paybatch = $1;
6 %
7 %  my $error = defined($fh)
8 %    ? FS::cust_pay_batch::import_results( {
9 %        'filehandle' => $fh,
10 %        'format'     => $cgi->param('format'),
11 %        'paybatch'   => $paybatch,
12 %      } )
13 %    : 'No file';
14 %
15 %  if ( $error ) {
16 %    
17
18     <!-- mason kludge -->
19 %
20 %    eidiot($error);
21 %#    $cgi->param('error', $error);
22 %#    print $cgi->redirect( "${p}cust_main-import.cgi
23 %  } else {
24 %    
25
26     <!-- mason kludge -->
27     <% include("/elements/header.html",'Batch results upload successful') %> 
28 %
29 %  }
30 %
31
32