diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-03-02 23:36:31 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-03-02 23:36:31 -0800 |
commit | c6782ab85ea83e0c78d85b8975985aac9d467f9d (patch) | |
tree | 1787389347daff9e32be8325ddf1c5e423f73163 /httemplate/edit/process/cust_main.cgi | |
parent | 854299338fd5d9f231f47202ef1b37c46f1d1d6c (diff) | |
parent | 6c063e24b90cd374623e2841045fe4c61bed8143 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/process/cust_main.cgi')
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 584462c8c..054973f23 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -62,6 +62,18 @@ $cgi->param('invoicing_list', join(',', @invoicing_list) ); $cgi->param('duplicate_of_custnum') =~ /^(\d+)$/; my $duplicate_of = $1; +# if this is enabled, enforce it +if ( $conf->exists('agent-ship_address', $cgi->param('agentnum')) ) { + my $agent = FS::agent->by_key($cgi->param('agentnum')); + my $agent_cust_main = $agent->agent_cust_main; + if ( $agent_cust_main ) { + my $agent_location = $agent_cust_main->ship_location; + foreach (qw(address1 city state zip country latitude longitude district)) { + $cgi->param("ship_$_", $agent_location->get($_)); + } + } +} + my %locations; for my $pre (qw(bill ship)) { |