diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 291ead61cd3..d2ee2bb3079 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -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