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', 'agentnum' ],
11 'fields' => [ 'format', 'classnum', 'agentnum', ],
12 'message' => 'Inventory import successful',
13 #XXX redirect via $itembatch? or just back to class browse?
14 #'url' => $p."search/phone_avail.html?availbatch=$availbatch",
15 'url' => $p."search/inventory_item.html?classnum=$classnum;avail=1",
19 <% &ntable("#cccccc", 2) %>
21 <INPUT TYPE="hidden" NAME="format" VALUE="default">
23 <INPUT TYPE="hidden" NAME="classnum" VALUE="<% $classnum %>">
25 %# <INPUT TYPE="hidden" NAME="itembatch" VALUE="<% $itembatch %>">
27 <% include('/elements/tr-select-agent.html') %>
29 <% include( '/elements/file-upload.html',
31 'label' => 'Filename',
36 <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
37 <INPUT TYPE = "submit"
40 onClick = "document.InventoryItemImportForm.submit.disabled=true;"
51 Upload file can be a text file or Excel spreadsheet. If an Excel spreadsheet,
52 should have an .XLS extension.
55 <% include('/elements/footer.html') %>
60 unless $FS::CurrentUser::CurrentUser->access_right('Import');
62 $cgi->param('classnum') =~ /^(\d+)$/ or errorpage("illegal classnum");
64 my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );
66 #my $conf = new FS::Conf;
68 # time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);