This commit was generated by cvs2svn to compensate for changes in r2523,
[freeside.git] / httemplate / misc / process / cust_main-import_charges.cgi
1 <%
2
3   my $fh = $cgi->upload('csvfile');
4   #warn $cgi;
5   #warn $fh;
6
7   my $error = defined($fh)
8     ? FS::cust_main::batch_charge( {
9         filehandle => $fh,
10         'fields'    => [qw( custnum amount pkg )],
11       } )
12     : 'No file';
13
14   if ( $error ) {
15     %>
16     <!-- mason kludge -->
17     <%
18     eidiot($error);
19 #    $cgi->param('error', $error);
20 #    print $cgi->redirect( "${p}cust_main-import_charges.cgi
21   } else {
22     %>
23     <!-- mason kludge -->
24     <%= header('Import sucessful') %> <%
25   }
26 %>