X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fselect-taxproduct.html;h=07e554927a66636798a1619442851794f5dafbc5;hp=dc7ab97d3668c5e5a06f33ea5e94b084343d772e;hb=7516e3da0f17eeecba27219ef96a8b5f46af2083;hpb=477015901c379f8cd6ba46cfaa4a9ae284ae582d diff --git a/httemplate/elements/select-taxproduct.html b/httemplate/elements/select-taxproduct.html index dc7ab97d3..07e554927 100644 --- a/httemplate/elements/select-taxproduct.html +++ b/httemplate/elements/select-taxproduct.html @@ -1,26 +1,31 @@ -<% ntable("#cccccc", 2) %> - - Tax product - - - - - - - - - - <% $opt{tax_override} ? 'Edit tax overrides' : 'Override taxes' %> - - - - - +<% $opt{'prefix'} %> + <% $opt{'postfix'} %> <%init> my %opt = @_; +my $name = $opt{element_name} || $opt{field} || 'taxproductnum'; +my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value}; +my $description = $opt{'taxproduct_description'}; + +unless ( $description || ! $value ) { + my $part_pkg_taxproduct = + qsearchs( 'part_pkg_taxproduct', { 'taxproductnum'=> $value } ); + $description = $part_pkg_taxproduct->description + if $part_pkg_taxproduct; +} -$opt{'taxproduct_description'} ||= $opt{'object'}->taxproduct_description - if $opt{'object'}; +my $conf = FS::Conf->new; +my $vendor = lc($conf->config('enable_taxproducts')); +my $onclick = $opt{onclick} || + "overlib( OLiframeContent('${p}/browse/part_pkg_taxproduct/$vendor.html?_type=select&id=${name}&taxproductnum='+document.getElementById('${name}').value, 1000, 400, 'tax_product_popup'), CAPTION, 'Select product', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK); return false;";