1 <% &ntable("#cccccc") %>
4 <% include('/elements/tr-select-cust_tag.html',
11 % if ( $cgi->param('lock_agentnum') =~ /^(\d+)$/ && $curuser->agentnum($1) ) {
14 % $cust_main->agentnum($agentnum);
16 <INPUT TYPE="hidden" NAME="lock_agentnum" VALUE="<% $agentnum %>">
17 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agentnum %>">
19 <TD ALIGN="right">Agent</TD>
20 <TD CLASS="fsdisabled"><% $cust_main->agent->agent |h %></TD>
25 <% include('/elements/tr-select-agent.html',
26 'curr_value' => $cust_main->agentnum,
27 'label' => "<B>${r}Agent</B>",
28 'empty_label' => 'Select agent',
29 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
30 'viewall_right' => 'None', #override default 'View customers of all agents'
37 % if ( $conf->exists('cust_main-edit_agent_custid') ) {
40 <TD ALIGN="right">Customer identifier</TD>
41 <TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
46 <INPUT TYPE="hidden" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>">
51 <% include('/elements/tr-select-cust_class.html',
52 'curr_value' => $cust_main->classnum,
54 #'empty_label' => '(none)',
59 %# referral (advertising source)
60 %my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
61 %if ( $custnum && ! $conf->exists('editreferrals') ) {
63 <INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
67 <% include('/elements/tr-select-part_referral.html',
68 'curr_value' => $refnum
75 %my $referring_cust_main = '';
76 %if ( $cust_main->referral_custnum
77 % and $referring_cust_main =
78 % qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
79 % and ! $curuser->access_right('Edit referring customer')
83 <TD ALIGN="right">Referring customer</TD>
85 <A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name %></A>
88 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<% $cust_main->referral_custnum %>">
90 % } elsif ( ! $conf->exists('disable_customer_referrals') ) {
93 <TD ALIGN="right">Referring customer</TD>
95 <!-- <INPUT TYPE="text" NAME="referral_custnum" VALUE=""> -->
96 <% include('/elements/search-cust_main.html',
97 'field_name' => 'referral_custnum',
98 'curr_value' => $cust_main->referral_custnum,
105 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="">
109 % if ( $conf->exists('cust_main-edit_signupdate') ) {
110 <% include('/elements/tr-input-date-field.html', {
111 'name' => 'signupdate',
112 'value' => $cust_main->signupdate,
113 'label' => 'Signup date',
114 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ),
123 my( $cust_main, %opt ) = @_;
125 my $custnum = $opt{'custnum'};
127 my $conf = new FS::Conf;
129 my $curuser = $FS::CurrentUser::CurrentUser;
131 my $r = qq!<font color="#ff0000">*</font> !;