From c7e7b6743375f72be94cc2e4aa9d34eb1c684133 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Aug 2012 21:16:41 +0200 Subject: [PATCH] Fix: bad default vat calculation --- htdocs/core/class/html.form.class.php | 12 +----------- htdocs/core/tpl/freeproductline_create.tpl.php | 12 ++++++------ htdocs/core/tpl/objectline_add.tpl.php | 3 ++- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 15646307c91..95af5d1ff25 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3096,20 +3096,10 @@ class Form $defaulttx = $this->cache_vatrates[$num-1]['txtva']; } - // Disabled if customer is not subject to VAT - $disabled=false; - if (is_object($societe_acheteuse) && ! empty($societe_acheteuse->id) - && $societe_acheteuse->tva_assuj == "0") { - $disabled=true; - } - - if (! $options_only) $return.= ''; foreach ($this->cache_vatrates as $rate) { - // Force 0 if customer is not subject to VAT - if ($disabled && $rate['txtva'] != 0) continue; - $return.= '