FIX Bad cleaning of VAT rate when numbers are into code

This commit is contained in:
Laurent Destailleur
2021-01-02 16:51:34 +01:00
parent d46eb08083
commit fd4dab495f
8 changed files with 32 additions and 12 deletions

View File

@@ -3120,7 +3120,9 @@ class Commande extends CommonOrder
$pu = price2num($pu);
$pa_ht = price2num($pa_ht);
$pu_ht_devise = price2num($pu_ht_devise);
$txtva = price2num($txtva);
if (!preg_match('/\((.*)\)/', $txtva)) {
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
}
$txlocaltax1 = price2num($txlocaltax1);
$txlocaltax2 = price2num($txlocaltax2);