X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fselect-taxproduct.html;h=d08ac22d1a9e03645b62f71e77f26db8c261b262;hp=0f6ef55833c22c0ddad11649f67d273083364dd3;hb=HEAD;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2 diff --git a/httemplate/elements/select-taxproduct.html b/httemplate/elements/select-taxproduct.html index 0f6ef5583..d08ac22d1 100644 --- a/httemplate/elements/select-taxproduct.html +++ b/httemplate/elements/select-taxproduct.html @@ -1,14 +1,79 @@ -<% $opt{'prefix'} %> - <% $opt{'postfix'} %> +% if (!$init) { +% $init = 1; + + +% } +<% $opt{'prefix'} %> + + + +<% $opt{'postfix'} %> +<%shared> +my $init = 0; + <%init> my %opt = @_; @@ -19,10 +84,14 @@ my $description = $opt{'taxproduct_description'}; unless ( $description || ! $value ) { my $part_pkg_taxproduct = qsearchs( 'part_pkg_taxproduct', { 'taxproductnum'=> $value } ); - $description = $part_pkg_taxproduct->description + $description = $part_pkg_taxproduct->taxproduct . ' ' . + $part_pkg_taxproduct->description if $part_pkg_taxproduct; } -my $onclick = $opt{onclick} || "overlib( OLiframeContent('${p}/browse/part_pkg_taxproduct.cgi?_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;"; +my $conf = FS::Conf->new; +my $vendor = lc($conf->config('tax_data_vendor')); +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;";