Will things ever be the same again?
[freeside.git] / httemplate / misc / cust_main-import.cgi
1 <% include("/elements/header.html",'Batch Customer Import') %>
2
3 <FORM ACTION="process/cust_main-import.cgi" METHOD="post" ENCTYPE="multipart/form-data">
4
5 Import a CSV file containing customer records.
6 <BR><BR>
7
8 <!-- Simple file format is CSV, with the following field order: <i>cust_pkg.setup, dayphone, first, last, address1, address2, city, state, zip, comments</i>
9 <BR><BR> -->
10
11 Extended file format is CSV, with the following field order: <i>agent_custid, refnum[1], last, first, address1, address2, city, state, zip, country, daytime, night, ship_last, ship_first, ship_address1, ship_address2, ship_city, ship_state, ship_zip, ship_country, payinfo, paycvv, paydate, invoicing_list, pkgpart, username, _password</i>
12 <BR><BR>
13
14 [1] This field has special treatment upon import: If a string is passed instead
15 of an integer, the string is searched for and if necessary auto-created in the
16 target table.
17 <BR><BR>
18
19 <% &ntable("#cccccc") %>
20
21 <% include('/elements/tr-select-agent.html', '', #$agentnum,
22               'label'       => "<B>Agent</B>",
23               'empty_label' => 'Select agent',
24            )
25 %>
26
27 <TR>
28   <TH ALIGN="right">Format</TH>
29   <TD>
30     <SELECT NAME="format">
31 <!--      <OPTION VALUE="simple">Simple -->
32       <OPTION VALUE="extended" SELECTED>Extended
33     </SELECT>
34   </TD>
35 </TR>
36
37 <TR>
38   <TH ALIGN="right">CSV filename</TH>
39   <TD><INPUT TYPE="file" NAME="csvfile"></TD>
40 </TR>
41 % #include('/elements/tr-select-part_referral.html')
42 %
43
44
45 <!--
46 <TR>
47   <TH>First package</TH>
48   <TD>
49     <SELECT NAME="pkgpart"><OPTION VALUE="">(none)</OPTION>
50 % foreach my $part_pkg ( qsearch('part_pkg',{'disabled'=>'' }) ) { 
51
52        <OPTION VALUE="<% $part_pkg->pkgpart %>"><% $part_pkg->pkg. ' - '. $part_pkg->comment %></OPTION>
53 % } 
54
55     </SELECT>
56   </TD>
57 </TR>
58 -->
59
60 </TABLE>
61 <BR><BR>
62
63 <INPUT TYPE="submit" VALUE="Import">
64 </FORM>
65
66 <% include('/elements/footer.html') %>
67