[freeside-commits] branch master updated. 1388ec62da5eda6fe8b39eec31d61be30502e4ef

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


The branch, master has been updated
       via  1388ec62da5eda6fe8b39eec31d61be30502e4ef (commit)
      from  75918c60e09cd556e753fc7be18bba97e360eef9 (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 1388ec62da5eda6fe8b39eec31d61be30502e4ef
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Jun 6 14:02:46 2015 -0700

    signup without a service

diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index d3e534c..4e2827c 100644
--- a/FS/FS/ClientAPI/Signup.pm
+++ b/FS/FS/ClientAPI/Signup.pm
@@ -972,7 +972,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,
@@ -981,35 +980,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 ) {
@@ -1057,6 +1061,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 78baa2f..9255284 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2295,6 +2295,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