Not used tax rates removed from edition form display.
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Sun, 10 Apr 2011 11:10:39 +0000 (13:10 +0200)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Sun, 10 Apr 2011 11:10:39 +0000 (13:10 +0200)
includes/ui/ui_view.inc

index a469854c1dbb2c9e6644e456a25a947a0daecff3..199f44fd6f3c7c7c7af99add2f96ada8e3154dba 100644 (file)
@@ -439,16 +439,18 @@ function display_edit_tax_items($taxes, $columns, $tax_included, $leftspan=0)
 
     foreach ($taxes as $taxitem)
     {
-       if ($tax_included)
-       {
-               label_row(_("Included") . " " . $taxitem['tax_type_name']
-                       . " " . number_format2($taxitem['Value'],user_price_dec()), "", "colspan=$columns align=right", "align=right",$leftspan);
-       }
-       else
-       {
-               label_row($taxitem['tax_type_name'],
-                       number_format2($taxitem['Value'],user_price_dec()), "colspan=$columns align=right", "align=right",$leftspan);
-               $total +=  round2($taxitem['Value'], user_price_dec());
+       if (isset($taxitem['rate'])) {
+               if ($tax_included)
+               {
+                       label_row(_("Included") . " " . $taxitem['tax_type_name']
+                               . " " . number_format2($taxitem['Value'],user_price_dec()), "", "colspan=$columns align=right", "align=right",$leftspan);
+               }
+               else
+               {
+                       label_row($taxitem['tax_type_name'],
+                               number_format2($taxitem['Value'],user_price_dec()), "colspan=$columns align=right", "align=right",$leftspan);
+                       $total +=  round2($taxitem['Value'], user_price_dec());
+               }
        }
     }