RT# 34134 - fixed error where payment amount field is hidden in self service.
[freeside.git] / httemplate / elements / tr-select-discount_class.html
1 % if ( scalar(@{ $opt{'discount_class'} }) == 0 ) { 
2
3   <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'classnum' %>" VALUE="">
4
5 % } else { 
6
7   <TR>
8     <TD ALIGN="right"><% $opt{'label'} || 'Discount class' %></TD>
9     <TD>
10       <% include( '/elements/select-discount_class.html',
11                     'curr_value' => $classnum,
12                     %opt
13                 )
14       %>
15     </TD>
16   </TR>
17
18 % } 
19
20 <%init>
21
22 my %opt = @_;
23 my $classnum = $opt{'curr_value'} || $opt{'value'};
24
25 $opt{'discount_class'} ||= [ qsearch( 'discount_class', { disabled=>'' } ) ];
26
27 </%init>