[freeside-commits] branch FREESIDE_3_BRANCH updated. f78628bc9d1bdca7b55508b99596502336ce5d6f

Ivan ivan at 420.am
Tue Feb 2 09:10:48 PST 2016


The branch, FREESIDE_3_BRANCH has been updated
       via  f78628bc9d1bdca7b55508b99596502336ce5d6f (commit)
       via  818ae79719404b6b7a665872e0f7b57a6716a193 (commit)
       via  b75eefd0de474bc68eb271e122f0895a78dabc28 (commit)
       via  67cad80ab15adbad103df1e0e7b169af1ed65184 (commit)
      from  67ca665cce866aff8c4f1fecd700c44c5e63c2a0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f78628bc9d1bdca7b55508b99596502336ce5d6f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Feb 2 09:10:47 2016 -0800

    wireless broadband service import, RT#38986

diff --git a/FS/FS/cust_main/Import.pm b/FS/FS/cust_main/Import.pm
index b19fb31..d7a66db 100644
--- a/FS/FS/cust_main/Import.pm
+++ b/FS/FS/cust_main/Import.pm
@@ -11,6 +11,7 @@ use FS::UID qw( dbh );
 use FS::Record qw( qsearchs );
 use FS::cust_main;
 use FS::svc_acct;
+use FS::svc_broadband;
 use FS::svc_external;
 use FS::svc_phone;
 use FS::svc_hardware;
@@ -186,6 +187,18 @@ sub batch_import {
                   customer_options
                 );
     $payby = 'BILL';
+ } elsif ( $format =~ /^svc_broadband/ ) {
+    @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
+                  payinfo paycvv paydate
+                  invoicing_list
+                  cust_pkg.pkgpart cust_pkg.bill
+                );
+    push @fields, map "svc_broadband.$_", qw( ip_addr mac_addr sectornum );
+    $payby = 'BILL';
  } elsif ( $format =~ /^svc_external/ ) {
     @fields = qw( agent_custid refnum
                   last first company address1 address2 city state zip country
@@ -343,6 +356,10 @@ sub batch_import {
 
         $svc_x{$1} = shift @columns;
 
+      } elsif ( $field =~ /^svc_broadband\.(ip_addr|mac_addr|sectornum)$/ ) {
+
+        $svc_x{$1} = shift @columns;
+
       } elsif ( $field =~ /^svc_external\.(id|title)$/ ) {
 
         $svc_x{$1} = shift @columns;
@@ -454,6 +471,8 @@ sub batch_import {
         $svcdb = 'svc_acct';
       } elsif ( $svc_x{'id'} || $svc_x{'title'} ) {
         $svcdb = 'svc_external';
+      } elsif ( $svc_x{ip_addr} || $svc_x{mac_addr} ) {
+        $svcdb = 'svc_broadband';
       }
 
       my $svc_phone = '';
diff --git a/httemplate/misc/cust_main-import.cgi b/httemplate/misc/cust_main-import.cgi
index d56feac..46d1536 100644
--- a/httemplate/misc/cust_main-import.cgi
+++ b/httemplate/misc/cust_main-import.cgi
@@ -33,6 +33,7 @@ Import a file containing customer records.
         <OPTION VALUE="extended-plus_options">Extended + options
         <OPTION VALUE="extended-plus_company">Extended plus company
         <OPTION VALUE="extended-plus_company_and_options">Extended plus company and options
+        <OPTION VALUE="svc_broadband">Wireless broadband service
         <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
@@ -102,6 +103,9 @@ Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets.
 <b>Extended plus company and options </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, payinfo, paycvv, paydate, invoicing_list, pkgpart, username, _password, options</i>
 <BR><BR>
 
+<b>Wireless broadband service</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, payinfo, paycvv, paydate, invoicing_list, pkgpart, next_bill_date, ip_addr, mac_addr, sectornum</i>
+<BR><BR>
+
 <b>External service</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, payinfo, paycvv, paydate, invoicing_list, pkgpart, next_bill_date, id, title</i>
 <BR><BR>
 

commit 818ae79719404b6b7a665872e0f7b57a6716a193
Merge: b75eefd 67ca665
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Feb 2 09:10:37 2016 -0800

    Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH


commit b75eefd0de474bc68eb271e122f0895a78dabc28
Merge: 67cad80 3c635a0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Jan 29 17:08:51 2016 -0800

    Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH


commit 67cad80ab15adbad103df1e0e7b169af1ed65184
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Jan 29 17:08:44 2016 -0800

    scalar cgi param

diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index 973f073..78038f8 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -199,7 +199,7 @@ if ( $cgi->param('batch') ) {
                                      'payinfo'  => $payinfo,
                                      'paydate'  => "$year-$month-01",
                                      'payname'  => $payname,
-                                     map { $_ => $cgi->param($_) } 
+                                     map { $_ => scalar($cgi->param($_)) } 
                                        @{$payby2fields{$payby}}
                                    );
   errorpage($error) if $error;
@@ -218,7 +218,7 @@ if ( $cgi->param('batch') ) {
     'paycvv'     => $paycvv,
     'paynum_ref' => \$paynum,
     'discount_term' => $discount_term,
-    map { $_ => $cgi->param($_) } @{$payby2fields{$payby}}
+    map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}}
   );
   errorpage($error) if $error;
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_main/Import.pm            |   19 +++++++++++++++++++
 httemplate/misc/cust_main-import.cgi |    4 ++++
 httemplate/misc/process/payment.cgi  |    4 ++--
 3 files changed, 25 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list