X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fcust_main-import_charges.cgi;h=42ca825924fe2915a12305e921372dc34dbb3aaa;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hp=bda3e3b70cb6ae1d40564fb0e13b80ae8400d7ad;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git diff --git a/httemplate/misc/process/cust_main-import_charges.cgi b/httemplate/misc/process/cust_main-import_charges.cgi index bda3e3b70..42ca82592 100644 --- a/httemplate/misc/process/cust_main-import_charges.cgi +++ b/httemplate/misc/process/cust_main-import_charges.cgi @@ -1,24 +1,10 @@ -% if ( $error ) { -% errorpage($error); -% } else { - <% include('/elements/header.html','Import successful') %> - <% include('/elements/footer.html') %> -% } +<% $server->process %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); -my $fh = $cgi->upload('csvfile'); -#warn $cgi; -#warn $fh; - -my $error = defined($fh) - ? FS::cust_main::batch_charge( { - filehandle => $fh, - 'agentnum' => scalar($cgi->param('agentnum')), - 'format' => scalar($cgi->param('format')), - } ) - : 'No file'; +my $server = + new FS::UI::Web::JSRPC 'FS::cust_main::Import_Charges::batch_charge', $cgi;