From c12ae28ad725c974cfeba9f3f305520d58622c15 Mon Sep 17 00:00:00 2001 From: IC-Ilies Date: Sat, 21 May 2022 09:31:33 +0200 Subject: [PATCH] FIX#20448 missing preg_replace for vat rate when adding a free line --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 54e64c73f99..b40092abfaa 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -838,7 +838,7 @@ if (empty($reshook)) { $prod_entry_mode = GETPOST('prod_entry_mode'); if ($prod_entry_mode == 'free') { $idprod = 0; - $tva_tx = (GETPOST('tva_tx') ? price2num(GETPOST('tva_tx')) : 0); + $tva_tx = (GETPOST('tva_tx') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx'))) : 0); } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = '';