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.= ''; + 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.= 'margin->enabled)) { load_tva('tva_tx', (GETPOST('tva_tx')?GETPOST('tva_tx'):-1), $seller, $buyer); + if ($buyer->tva_assuj == "0") echo '0'; + else echo $form->load_tva('tva_tx', (GETPOST('tva_tx')?GETPOST('tva_tx'):-1), $seller, $buyer); ?>