discounts, RT#6679
[freeside.git] / httemplate / elements / select-discount.html
1 <% include( '/elements/select-table.html',
2                  'table'       => 'discount',
3                  'name_col'    => 'description',
4                  'order_by'    => 'ORDER BY discountnum', #XXX weight
5                  'value'       => $discountnum,
6                  'empty_label' => '(none)',
7                  'hashref'     => { 'disabled' => '' },
8                  %opt,
9              )
10 %>
11 <%init>
12
13 my %opt = @_;
14 my $discountnum = $opt{'curr_value'} || $opt{'value'};
15
16 $opt{'records'} = delete $opt{'discount'}
17   if $opt{'discount'};
18
19 </%init>
20