1 <% include("/elements/header.html", PL($inventory_class->classname)) %>
3 Import a file containing <% PL($inventory_class->classname) %>, one per line.
6 <& /elements/form-file_upload.html,
7 'name' => 'InventoryImportForm',
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",
16 'onsubmit' => "document.InventoryImportForm.submitButton.disabled=true;",
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',
28 'viewall_right' => 'None',
32 <% include( '/elements/file-upload.html',
34 'label' => 'Filename',
39 <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
40 <INPUT TYPE = "submit"
54 Upload file can be a text file or Excel spreadsheet. If an Excel spreadsheet,
55 should have an .XLS extension.
58 <% include('/elements/footer.html') %>
63 unless $FS::CurrentUser::CurrentUser->access_right('Import');
65 $cgi->param('classnum') =~ /^(\d+)$/ or errorpage("illegal classnum");
67 my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );
69 #my $conf = new FS::Conf;
71 # time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);