From 04af7174c8f52ff484af7851f687e98f4d88670c Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 30 Aug 2002 17:34:06 +0000 Subject: working CSV import for crcmn --- httemplate/misc/cust_main-import.cgi | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 httemplate/misc/cust_main-import.cgi (limited to 'httemplate/misc/cust_main-import.cgi') diff --git a/httemplate/misc/cust_main-import.cgi b/httemplate/misc/cust_main-import.cgi new file mode 100644 index 000000000..6b36f478d --- /dev/null +++ b/httemplate/misc/cust_main-import.cgi @@ -0,0 +1,51 @@ + +<%= header('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 + + 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 ) { +%> + +<% } else { %> +

Advertising source

+<% } %> + + First package:

+ + CSV Filename:

+ +
+ + + -- cgit v1.2.1