FIX#20448 missing preg_replace for vat rate when adding a free line
This commit is contained in:
Laurent Destailleur 2022-05-21 10:33:41 +02:00 committed by GitHub
commit 21c3f27e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = '';