X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FSignup.pm;h=174883a003edab1b228f977b219a54558c60c1b5;hb=b37cafd2acd4ab2c38b44bc4d8ebde76936ef6bb;hp=6116609c8b8427f4f10df9ccbd66c50758dbd1eb;hpb=403bd5f61004717ecfecf8c5211141939e3b7176;p=freeside.git diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index 6116609c8..174883a00 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -530,6 +530,7 @@ sub new_customer { 'tagnum' => [ FS::part_tag->default_tags ], ( map { $_ => $packet->{$_} } qw( + salesnum ss stateid stateid_state payby @@ -624,7 +625,7 @@ sub new_customer { ); } - $cust_main->payby('BILL') # MCRD better? + $cust_main->payby('BILL') # MCRD better? no, that's for something else if $gw && $gw->gateway_namespace eq 'Business::OnlineThirdPartyPayment'; } @@ -933,12 +934,23 @@ sub new_customer_minimal { 'payby' => 'BILL', map { $_ => $packet->{$_} } qw( + salesnum last first company daytime night fax mobile ss ), } ); + if ( grep length($packet->{$_}), FS::cust_main->location_fields ) { + my $bill_hash; + foreach my $f (FS::cust_main->location_fields) { + $bill_hash->{$f} = $packet->{$f}; + } + my $bill_location = FS::cust_location->new($bill_hash); + $cust_main->set('bill_location' => $bill_location); + $cust_main->set('ship_location' => $bill_location); + } + my @invoicing_list = $packet->{'invoicing_list'} ? split( /\s*\,\s*/, $packet->{'invoicing_list'} ) : ();