Will things ever be the same again?
[freeside.git] / httemplate / misc / process / inventory_item-import.html
1 %
2 %
3 %  my $fh = $cgi->upload('filename');
4 %
5 %  my $error = defined($fh)
6 %    ? FS::inventory_item::batch_import( {
7 %        'filehandle' => $fh,
8 %        'classnum'   => $cgi->param('classnum'),
9 %      } )
10 %    : 'No file';
11 %
12 %  if ( $error ) {
13 %    
14
15     <!-- mason kludge -->
16 %
17 %    eidiot($error);
18 %#    $cgi->param('error', $error);
19 %#    print $cgi->redirect( "${p}cust_main-import.cgi
20 %  } else {
21 %    
22
23     <!-- mason kludge -->
24     <% include("/elements/header.html",'Import successful') %>
25     <!-- XXX redirect to batch search like the payment entry... -->
26     <% include("/elements/footer.html",'Import successful') %> 
27 %
28 %  }
29 %
30
31