From 4e586f5d671c32064fc0f2d346ec1fc1f24f82b8 Mon Sep 17 00:00:00 2001 From: erics Date: Sun, 18 Jan 2004 20:29:34 +0000 Subject: [PATCH] =?UTF-8?q?am=E9lioration=20des=20requ=EAtes=20et=20transf?= =?UTF-8?q?ormation=20des=20virgules=20en=20point=20pour=20les=20montants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/bank/account.class.php | 9 +++++---- htdocs/compta/bank/account.php | 4 ++-- htdocs/compta/bank/releve.php | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index df836d97983..ff7a39d3399 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -68,7 +68,7 @@ class Account Function add_url_line($line_id, $url_id, $url, $label) { $sql = "INSERT INTO llx_bank_url (fk_bank, url_id, url, label)"; - $sql .= " VALUES ($line_id, $url_id, '$url', '$label')"; + $sql .= " VALUES ('$line_id', '$url_id', '$url', '$label')"; if ($this->db->query($sql)) { @@ -141,14 +141,15 @@ class Account } $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account, fk_type)"; - $sql .= " VALUES (now(), $date, '$label', $amount,'$author','$num_chq', $this->rowid, '$oper')"; + $sql .= " VALUES (now(), '$date', '$label', '" . ereg_replace(",",".",$amount) . "','$author','$num_chq', '$this->rowid', '$oper')"; + if ($this->db->query($sql)) { $rowid = $this->db->last_insert_id(); if ($categorie) { - $sql = "INSERT INTO llx_bank_class (lineid, fk_categ) VALUES ($rowid, $categorie)"; + $sql = "INSERT INTO llx_bank_class (lineid, fk_categ) VALUES ('$rowid', '$categorie')"; $result = $this->db->query($sql); if ($result){ return $rowid; @@ -181,7 +182,7 @@ class Account if ( $this->update() ) { $sql = "INSERT INTO llx_bank (datec, label, amount, fk_account,datev,dateo,fk_type,rappro) "; - $sql .= " VALUES (now(),'Solde',$this->solde,$this->id,'".$this->db->idate($this->date_solde)."','".$this->db->idate($this->date_solde)."','SOLD',1);"; + $sql .= " VALUES (now(),'Solde','" . ereg_replace(",",".",$this->solde) . "','$this->id','".$this->db->idate($this->date_solde)."','".$this->db->idate($this->date_solde)."','SOLD',1);"; $this->db->query($sql); } diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index c7ff23749dd..9e17a7c5783 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -54,12 +54,12 @@ if ($HTTP_POST_VARS["action"] == 'add' && $_GET["account"]) if ($num_chq) { $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account, fk_type)"; - $sql .= " VALUES (now(), $dateop, '$label', $amount,'$author',$num_chq,$account,'$operation')"; + $sql .= " VALUES (now(), '$dateop', '$label', '$amount','$author','$num_chq','$account','$operation')"; } else { $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account,fk_type)"; - $sql .= " VALUES (now(), $dateop, '$label', $amount,'$author',$account,'$operation')"; + $sql .= " VALUES (now(), '$dateop', '$label', '$amount','$author','$account','$operation')"; } $result = $db->query($sql); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 124d5430b0d..ebce6955af9 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -28,6 +28,7 @@ require("./pre.inc.php"); if (!$user->rights->banque->lire) accessforbidden(); + llxHeader(); if (! strlen($_GET["num"]))