summaryrefslogtreecommitdiff
path: root/httemplate/misc/process
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-02-28 00:04:43 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-02-28 00:04:43 -0600
commit1ac4a177bd93ad7a97a45aacb66aa0bc9c23726b (patch)
treeeb1e8eb6f80e84ebfc3349cf714d76c82cfba24c /httemplate/misc/process
parentaec7743508bd9565dd076ec019dbb3d5b7cedd9c (diff)
RT#30825: Modernize Bulk payment importing
Diffstat (limited to 'httemplate/misc/process')
-rw-r--r--httemplate/misc/process/cust_pay-import.cgi24
1 files changed, 3 insertions, 21 deletions
diff --git a/httemplate/misc/process/cust_pay-import.cgi b/httemplate/misc/process/cust_pay-import.cgi
index 7711773d8..2981da46d 100644
--- a/httemplate/misc/process/cust_pay-import.cgi
+++ b/httemplate/misc/process/cust_pay-import.cgi
@@ -1,23 +1,5 @@
-<% $cgi->redirect(popurl(3). "search/cust_pay.html?magic=paybatch;paybatch=$paybatch") %>
+<% $server->process %>
<%init>
-
-my $fh = $cgi->upload('csvfile');
-
-# webbatch? I suppose
-my $paybatch = time2str('webbatch-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
-
-my $error = defined($fh)
- ? FS::cust_pay::batch_import( {
- 'filehandle' => $fh,
- 'format' => scalar($cgi->param('format')),
-
- 'agentnum' => scalar($cgi->param('agentnum')),
- '_date' => scalar($cgi->param('_date')),
- 'paybatch' => $paybatch,
- } )
- : 'No file';
-
-errorpage($error)
- if ( $error );
-
+my $server = new FS::UI::Web::JSRPC 'FS::cust_pay::process_batch_import', $cgi;
</%init>
+