X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Ftop_misc.html;h=cfed8e4f61bc7c3a1770bf8d5214072fcc451516;hb=3d18177c158acc492e9322677b11c8089df0fbc0;hp=229b84ba41c4175c0fa73fcb3bbc0af59ac4fd8d;hpb=b5dbd9e1bcbb701a20ed23e723b1e0105fd7c1a1;p=freeside.git diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html index 229b84ba4..cfed8e4f6 100644 --- a/httemplate/edit/cust_main/top_misc.html +++ b/httemplate/edit/cust_main/top_misc.html @@ -1,4 +1,42 @@ -<% &ntable("#cccccc") %> + + + + + + + + + + + + +% foreach my $field ($cust_main->virtual_fields) { + <% $cust_main->pvf($field)->widget('HTML', 'edit',$cust_main->getfield($field)) %> +% } %# tags <& /elements/tr-select-cust_tag.html, @@ -76,7 +114,7 @@ @@ -84,7 +122,7 @@ % } elsif ( ! $conf->exists('disable_customer_referrals') ) { - + + + + +% } 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('Referring customer') |h %> - <% $cust_main->referral_custnum %>: <% $referring_cust_main->name %> + <% $cust_main->referral_custnum %>: <% $referring_cust_main->name |h %>
Referring customer<% mt('Referring customer') |h %> <& /elements/search-cust_main.html, 'field_name' => 'referral_custnum', @@ -108,6 +146,30 @@ &> % } +% # permission to edit ticket subjects +% if ( $conf->exists('ticket_system-selfservice_edit_subject') ) { +
+ edit_subject ? 'CHECKED' : '' %>><% mt('Can edit ticket subjects') |h %>
+ calling_list_exempt ? 'CHECKED' : '' %>><% mt('Calling list exempt') |h %>
<%init> @@ -116,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;