1 % if ( scalar( @{$opt{'part_referrals'}} ) == 0 ) {
2 <P><FONT SIZE="+1" COLOR="#ff0000">You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to <A HREF="<% popurl(2) %>browse/part_referral.html">advertising source listing</A> and create one or more advertising sources.</FONT>
3 % } elsif ( scalar( @{$opt{'part_referrals'}} ) == 1 ) {
5 <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'refnum' %>" VALUE="<% $opt{'part_referrals'}->[0]->refnum %>">
10 % if ( $opt{'label'} ) {
11 <TD ALIGN="right"><% $opt{'label'} %></TD>
13 <TH ALIGN="right"><%$r%>Advertising source</TH>
16 <% include( '/elements/select-part_referral.html',
17 'curr_value' => $refnum,
28 my $refnum = $opt{'curr_value'} || $opt{'value'};
30 $opt{'part_referrals'} ||=
31 [ FS::part_referral->all_part_referral( 1 ) ]; #1: include global
33 my $r = qq!<font color="#ff0000">*</font> !;