From 26ed87cb4e564226cb15f69985b204e69df88f5c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 10 Mar 2007 02:27:50 +0000 Subject: [PATCH] Fix: perte des centimes lors de l'utilisation de la virgule au lieu du point --- htdocs/compta/bank/account.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 1662277801b..f4b1077c48c 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -55,11 +55,11 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user- if ($_POST["credit"] > 0) { - $amount = $_POST["credit"]; + $amount = str_replace(',','.',$_POST["credit"]); } else { - $amount = - $_POST["debit"]; + $amount = - str_replace(',','.',$_POST["debit"]); } $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) { $acct=new Account($db,$account); - $insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user); if ($insertid > 0) {