[freeside-commits] branch master updated. 179e9a70dfec14043be265986882ee728454254a

Mark Wells mark at 420.am
Thu Mar 21 23:45:36 PDT 2013


The branch, master has been updated
       via  179e9a70dfec14043be265986882ee728454254a (commit)
      from  efa86b130fe7b16eb5ad2bea1e375be99846cd5d (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 179e9a70dfec14043be265986882ee728454254a
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Mar 21 23:44:22 2013 -0700

    self-signup template customer location fields, #940, #22084

diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index b7dcdbb..2fcc4b1 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 ( {
diff --git a/fs_selfservice/FS-SelfService/cgi/signup.html b/fs_selfservice/FS-SelfService/cgi/signup.html
index e6830c1..6427e6f 100755
--- a/fs_selfservice/FS-SelfService/cgi/signup.html
+++ b/fs_selfservice/FS-SelfService/cgi/signup.html
@@ -149,6 +149,7 @@ $OUT .= qq!
 else {
     @payby = ('PREPAY');
 }
+'';
 %>
 
 <BR>Billing information<TABLE BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>" BORDER=0 CELLSPACING=0 WIDTH="100%">

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ClientAPI/Signup.pm                     |   12 ++++--------
 fs_selfservice/FS-SelfService/cgi/signup.html |    1 +
 2 files changed, 5 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list