2 my( $refnum, %opt ) = @_;
4 $opt{'part_referrals'} ||=
5 [ FS::part_referral->all_part_referral( 1 ) ]; #1: include global
7 my $r = qq!<font color="#ff0000">*</font> !;
11 <% if ( scalar( @{$opt{'part_referrals'}} ) == 0 ) {
12 eidiot "You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to ". popurl(2). "browse/part_referral.html and create one or more advertising sources.";
13 } elsif ( scalar( @{$opt{'part_referrals'}} ) == 1 ) {
16 <INPUT TYPE="hidden" NAME="refnum" VALUE="<%= $opt{'part_referrals'}->[0]->refnum %>">
21 <TH ALIGN="right"><%=$r%>Advertising source</TH>
23 <%= include( '/elements/select-part_referral.html', $refnum,
24 'part_referrals' => $opt{'part_referrals'},