diff options
author | Mark Wells <mark@freeside.biz> | 2013-03-21 23:44:22 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-03-21 23:45:11 -0700 |
commit | 179e9a70dfec14043be265986882ee728454254a (patch) | |
tree | a970b7d054015e7254020e48a5a136c30bfd6154 /FS | |
parent | efa86b130fe7b16eb5ad2bea1e375be99846cd5d (diff) |
self-signup template customer location fields, #940, #22084
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/ClientAPI/Signup.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index b7dcdbb64..2fcc4b143 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -524,20 +524,13 @@ sub new_customer { my $template_cust = qsearchs('cust_main', { 'custnum' => $template_custnum } ); return { 'error' => 'Configuration error' } unless $template_cust; - #XXX Copy template customer's locations $cust_main = new FS::cust_main ( { 'agentnum' => $agentnum, 'refnum' => $packet->{refnum} || $conf->config('signup_server-default_refnum'), ( map { $_ => $template_cust->$_ } qw( - last first company address1 address2 - city county state zip country - daytime night fax - - ship_last ship_first ship_company ship_address1 ship_address2 - ship_city ship_county ship_state ship_zip ship_country - ship_daytime ship_night ship_fax + last first company daytime night fax ) ), @@ -555,6 +548,9 @@ sub new_customer { } ); + $bill_hash = { $template_cust->bill_location->location_hash }; + $ship_hash = { $template_cust->ship_location->location_hash }; + } else { $cust_main = new FS::cust_main ( { |