From 1e1c0fc47fc55bce441efd7f96c4683f22600467 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 29 Nov 2004 09:44:03 +0000 Subject: [PATCH] Gestion des la virgule dans l'ajout de ligne, il faut remplacer la vigule avant de faire le test is_numeric --- htdocs/facturefourn.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/facturefourn.class.php b/htdocs/facturefourn.class.php index 0dae380cd40..3bd76ce0a54 100644 --- a/htdocs/facturefourn.class.php +++ b/htdocs/facturefourn.class.php @@ -322,6 +322,9 @@ class FactureFourn */ function updateline($id, $label, $puht, $tauxtva, $qty=1) { + $puht = ereg_replace(",",".",$puht); + $qty = ereg_replace(",",".",$qty); + if (is_numeric($puht) && is_numeric($qty)) { $totalht = ($puht * $qty); @@ -337,11 +340,11 @@ class FactureFourn $sql .= ", tva_taux=" .ereg_replace(",",".",$tauxtva); $sql .= ", total_ttc=".ereg_replace(",",".",$totalttc); - $sql .= " WHERE rowid = $id"; + $sql .= " WHERE rowid = ".$id; if (! $this->db->query($sql) ) { - dolibarr_print_error($this->db); + dolibarr_print_error($this->db); } // Mise a jour prix facture