diff options
Diffstat (limited to 'httemplate/elements/tr-select-discount.html')
| -rw-r--r-- | httemplate/elements/tr-select-discount.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/httemplate/elements/tr-select-discount.html b/httemplate/elements/tr-select-discount.html new file mode 100644 index 000000000..4ff8d1357 --- /dev/null +++ b/httemplate/elements/tr-select-discount.html @@ -0,0 +1,27 @@ +% if ( scalar(@{ $opt{'discount'} }) == 0 ) { + + <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'discountnum' %>" VALUE=""> + +% } else { + + <TR> + <TD ALIGN="right"><% $opt{'label'} || '<B>Discount</B>' %></TD> + <TD> + <% include( '/elements/select-discount.html', + 'curr_value' => $discountnum, + %opt, + ) + %> + </TD> + </TR> + +% } +<%init> + +my %opt = @_; +my $discountnum = $opt{'curr_value'} || $opt{'value'}; + +$opt{'discount'} ||= [ qsearch( 'discount', { disabled=>'' } ) ]; + +</%init> + |
