mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Revert "Fix: Disabled if customer is not subject to VAT"
This reverts commit 8f21abfc5a.
This commit is contained in:
@@ -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.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled="disabled"':'').'>';
|
||||
if (! $options_only) $return.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||
|
||||
foreach ($this->cache_vatrates as $rate)
|
||||
{
|
||||
// Force 0 if customer is not subject to VAT
|
||||
if ($disabled && $rate['txtva'] != 0) continue;
|
||||
|
||||
$return.= '<option value="'.$rate['txtva'];
|
||||
$return.= $rate['nprtva'] ? '*': '';
|
||||
$return.= '"';
|
||||
|
||||
@@ -146,7 +146,8 @@ if (! empty($conf->margin->enabled)) {
|
||||
|
||||
<td align="right">
|
||||
<?php
|
||||
echo $form->load_tva('tva_tx', (GETPOST('tva_tx')?GETPOST('tva_tx'):-1), $seller, $buyer);
|
||||
if ($buyer->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" value="0">0';
|
||||
else echo $form->load_tva('tva_tx', (GETPOST('tva_tx')?GETPOST('tva_tx'):-1), $seller, $buyer);
|
||||
?>
|
||||
<input type="hidden" id="origin_tva_tx_cache" name="origin_tva_tx_cache" value="" />
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user