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 } )
49 <TD ALIGN="right">Referring customer</TD>
51 <A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name %></A>
54 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<% $cust_main->referral_custnum %>">
55 % } elsif ( ! $conf->exists('disable_customer_referrals') ) {
59 <TD ALIGN="right">Referring customer</TD>
61 <!-- <INPUT TYPE="text" NAME="referral_custnum" VALUE=""> -->
62 <% include('/elements/search-cust_main.html',
63 'field_name' => 'referral_custnum',
71 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="">
79 my( $cust_main, %opt ) = @_;
81 my $custnum = $opt{'custnum'};
83 my $conf = new FS::Conf;
85 my $r = qq!<font color="#ff0000">*</font> !;