Fix arg type to preg_match() with cast
This commit is contained in:
parent
9b2c6e2afb
commit
3682cec8ff
1 changed files with 2 additions and 2 deletions
|
|
@ -1974,7 +1974,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
|
|
@ -2934,7 +2934,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
}
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = (float) price2num($txlocaltax1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue