Fix some warnings -Technical debts-

This commit is contained in:
mohamed daoud
2024-01-23 16:07:59 +01:00
parent 86e3c1e84c
commit 0b4e02821f
4 changed files with 36 additions and 36 deletions

View File

@@ -1553,12 +1553,12 @@ class Commande extends CommonOrder
$ref_ext = '';
}
$remise_percent = price2num($remise_percent);
$qty = price2num($qty);
$remise_percent = (float) price2num($remise_percent);
$qty = (float) price2num($qty);
$pu_ht = price2num($pu_ht);
$pu_ht_devise = price2num($pu_ht_devise);
$pu_ttc = price2num($pu_ttc);
$pa_ht = price2num($pa_ht);
$pa_ht = (float) price2num($pa_ht);
if (!preg_match('/\((.*)\)/', $txtva)) {
$txtva = price2num($txtva); // $txtva can have format '5,1' or '5.1' or '5.1(XXX)', we must clean only if '5,1'
}
@@ -3149,16 +3149,16 @@ class Commande extends CommonOrder
return -1;
}
$remise_percent = price2num($remise_percent);
$qty = price2num($qty);
$remise_percent = (float) price2num($remise_percent);
$qty = (float) price2num($qty);
$pu = price2num($pu);
$pa_ht = price2num($pa_ht);
$pa_ht = (float) price2num($pa_ht);
$pu_ht_devise = price2num($pu_ht_devise);
if (!preg_match('/\((.*)\)/', $txtva)) {
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
}
$txlocaltax1 = price2num($txlocaltax1);
$txlocaltax2 = price2num($txlocaltax2);
$txlocaltax1 = (float) price2num($txlocaltax1);
$txlocaltax2 = (float) price2num($txlocaltax2);
$this->db->begin();