From b1d445f94514a29e5d4753839798b0291d89aee3 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 9 Aug 2010 01:03:49 +0000 Subject: package web import from CSV/XLS, RT#9529 --- httemplate/misc/cust_pkg-import.html | 132 +++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 httemplate/misc/cust_pkg-import.html (limited to 'httemplate/misc/cust_pkg-import.html') diff --git a/httemplate/misc/cust_pkg-import.html b/httemplate/misc/cust_pkg-import.html new file mode 100644 index 0000000..ad582b0 --- /dev/null +++ b/httemplate/misc/cust_pkg-import.html @@ -0,0 +1,132 @@ +<% include("/elements/header.html",'Batch Package Import') %> + +Import a file containing package records. +

+ +<% include( '/elements/form-file_upload.html', + 'name' => 'PackageImportForm', + 'action' => 'process/cust_pkg-import.html', + 'num_files' => 1, + 'fields' => [ 'agentnum', 'pkgbatch', 'format' ], + 'message' => 'Package import successful', + 'url' => $p."search/cust_pkg.cgi?pkgbatch=$pkgbatch", + ) +%> + +<% &ntable("#cccccc", 2) %> + + <% include( '/elements/tr-select-agent.html', + #'curr_value' => '', #$agentnum, + 'label' => "Agent", + 'empty_label' => 'Select agent', + ) + %> + + + + + Format + + + + + + <% include( '/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: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire +

+ +Default with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire +

+ +Account service format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, username, _password +

+ +Account service with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, username, _password +

+ +Phone sevice format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, countrycode, phonenum, sip_password, pin +

+ +Phone service with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, countrycode, phonenum, sip_password, pin +

+ +External sevice format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, id, title +

+ +External service with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, id, title +

+ +<%$req%> Required fields +

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