X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-taxproduct.html;h=0f6ef55833c22c0ddad11649f67d273083364dd3;hb=68c776b1b81217be620c9a4212d6652cc44452e5;hp=74044b10899c7748576b045210e90df819af991d;hpb=935bdc06dc2ac4c39d7bf110b678bff98fc041a8;p=freeside.git
diff --git a/httemplate/elements/select-taxproduct.html b/httemplate/elements/select-taxproduct.html
index 74044b108..0f6ef5583 100644
--- a/httemplate/elements/select-taxproduct.html
+++ b/httemplate/elements/select-taxproduct.html
@@ -1,28 +1,28 @@
-<% 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{'taxproductnum'} ||= $opt{'object'}->taxproductnum
- if $opt{'object'};
-$opt{'taxproduct_description'} ||= $opt{'object'}->taxproduct_description
- if $opt{'object'};
+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;";
%init>