2
0
forked from Wavyzz/dolibarr

Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, casting, idate

This commit is contained in:
MDW
2024-03-23 01:11:55 +01:00
parent 7762e3eb69
commit c822795cc1

View File

@@ -1634,8 +1634,8 @@ class Commande extends CommonOrder
$price = $pu;
$remise = 0;
if ($remise_percent > 0) {
$remise = round(($pu * $remise_percent / 100), 2);
$price = $pu - $remise;
$remise = round(((float) $pu * $remise_percent / 100), 2);
$price = (float) $pu - $remise;
}
// Insert line
@@ -3187,8 +3187,8 @@ class Commande extends CommonOrder
}
$remise = 0;
if ($remise_percent > 0) {
$remise = round(($pu * $remise_percent / 100), 2);
$price = ($pu - $remise);
$remise = round(((float) $pu * $remise_percent / 100), 2);
$price = ((float) $pu - $remise);
}
//Fetch current line from the database and then clone the object and set it in $oldline property