<& /elements/header.html, 'Import package definitions' &> Import a file containing package definitions.

<& /elements/form-file_upload.html, 'name' => 'PackageDefImportForm', 'action' => 'process/part_pkg-import.html', 'num_files' => 1, 'fields' => [ 'agentnum', 'pkgpartbatch', 'format' ], 'message' => 'Package definition import successful', 'url' => $p."browse/part_pkg.cgi?pkgpartbatch=$pkgpartbatch", 'onsubmit' => "document.PackageDefImportForm.submitButton.disabled=true;" &> <% &ntable("#cccccc", 2) %> <& /elements/tr-select-agent.html, #'curr_value' => '', #$agentnum, 'label' => "Agent", 'disable_empty' => 1, #this doesn't work yet, no type_pkgs records are inserted #'empty_label' => '(global)', #disable_empty => ! $acl_edit_global, &> Format <& /elements/file-upload.html, 'field' => 'file', 'label' => 'Filename', &>
Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.

Default format has the following field order: agent_pkgpartid, pkg<%$req%>, comment<%$req%>, freq<%$req%>, plan<%$req%>, setup_fee<%$req%>, recur_fee<%$req%>, setup_cost, recur_cost, classnum, taxclass

<%$req%> Required fields

Field information:
<& /elements/footer.html &> <%once> my $req = qq!*!; <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); my $pkgpartbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);