1 <% &ntable("#cccccc") %>
4 <% include('/elements/tr-select-agent.html',
5 'curr_value' => $cust_main->agentnum,
6 'label' => "<B>${r}Agent</B>",
7 'empty_label' => 'Select agent',
8 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
13 % if ( $conf->exists('cust_main-edit_agent_custid') ) {
16 <TD ALIGN="right">Customer identifier</TD>
17 <TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
22 <INPUT TYPE="hidden" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>">
26 %# referral (advertising source)
27 %my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
28 %if ( $custnum && ! $conf->exists('editreferrals') ) {
30 <INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
34 <% include('/elements/tr-select-part_referral.html',
35 'curr_value' => $refnum
42 %my $referring_cust_main = '';
43 %if ( $cust_main->referral_custnum
44 % and $referring_cust_main =
45 % qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
46 % and ! $curuser->access_right('Edit referring customer')
50 <TD ALIGN="right">Referring customer</TD>
52 <A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name %></A>
55 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<% $cust_main->referral_custnum %>">
57 % } elsif ( ! $conf->exists('disable_customer_referrals') ) {
60 <TD ALIGN="right">Referring customer</TD>
62 <!-- <INPUT TYPE="text" NAME="referral_custnum" VALUE=""> -->
63 <% include('/elements/search-cust_main.html',
64 'field_name' => 'referral_custnum',
65 'curr_value' => $cust_main->referral_custnum,
72 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="">
76 % if ( $conf->exists('cust_main-edit_signupdate') ) {
77 <% include('/elements/tr-input-date-field.html', {
78 'name' => 'signupdate',
79 'value' => $cust_main->signupdate,
80 'label' => 'Signup date',
81 'format' => $conf->config('date_format') || "%m/%d/%Y",
90 my( $cust_main, %opt ) = @_;
92 my $custnum = $opt{'custnum'};
94 my $conf = new FS::Conf;
96 my $curuser = $FS::CurrentUser::CurrentUser;
98 my $r = qq!<font color="#ff0000">*</font> !;