[freeside-commits] branch FREESIDE_4_BRANCH updated. aa5a298db560ebe2c57dc7cb010e0c2ad818c833
Ivan
ivan at 420.am
Sat Jun 6 14:02:52 PDT 2015
The branch, FREESIDE_4_BRANCH has been updated
via aa5a298db560ebe2c57dc7cb010e0c2ad818c833 (commit)
from 3a0faf78a1dc1e037409fd3e43461af42e47a82d (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 aa5a298db560ebe2c57dc7cb010e0c2ad818c833
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Jun 6 14:02:51 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