[freeside-commits] freeside/httemplate/misc upload-batch.cgi, 1.13, 1.13.4.1

Mark Wells mark at wavetail.420.am
Tue Jun 15 19:19:27 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv28360/httemplate/misc

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	upload-batch.cgi 
Log Message:
RT#5683: payment batch upload uses job queue and progressbar

Index: upload-batch.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/upload-batch.cgi,v
retrieving revision 1.13
retrieving revision 1.13.4.1
diff -u -w -d -r1.13 -r1.13.4.1
--- upload-batch.cgi	13 Jan 2008 21:14:19 -0000	1.13
+++ upload-batch.cgi	16 Jun 2010 02:19:25 -0000	1.13.4.1
@@ -1,36 +1,10 @@
-% if ( $error ) {
-%   errorpage($error);
-% } else {
-    <% include('/elements/header.html','Batch results upload successful') %> 
-    <% include('/elements/footer.html') %> 
-% }
+<% $server->process %>
 <%init>
 
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Process batches');
 
-my $error;
-
-my $fh = $cgi->upload('batch_results');
-$error = 'No file uploaded' unless defined($fh);
-
-unless ( $error ) {
-
-  $cgi->param('batchnum') =~ /^(\d+)$/;
-  my $batchnum = $1;
-
-  my $pay_batch = qsearchs( 'pay_batch', { 'batchnum' => $batchnum } );
-  if ( ! $pay_batch ) {
-    $error = "batchnum $batchnum not found";
-  } elsif ( $pay_batch->status ne 'I' ) {
-    $error = "batch $batchnum is not in transit";
-  } else {
-    $error = $pay_batch->import_results(
-                                         'filehandle' => $fh,
-                                         'format'     => $cgi->param('format'),
-                                       );
-  }
-
-}
+my $server =
+  new FS::UI::Web::JSRPC 'FS::pay_batch::process_import_results', $cgi;
 
 </%init>



More information about the freeside-commits mailing list