2
0
forked from Wavyzz/dolibarr

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

This commit is contained in:
Regis Houssin
2007-03-10 02:27:50 +00:00
parent fc108e631b
commit 26ed87cb4e

View File

@@ -55,11 +55,11 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user-
if ($_POST["credit"] > 0) if ($_POST["credit"] > 0)
{ {
$amount = $_POST["credit"]; $amount = str_replace(',','.',$_POST["credit"]);
} }
else else
{ {
$amount = - $_POST["debit"]; $amount = - str_replace(',','.',$_POST["debit"]);
} }
$dateop = dolibarr_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]); $dateop = dolibarr_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]);
@@ -75,7 +75,6 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user-
if (! $mesg) if (! $mesg)
{ {
$acct=new Account($db,$account); $acct=new Account($db,$account);
$insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user); $insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user);
if ($insertid > 0) if ($insertid > 0)
{ {