X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Ftop_misc.html;h=7ce283c6c495cf1489e3a8518c2349ee6b2e1f46;hb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;hp=1277d148e91abaea451268360c68558adebc1887;hpb=c405e80203f323a83b447d6fc899dbba32d52f2a;p=freeside.git diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html index 1277d148e..7ce283c6c 100644 --- a/httemplate/edit/cust_main/top_misc.html +++ b/httemplate/edit/cust_main/top_misc.html @@ -1,4 +1,38 @@ -<% &ntable("#cccccc") %> + + + + + + + + + + + % foreach my $field ($cust_main->virtual_fields) { <% $cust_main->pvf($field)->widget('HTML', 'edit',$cust_main->getfield($field)) %> @@ -120,6 +154,20 @@ $cust_main->edit_subject ? 'CHECKED' : '' %>> +% } else { + +% } + +% # permission to edit +% if ( $conf->exists('cust_main-edit_calling_list_exempt') ) { + + + + +% } else { + % }
Residentialresidential_commercial eq 'Commercial' ? '' : 'CHECKED' %> + >
Commercialresidential_commercial eq 'Commercial' ? 'CHECKED' : '' %> + >
<% mt('Can edit ticket subjects') |h %>
+ calling_list_exempt ? 'CHECKED' : '' %>><% mt('Calling list exempt') |h %>
@@ -130,6 +178,23 @@ my( $cust_main, %opt ) = @_; my $custnum = $opt{'custnum'}; +if ( $cgi->param('error') ) { + $cust_main->set('residential_commercial', + ($cgi->param('residential_commercial') eq 'Commercial') + ? 'Commercial' + : 'Residential' + ); +} elsif ( $custnum ) { #editing + $cust_main->set('residential_commercial', + length($cust_main->company) + ? 'Commercial' + : 'Residential' + ); +} else { #new customer + #config to default to commercial and/or disable residential when someone needs + $cust_main->set('residential_commercial', 'Residential'); +} + my $conf = new FS::Conf; my $curuser = $FS::CurrentUser::CurrentUser;