diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-10-24 00:39:47 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-10-24 00:39:47 -0700 |
commit | ac67ba5d343e1e704b9e706e2aa19ecd979a5863 (patch) | |
tree | 7845c6f834263b063ede352e4d582f4cc301a98d /httemplate/elements/tr-select-discount_class.html | |
parent | adc62b5c44f6e6fddda75aff0d594d7a7d95a403 (diff) |
discount classes, RT#24911
Diffstat (limited to 'httemplate/elements/tr-select-discount_class.html')
-rw-r--r-- | httemplate/elements/tr-select-discount_class.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/httemplate/elements/tr-select-discount_class.html b/httemplate/elements/tr-select-discount_class.html new file mode 100644 index 000000000..5489fe6e8 --- /dev/null +++ b/httemplate/elements/tr-select-discount_class.html @@ -0,0 +1,27 @@ +% if ( scalar(@{ $opt{'discount_class'} }) == 0 ) { + + <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'classnum' %>" VALUE=""> + +% } else { + + <TR> + <TD ALIGN="right"><% $opt{'label'} || 'Discount class' %></TD> + <TD> + <% include( '/elements/select-discount_class.html', + 'curr_value' => $classnum, + %opt + ) + %> + </TD> + </TR> + +% } + +<%init> + +my %opt = @_; +my $classnum = $opt{'curr_value'} || $opt{'value'}; + +$opt{'discount_class'} ||= [ qsearch( 'discount_class', { disabled=>'' } ) ]; + +</%init> |