add elements for selecting taxproduct
authorivan <ivan>
Sun, 13 Apr 2008 02:56:28 +0000 (02:56 +0000)
committerivan <ivan>
Sun, 13 Apr 2008 02:56:28 +0000 (02:56 +0000)
httemplate/elements/select-taxproduct.html [new file with mode: 0644]
httemplate/elements/tr-select-taxproduct.html [new file with mode: 0644]

diff --git a/httemplate/elements/select-taxproduct.html b/httemplate/elements/select-taxproduct.html
new file mode 100644 (file)
index 0000000..f2ae9eb
--- /dev/null
@@ -0,0 +1,23 @@
+<% ntable("#cccccc", 2) %>
+  <TR>
+    <TD align="right">Tax product</TD>
+    <TD>
+      <INPUT name="part_pkg_taxproduct_taxproductnum" id="taxproductnum" type="hidden" value="<% $opt{'taxproductnum'}%>">
+      <INPUT name="part_pkg_taxproduct_description" id="taxproductnum_description" type="text" value="<% $opt{taxproduct_description} %>" size="12" onclick="overlib( OLiframeContent('<% $p %>/browse/part_pkg_taxproduct.cgi?_type=select&id=taxproductnum&taxproductnum='+document.getElementById('taxproductnum').value, 1000, 400, 'tax_product_popup'), CAPTION, 'Select product', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK); return false;">
+    </TD>
+  </TR>
+  <TR>
+    <TD colspan="2" align="right">
+      <INPUT name="tax_override" id="tax_override" type="hidden" value="<% $opt{tax_override} %>">
+      <A href="javascript:void(0)" onclick="overlib( OLiframeContent('part_pkg_taxoverride.html?selected='+document.getElementById('tax_override').value, 1100, 600, 'tax_product_popup'), CAPTION, 'Edit product tax overrides', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK); return false;">
+        <% $opt{tax_override} ? 'Edit tax overrides' : 'Override taxes' %>
+      </A>
+    </TD>
+  </TR>
+</TABLE>
+
+<%init>
+
+my %opt = @_;
+
+</%init>
diff --git a/httemplate/elements/tr-select-taxproduct.html b/httemplate/elements/tr-select-taxproduct.html
new file mode 100644 (file)
index 0000000..f9f192a
--- /dev/null
@@ -0,0 +1,22 @@
+% if ( $conf->exists('enable_taxproducts') ) { 
+
+    <TR>
+      <TD COLSPAN="2">
+        <% include('select-taxproduct.html', @_) %>
+      </TD>
+    </TR>
+
+% } else { 
+
+    <INPUT TYPE="hidden" NAME="taxproductnum" VALUE="<% $opt{taxproductnum} %>">
+    <INPUT TYPE="hidden" NAME="tax_override"  VALUE="<% $opt{tax_override}  %>">
+
+% } 
+
+<%init>
+
+my $conf = new FS::Conf; 
+
+my %opt = @_;
+
+</%init>