X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fcust_main%2Ftop_misc.html;h=8f8a96a0c8326828ce1a242d29f9e7c6116b0fc1;hb=e4a3eb292893c0efc15d2ee591fa2a05c31dbeff;hp=f2f584fc514c3092028ec726f222bebae6e7d53d;hpb=c6782ab85ea83e0c78d85b8975985aac9d467f9d;p=freeside.git
diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html
index f2f584fc5..8f8a96a0c 100644
--- a/httemplate/edit/cust_main/top_misc.html
+++ b/httemplate/edit/cust_main/top_misc.html
@@ -20,26 +20,41 @@
<% $cust_main->residential_commercial eq 'Commercial' ? 'CHECKED' : '' %>
>
+
@@ -120,6 +146,11 @@
'label' => emt("Class"),
&>
+%#sales person
+<& /elements/tr-select-sales.html,
+ 'curr_value' => $cust_main->salesnum,
+&>
+
%# referral (advertising source)
%my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
%if ( $custnum && ! $conf->exists('editreferrals') ) {
@@ -128,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').""
+ &>
% }
@@ -209,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')
@@ -222,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!* !;
@@ -241,7 +276,7 @@ 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 city state zip country latitude longitude district)
};
}