Suppress zero tax on printed documents.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 13 Apr 2011 07:48:44 +0000 (09:48 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 13 Apr 2011 07:48:44 +0000 (09:48 +0200)
reporting/rep107.php
reporting/rep109.php
reporting/rep110.php
reporting/rep113.php
reporting/rep209.php

index 3401320ed07d763c1a225e51fc6f54b0d3dba6c3..910b5b62d96512a8142aa0ca8bebe4f40c885a75 100644 (file)
@@ -157,6 +157,8 @@ function print_invoices()
                        $first = true;
                while ($tax_item = db_fetch($tax_items))
                {
+                       if ($tax_item['amount'] == 0)
+                               continue;
                        $DisplayTax = number_format2($sign*$tax_item['amount'], $dec);
                        
                        if (isset($suppress_tax_rates) && $suppress_tax_rates == 1)
index 845d0ac746301e19fb1643c60e8380e068b9f91b..25399a4b1471c36e7797ab9d8e8dc55c808b990c 100644 (file)
@@ -166,12 +166,11 @@ function print_sales_orders()
                $first = true;
                foreach($tax_items as $tax_item)
                {
+                       if ($tax_item['Value'] == 0)
+                               continue;
                        $DisplayTax = number_format2($tax_item['Value'], $dec);
 
-                       if (isset($suppress_tax_rates) && $suppress_tax_rates == 1)
-                               $tax_type_name = $tax_item['tax_type_name'];
-                       else
-                               $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) ";
+                       $tax_type_name = $tax_item['tax_type_name'];
 
                        if ($myrow['tax_included'])
                        {
@@ -188,7 +187,7 @@ function print_sales_orders()
                                        $first = false;
                                }
                                else
-                                       $rep->TextCol(3, 7, $doc_Included . " " . $tax_type_name . $doc_Amount . ": " . $DisplayTax, -2);
+                                       $rep->TextCol(3, 7, $doc_Included . " " . $tax_type_name . " " . $doc_Amount . ": " . $DisplayTax, -2);
                        }
                        else
                        {
index 6b392cd0ab3fe987d107348586c74b7d8726c636..06857a8da97770581c4570ac11e61bd45337f5d8 100644 (file)
@@ -168,6 +168,8 @@ function print_deliveries()
                                $first = true;
                        while ($tax_item = db_fetch($tax_items))
                        {
+                               if ($tax_item['amount'] == 0)
+                                       continue;
                                $DisplayTax = number_format2($tax_item['amount'], $dec);
  
                                        if (isset($suppress_tax_rates) && $suppress_tax_rates == 1)
index 3c140ea05f3bcaac752263e29eb6d6236383c3ce..8e36f5543df42abc27cf0edf4076444446626b50 100644 (file)
@@ -157,6 +157,8 @@ function print_credits()
                        $first = true;
                while ($tax_item = db_fetch($tax_items))
                {
+                       if ($tax_item['amount'] == 0)
+                               continue;
                        $DisplayTax = number_format2($sign*$tax_item['amount'], $dec);
                        
                        if (isset($suppress_tax_rates) && $suppress_tax_rates == 1)
index 1d297de54d503f21c47c780e9e1cbeb6a853fef9..e5094ebc9ca05d750700fc30448b5269bdd2be6c 100644 (file)
@@ -172,12 +172,11 @@ function print_po()
                $first = true;
                foreach($tax_items as $tax_item)
                {
+                       if ($tax_item['Value'] == 0)
+                               continue;
                        $DisplayTax = number_format2($tax_item['Value'], $dec);
 
-                       if (isset($suppress_tax_rates) && $suppress_tax_rates == 1)
-                               $tax_type_name = $tax_item['tax_type_name'];
-                       else
-                               $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) ";
+                       $tax_type_name = $tax_item['tax_type_name'];
 
                        if ($myrow['tax_included'])
                        {