From 3df537fff601a367fd163a15fbe5170a8f58671e Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville <rodolphe@quiedeville.org> Date: Tue, 18 Jan 2005 16:35:57 +0000 Subject: [PATCH] =?UTF-8?q?Modif=20des=20logs=20et=20montant=20n=E9gatif?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/paiement.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index 771092e6c7c..8b625e4f7b8 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -162,24 +162,28 @@ class Paiement $value = trim($value); $amount = ereg_replace(",",".",round($value, 2)); - if (is_numeric($amount) && $amount > 0) + if (is_numeric($amount) && $amount <> 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement_facture (fk_facture, fk_paiement, amount)"; $sql .= " VALUES ('".$facid."','". $this->id."','". $amount."')"; if (! $this->db->query($sql) ) { - dolibarr_print_error($this->db); + dolibarr_syslog("Paiement::Create Erreur INSERT dans paiement_facture ".$facid); $sql_err++; } } + else + { + dolibarr_syslog("Paiement::Create Montant non num�rique"); + } } } else { - dolibarr_print_error($this->db); + dolibarr_syslog("Paiement::Create Erreur INSERT dans paiement"); $sql_err++; } } -- GitLab