X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Ftop_misc.html;h=c19f347c3297b6cb32372002b148210bdc669c33;hb=622c72770c971ae44d37dfb59a0f25972051a25a;hp=bceb5e15faa950e767edc85a2e30c4df7bd3a33e;hpb=ca87449136cd950891603a71e83ba31b55c76938;p=freeside.git diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html index bceb5e15f..c19f347c3 100644 --- a/httemplate/edit/cust_main/top_misc.html +++ b/httemplate/edit/cust_main/top_misc.html @@ -20,24 +20,35 @@ <% $cust_main->residential_commercial eq 'Commercial' ? 'CHECKED' : '' %> > + @@ -142,9 +159,10 @@ % } else { - <& /elements/tr-select-part_referral.html, - 'curr_value' => $refnum - &> + <& /elements/tr-select-part_referral.html, + 'curr_value' => $refnum, + 'label' => "${r}".emt('Advertising source')."" + &> % } @@ -223,6 +241,8 @@ my( $cust_main, %opt ) = @_; my $custnum = $opt{'custnum'}; +my $conf = new FS::Conf; + if ( $cgi->param('error') ) { $cust_main->set('residential_commercial', ($cgi->param('residential_commercial') eq 'Commercial') @@ -236,12 +256,13 @@ if ( $cgi->param('error') ) { : 'Residential' ); } else { #new customer - #config to default to commercial and/or disable residential when someone needs - $cust_main->set('residential_commercial', 'Residential'); + $cust_main->set('residential_commercial', + $conf->exists('cust_main-default_commercial') + ? 'Commercial' + : 'Residential' + ); } -my $conf = new FS::Conf; - my $curuser = $FS::CurrentUser::CurrentUser; my $r = qq!* !; @@ -255,7 +276,10 @@ foreach (qsearch('agent',{})) { my $agent_ship_location = $cust_main->ship_location; $ship_locked_agents{$agentnum} = +{ map { $_ => $agent_ship_location->$_ } - qw(address1 city state zip country latitude longitude district) + ( + qw(locationname address1 state zip country latitude longitude district), + ($conf->exists('cust_main-no_city_in_address') ? () : 'city') + ) }; }