From b1a723d9dd446cfd929706fdb32dc529f5ed8c8c Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 10 Apr 2011 13:10:39 +0200 Subject: [PATCH] Not used tax rates removed from edition form display. --- includes/ui/ui_view.inc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index a469854..199f44f 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -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()); + } } } -- 2.30.2