From 11afa5190c9b969348097f28b163fcf795f7ecbd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Wed, 23 May 2007 22:38:46 +0000 Subject: [PATCH] Qual: Ajout logs --- htdocs/paiement.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index 6825f10bf62..7aa2332f52b 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -68,7 +68,7 @@ class Paiement /** * \brief R�cup�re l'objet paiement * \param id id du paiement a r�cup�rer - * \return int <0 si ko, >0 si ok + * \return int <0 si ko, 0 si non trouv�, >0 si ok */ function fetch($id) { @@ -80,6 +80,7 @@ class Paiement $sql.= ' WHERE p.fk_paiement = c.id'; $sql.= ' AND p.rowid = '.$id; + dolibarr_syslog("Paiement::fetch sql=".$sql); $result = $this->db->query($sql); if ($result) @@ -98,13 +99,15 @@ class Paiement $this->type_libelle = $obj->type_libelle; $this->type_code = $obj->type_code; $this->statut = $obj->statut; + + $this->db->free($result); return 1; } else { - return -2; + $this->db->free($result); + return 0; } - $this->db->free($result); } else { -- GitLab