diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-04-10 09:33:59 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-04-10 09:33:59 -0700 |
commit | 6a89c38f9f9894e2f963b2dc08d587b83fd3350f (patch) | |
tree | 5ba561fec64126a965988d1484cc1a858d474a7f /FS | |
parent | bc75a214c30ca0ae7554cc60d4f7754f5ea03366 (diff) |
new_customer_minimal accepts address, & doc it, RT#34084
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/ClientAPI/Signup.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index 9d0bcf322..174883a00 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -941,6 +941,16 @@ sub new_customer_minimal { } ); + 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'} ) : (); |