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 ),
36 % if ( $conf->exists('cust_main-edit_agent_custid') ) {
39 <TD ALIGN="right">Customer identifier</TD>
40 <TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
45 <INPUT TYPE="hidden" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>">
49 %# referral (advertising source)
50 %my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
51 %if ( $custnum && ! $conf->exists('editreferrals') ) {
53 <INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
57 <% include('/elements/tr-select-part_referral.html',
58 'curr_value' => $refnum
65 %my $referring_cust_main = '';
66 %if ( $cust_main->referral_custnum
67 % and $referring_cust_main =
68 % qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
69 % and ! $curuser->access_right('Edit referring customer')
73 <TD ALIGN="right">Referring customer</TD>
75 <A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name %></A>
78 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<% $cust_main->referral_custnum %>">
80 % } elsif ( ! $conf->exists('disable_customer_referrals') ) {
83 <TD ALIGN="right">Referring customer</TD>
85 <!-- <INPUT TYPE="text" NAME="referral_custnum" VALUE=""> -->
86 <% include('/elements/search-cust_main.html',
87 'field_name' => 'referral_custnum',
88 'curr_value' => $cust_main->referral_custnum,
95 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="">
99 % if ( $conf->exists('cust_main-edit_signupdate') ) {
100 <% include('/elements/tr-input-date-field.html', {
101 'name' => 'signupdate',
102 'value' => $cust_main->signupdate,
103 'label' => 'Signup date',
104 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ),
113 my( $cust_main, %opt ) = @_;
115 my $custnum = $opt{'custnum'};
117 my $conf = new FS::Conf;
119 my $curuser = $FS::CurrentUser::CurrentUser;
121 my $r = qq!<font color="#ff0000">*</font> !;