1 <% &ntable("#cccccc") %>
4 <& /elements/tr-select-cust_tag.html,
10 % if ( $cgi->param('lock_agentnum') =~ /^(\d+)$/ && $curuser->agentnum($1) ) {
13 % $cust_main->agentnum($agentnum);
15 <INPUT TYPE="hidden" NAME="lock_agentnum" VALUE="<% $agentnum %>">
16 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agentnum %>">
18 <TD ALIGN="right"><% mt('Agent') |h %></TD>
19 <TD CLASS="fsdisabled"><% $cust_main->agent->agent |h %></TD>
24 <& /elements/tr-select-agent.html,
25 'curr_value' => $cust_main->agentnum,
26 'label' => "<B>${r}".emt('Agent')."</B>",
27 'empty_label' => emt('Select agent'),
28 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
29 'viewall_right' => emt('None'),
35 % if ( $conf->exists('cust_main-edit_agent_custid') ) {
38 <TD ALIGN="right"><% mt('Customer identifier') |h %></TD>
39 <TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
44 <INPUT TYPE="hidden" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>">
49 <& /elements/tr-select-cust_class.html,
50 'curr_value' => $cust_main->classnum,
51 'label' => emt("Class"),
54 %# referral (advertising source)
55 %my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
56 %if ( $custnum && ! $conf->exists('editreferrals') ) {
58 <INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
62 <& /elements/tr-select-part_referral.html,
63 'curr_value' => $refnum
69 %my $referring_cust_main = '';
70 %if ( $cust_main->referral_custnum
71 % and $referring_cust_main =
72 % qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
73 % and ! $curuser->access_right('Edit referring customer')
77 <TD ALIGN="right"><% mt('Referring customer') |h %></TD>
79 <A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name %></A>
82 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<% $cust_main->referral_custnum %>">
84 % } elsif ( ! $conf->exists('disable_customer_referrals') ) {
87 <TD ALIGN="right"><% mt('Referring customer') |h %></TD>
89 <& /elements/search-cust_main.html,
90 'field_name' => 'referral_custnum',
91 'curr_value' => $cust_main->referral_custnum,
97 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="">
101 % if ( $conf->exists('cust_main-edit_signupdate') ) {
102 <& /elements/tr-input-date-field.html, {
103 'name' => 'signupdate',
104 'value' => $cust_main->signupdate,
105 'label' => emt('Signup date'),
106 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ),
111 % # permission to edit ticket subjects
112 % if ( $conf->exists('ticket_system-selfservice_edit_subject') ) {
115 <INPUT TYPE="checkbox" NAME="edit_subject" VALUE="Y" <%
116 $cust_main->edit_subject ? 'CHECKED' : '' %>></TD>
117 <TD ALIGN="left"><% mt('Can edit ticket subjects') |h %></TD>
120 <INPUT TYPE="hidden" NAME="edit_subject" VALUE="<% $cust_main->edit_subject %>">
123 % # permission to edit
124 % if ( $conf->exists('cust_main-edit_calling_list_exempt') ) {
127 <INPUT TYPE="checkbox" NAME="calling_list_exempt" VALUE="Y" <%
128 $cust_main->calling_list_exempt ? 'CHECKED' : '' %>></TD>
129 <TD ALIGN="left"><% mt('Calling list exempt') |h %></TD>
132 <INPUT TYPE="hidden" NAME="calling_list_exempt" VALUE="<% $cust_main->calling_list_exempt %>">
139 my( $cust_main, %opt ) = @_;
141 my $custnum = $opt{'custnum'};
143 my $conf = new FS::Conf;
145 my $curuser = $FS::CurrentUser::CurrentUser;
147 my $r = qq!<font color="#ff0000">*</font> !;