X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fcust_main-import.cgi;h=73efd370579a8cbf63d60c43674635a3a3c0dc6e;hb=d15c3f4bcdeaf94b1a286691ec670d7c32dbd3d3;hp=6b36f478d050bd42c516d5b048d2334eb137f23c;hpb=0ebeec96313dd7edfca340f01f8fbbbac1f4aa1d;p=freeside.git diff --git a/httemplate/misc/cust_main-import.cgi b/httemplate/misc/cust_main-import.cgi index 6b36f478d..73efd3705 100644 --- a/httemplate/misc/cust_main-import.cgi +++ b/httemplate/misc/cust_main-import.cgi @@ -1,51 +1,76 @@ - -<%= header('Batch Customer Import') %> +<% include("/elements/header.html",'Batch Customer Import') %> +
-Import a CSV file containing customer records.

-Default file format is CSV, with the following field order: cust_pkg.setup, dayphone, first, last, address1, address2, city, state, zip, comments

-<% - #false laziness with edit/cust_main.cgi - my @agents = qsearch( 'agent', {} ); - die "No agents created!" unless @agents; - my $agentnum = $agents[0]->agentnum; #default to first +Import a CSV file containing customer records. +

- if ( scalar(@agents) == 1 ) { -%> - -<% } else { %> -

Agent

-<% } %> - -<% - my @referrals = qsearch('part_referral',{}); - die "No advertising sources created!" unless @referrals; - my $refnum = $referrals[0]->refnum; #default to first - - if ( scalar(@referrals) == 1 ) { + + +Extended file format is CSV, with the following field order: agent_custid, refnum[1]<%$req%>, last<%$req%>, first<%$req%>, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country, daytime, night, ship_last, ship_first, ship_address1, ship_address2, ship_city, ship_state, ship_zip, ship_country, payinfo<%$req%>, paycvv, paydate<%$req%>, invoicing_list, pkgpart, username[2], _password[2] +

+ +<%$req%> Required fields +

+ +[1] This field has special treatment upon import: If a string is passed instead +of an integer, the string is searched for and if necessary auto-created in the +target table. +

+ +[2] username and _password are required if pkgpart is specified. +

+ +<% &ntable("#cccccc") %> + +<% include('/elements/tr-select-agent.html', '', #$agentnum, + 'label' => "Agent", + 'empty_label' => 'Select agent', + ) %> - -<% } else { %> -

Advertising source

-<% } %> - - First package:

- - CSV Filename:

- -
- - + + Format + + + + + + + CSV filename + + +% #include('/elements/tr-select-part_referral.html') +% + + + + + +

+ + + + +<% include('/elements/footer.html') %> + +<%once> +my $req = qq!*!; +