[freeside-commits] branch FREESIDE_3_BRANCH updated. 3b7ae729e52eb04e5d9974f0c635998a7e9176ff

Ivan ivan at 420.am
Sat Jun 6 14:02:57 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  3b7ae729e52eb04e5d9974f0c635998a7e9176ff (commit)
      from  f94f089ecfc6094c90b4ae31ee83777fe53d403d (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 3b7ae729e52eb04e5d9974f0c635998a7e9176ff
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Jun 6 14:02:55 2015 -0700

    signup without a service

diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index 6db33ac..67d11dc 100644
--- a/FS/FS/ClientAPI/Signup.pm
+++ b/FS/FS/ClientAPI/Signup.pm
@@ -983,7 +983,6 @@ sub new_customer_minimal {
     my $part_pkg =
       qsearchs( 'part_pkg', { 'pkgpart' => $pkgpart } )
         or return { 'error' => "WARNING: unknown pkgpart: $pkgpart" };
-    my $svcpart = $part_pkg->svcpart($svc_x);
 
     my $cust_pkg = new FS::cust_pkg ( {
       #later#'custnum' => $custnum,
@@ -992,35 +991,40 @@ sub new_customer_minimal {
     #my $error = $cust_pkg->check;
     #return { 'error' => $error } if $error;
 
-    #should be all auto-magic and shit
-    if ( $svc_x eq 'svc_acct' ) {
+    unless ( $svc_x eq 'none' ) {
 
-      my $svc = new FS::svc_acct {
-        'svcpart'   => $svcpart,
-        map { $_ => $packet->{$_} }
-          qw( username _password sec_phrase popnum domsvc ),
-      };
+      my $svcpart = $part_pkg->svcpart($svc_x);
+      #should be all auto-magic and shit
+      if ( $svc_x eq 'svc_acct' ) {
 
-      push @svc, $svc;
+        my $svc = new FS::svc_acct {
+          'svcpart'   => $svcpart,
+          map { $_ => $packet->{$_} }
+            qw( username _password sec_phrase popnum domsvc ),
+        };
 
-    } elsif ( $svc_x eq 'svc_phone' ) {
+        push @svc, $svc;
 
-      push @svc, new FS::svc_phone ( {
-        'svcpart' => $svcpart,
-         map { $_ => $packet->{$_} }
-           qw( countrycode phonenum sip_password pin ),
-      } );
-
-    } elsif ( $svc_x eq 'svc_pbx' ) {
+      } elsif ( $svc_x eq 'svc_phone' ) {
 
-      push @svc, new FS::svc_pbx ( {
+        push @svc, new FS::svc_phone ( {
           'svcpart' => $svcpart,
-          map { $_ => $packet->{$_} } 
-            qw( id title ),
-          } );
+           map { $_ => $packet->{$_} }
+             qw( countrycode phonenum sip_password pin ),
+        } );
+
+      } elsif ( $svc_x eq 'svc_pbx' ) {
+
+        push @svc, new FS::svc_pbx ( {
+            'svcpart' => $svcpart,
+            map { $_ => $packet->{$_} } 
+              qw( id title ),
+            } );
     
-    } else {
-      die "unknown signup service $svc_x";
+      } else {
+        die "unknown signup service $svc_x";
+      }
+
     }
 
     foreach my $svc ( @svc ) {
@@ -1068,6 +1072,7 @@ sub new_customer_minimal {
                  'signup_service' => $svc_x,
                  'custnum'        => $cust_main->custnum,
                  'session_id'     => $session_id,
+                 map { $_ => $cust_main->$_ } qw( first last company ),
                );
 
   if ( $svc[0] ) {
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 6a4d19b..d211361 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2377,6 +2377,7 @@ and customer address. Include units.',
                        'svc_acct'  => 'Account (svc_acct)',
                        'svc_phone' => 'Phone number (svc_phone)',
                        'svc_pbx'   => 'PBX (svc_pbx)',
+                       'none'      => 'None - package only',
                      ],
   },
   

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

Summary of changes:
 FS/FS/ClientAPI/Signup.pm |   51 +++++++++++++++++++++++++--------------------
 FS/FS/Conf.pm             |    1 +
 2 files changed, 29 insertions(+), 23 deletions(-)




More information about the freeside-commits mailing list