diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index e1d73ec6e09..e298ab43467 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2288,10 +2288,10 @@ class CommandeFournisseur extends CommonOrder // Clean vat code $vat_src_code=''; - if (preg_match('/\((.*)\)/', $vatrate, $reg)) + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; - $vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate. + $vatrate = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx);