1 <% include("/elements/header.html", PL($inventory_class->classname)) %>
3 Import a file containing <% PL($inventory_class->classname) %>, one per line.
6 <% include( '/elements/form-file_upload.html',
7 'name' => 'InventoryItemImportForm',
8 'action' => 'process/inventory_item-import.html',
10 #'fields' => [ 'format', 'itembatch', 'classnum', ],
11 'fields' => [ 'format', 'classnum', ],
12 'message' => 'Inventory import successful',
13 #XXX redirect via $itembatch? or just back to class browse?
14 'url' => $p."search/inventory_item.html?classnum=$classnum;avail=1",
18 <% &ntable("#cccccc", 2) %>
20 <INPUT TYPE="hidden" NAME="format" VALUE="default">
22 <INPUT TYPE="hidden" NAME="classnum" VALUE="<% $classnum %>">
24 %# <INPUT TYPE="hidden" NAME="itembatch" VALUE="<% $itembatch %>">
26 <% include( '/elements/file-upload.html',
28 'label' => 'Filename',
33 <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
34 <INPUT TYPE = "submit"
37 onClick = "document.InventoryItemImportForm.submit.disabled=true;"
48 Upload file can be a text file or Excel spreadsheet. If an Excel spreadsheet,
49 should have an .XLS extension.
52 <% include('/elements/footer.html') %>
57 unless $FS::CurrentUser::CurrentUser->access_right('Import');
59 $cgi->param =~ /^(\d+)$/ or errorpage("illegal classnum");
61 my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );
63 #my $conf = new FS::Conf;
65 # time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);