forked from Wavyzz/dolibarr
Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, casting, idate
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user