X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fcust_main-import_charges.cgi;h=1a29bf60038e7dfa81ac1ae15f0eceaf1c1db320;hb=718f65eee1c797ea90a315b5f03fae75c80a5112;hp=14df1bd8d280a99a6bee392a75e735c4ba1b0ab0;hpb=673b9a458d9138523026963df6fa3b4683e09bae;p=freeside.git diff --git a/httemplate/misc/process/cust_main-import_charges.cgi b/httemplate/misc/process/cust_main-import_charges.cgi index 14df1bd8d..1a29bf600 100644 --- a/httemplate/misc/process/cust_main-import_charges.cgi +++ b/httemplate/misc/process/cust_main-import_charges.cgi @@ -1,26 +1,30 @@ -<% +% +% +% my $fh = $cgi->upload('csvfile'); +% #warn $cgi; +% #warn $fh; +% +% my $error = defined($fh) +% ? FS::cust_main::batch_charge( { +% filehandle => $fh, +% 'fields' => [qw( custnum amount pkg )], +% } ) +% : 'No file'; +% +% if ( $error ) { +% - my $fh = $cgi->upload('csvfile'); - #warn $cgi; - #warn $fh; - - my $error = defined($fh) - ? FS::cust_main::batch_charge( { - filehandle => $fh, - 'fields' => [qw( custnum amount pkg )], - } ) - : 'No file'; - - if ( $error ) { - %> - <% - eidiot($error); -# $cgi->param('error', $error); -# print $cgi->redirect( "${p}cust_main-import_charges.cgi - } else { - %> +% +% errorpage($error); +%# $cgi->param('error', $error); +%# print $cgi->redirect( "${p}cust_main-import_charges.cgi +% } else { +% + - <%= header('Import sucessful') %> <% - } -%> + <% include("/elements/header.html",'Import successful') %> +% +% } +% +