% include( '/elements/select-table.html',
'table' => 'part_referral',
'name_col' => 'referral',
'value' => $refnum,
'empty_label' => 'Select advertising source',
'hashref' => { 'disabled' => '' },
'extra_sql' => ' AND '.
FS::part_referral->acl_agentnum_sql(1),
%opt,
)
%>
<%init>
my %opt = @_;
my $refnum = $opt{'curr_value'} || $opt{'value'};
$opt{'records'} = delete $opt{'part_referrals'}
if $opt{'part_referrals'};
%init>