-<TR>
- <TD ALIGN="right">Company</TD>
- <TD BGCOLOR="#FFFFFF"><B><% $prospect_main->company |h %></B></TD>
-</TR>
+%unless ( ! $prospect_main->refnum ) { # || scalar(@part_referral) == 1 ) {
+% my $part_referral = qsearchs('part_referral',{ 'refnum' => $prospect_main->refnum } );
+ <TR>
+ <TD ALIGN="right">Advertising source</TD>
+ <TD BGCOLOR="#ffffff"><% $part_referral->referral |h %></TD>
+ </TR>
+%}
+
+% if ( $prospect_main->company ) {
+ <TR>
+ <TD ALIGN="right">Company</TD>
+ <TD BGCOLOR="#FFFFFF"><B><% $prospect_main->company |h %></B></TD>
+ </TR>
+% }