From f6289297dac16af4d1ed7749249a817d05b933ec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Dec 2022 12:35:54 +0100 Subject: [PATCH] FIX #21280 FIX #23008 --- htdocs/contrat/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index a4a270f5227..b10517c58a9 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -491,6 +491,8 @@ if (empty($reshook)) { $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx)); + $pu_ht = price2num($price_ht, 'MU'); + // On reevalue prix selon taux tva car taux tva transaction peut etre different // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). if ($tmpvat != $tmpprodvat) { @@ -516,7 +518,7 @@ if (empty($reshook)) { $fk_unit = $prod->fk_unit; } else { - $pu_ht = GETPOST('price_ht'); + $pu_ht = price2num($price_ht, 'MU'); $price_base_type = 'HT'; $tva_tx = GETPOST('tva_tx') ?str_replace('*', '', GETPOST('tva_tx')) : 0; // tva_tx field may be disabled, so we use vat rate 0 $tva_npr = preg_match('/\*/', GETPOST('tva_tx')) ? 1 : 0;