From 66fabdd807d9248adb6a08021677d6ec5ce12f48 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 13 Apr 2006 16:23:09 +0000 Subject: [PATCH] Bugfix: #16316 --- htdocs/fourn/facture/paiementfourn.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index 2209b02b263..aaf55ee2b76 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -124,10 +124,10 @@ class PaiementFourn $error = 0; // Nettoyage parametres - $value = price2num($value); $this->total = 0; foreach ($this->amounts as $key => $value) { + $value = price2num($value); $val = round($value, 2); $this->amounts[$key] = $val; $this->total += $val; @@ -152,6 +152,7 @@ class PaiementFourn $facid = $key; if (is_numeric($amount) && $amount <> 0) { + $amount = price2num($amount); $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiementfourn_facturefourn (fk_facturefourn, fk_paiementfourn, amount)'; $sql .= ' VALUES ('.$facid.','. $this->id.',\''.$amount.'\')'; if (! $this->db->query($sql) )