summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-part_referral.html
blob: c4b8829c880aaff6e644cd87c254f5c461a6c94e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<% 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>