add "National ID, plus account and phone services" import format, RT#18946
authorIvan Kohler <ivan@freeside.biz>
Wed, 22 Aug 2012 19:08:44 +0000 (12:08 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 22 Aug 2012 19:08:44 +0000 (12:08 -0700)
FS/FS/cust_main/Import.pm
httemplate/misc/cust_main-import.cgi

index ee14cba..19c0d52 100644 (file)
@@ -210,8 +210,23 @@ sub batch_import {
                   cust_pkg.pkgpart cust_pkg.bill
                   svc_acct.username svc_acct._password 
                 );
-   push @fields, map "svc_phone.$_", qw(countrycode phonenum sip_password pin);
-   push @fields, map "svc_hardware.$_", qw(typenum ip_addr hw_addr serial);
+    push @fields, map "svc_phone.$_", qw(countrycode phonenum sip_password pin);
+    push @fields, map "svc_hardware.$_", qw(typenum ip_addr hw_addr serial);
+
+    $payby = 'BILL';
+  } elsif ( $format eq 'national_id-acct_phone') {
+    @fields = qw( agent_custid refnum
+                  last first company address1 address2 city state zip country
+                  daytime night
+                  ship_last ship_first ship_company ship_address1 ship_address2
+                  ship_city ship_state ship_zip ship_country
+                  national_id
+                  payinfo paycvv paydate
+                  invoicing_list
+                  cust_pkg.pkgpart cust_pkg.bill
+                  svc_acct.username svc_acct._password 
+                );
+    push @fields, map "svc_phone.$_", qw(countrycode phonenum sip_password pin);
 
     $payby = 'BILL';
   } else {
index 74f9b4c..a5f1d11 100644 (file)
@@ -36,6 +36,7 @@ Import a file containing customer records.
         <OPTION VALUE="svc_external">External service
         <OPTION VALUE="svc_external_svc_phone">External service and phone service
         <OPTION VALUE="birthdates-acct_phone_hardware">Birthdates and account, phone and hardware services
+        <OPTION VALUE="national_id-acct_phone">National ID, plus account and phone services
       </SELECT>
     </TD>
   </TR>
@@ -110,6 +111,9 @@ Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets.
 <b>Birthdates and account, phone and hardware services</b> format has the following field order: <i>agent_custid, refnum<%$req%>, last<%$req%>, first<%$req%>, company, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country, daytime, night, ship_last, ship_first, ship_company, ship_address1, ship_address2, ship_city, ship_state, ship_zip, ship_country, birthdate, spouse_birthdate, payinfo, paycvv, paydate, invoicing_list, pkgpart, next_bill_date, username, _password, countrycode, phonenum, sip_password, pin, typenum, ip_addr, hw_addr, serial</i>
 <BR><BR>
 
+<b>National ID, plus account and phone services</b> format has the following field order: <i>agent_custid, refnum<%$req%>, last<%$req%>, first<%$req%>, company, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country, daytime, night, ship_last, ship_first, ship_company, ship_address1, ship_address2, ship_city, ship_state, ship_zip, ship_country, national_id, payinfo, paycvv, paydate, invoicing_list, pkgpart, next_bill_date, username, _password, countrycode, phonenum, sip_password, pin</i>
+<BR><BR>
+
 <%$req%> Required fields
 <BR><BR>