Fix: perte des centimes lors de l'utilisation de la virgule au lieu du point

remplacement avec la fonction price2num
This commit is contained in:
Regis Houssin 2007-03-10 11:12:49 +00:00
parent 7c6e33d6fc
commit 2678673f3f

View File

@ -56,11 +56,11 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user-
if ($_POST["credit"] > 0)
{
$amount = str_replace(',','.',$_POST["credit"]);
$amount = price2num($_POST["credit"]);
}
else
{
$amount = - str_replace(',','.',$_POST["debit"]);
$amount = - price2num($_POST["debit"]);
}
$dateop = dolibarr_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]);