From 70e8bf03d33bfded20b546bc19164caf29246784 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 28 Feb 2006 17:45:25 +0000 Subject: [PATCH] =?UTF-8?q?Ajout:=20r=E9cup=E9ration=20des=20libell=E9s=20?= =?UTF-8?q?des=20conditions=20et=20modes=20de=20r=E8glement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/propal.class.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 2e7e58bf200..d068972ae18 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -552,6 +552,23 @@ class Propal $this->mode_reglement_id = $obj->fk_mode_reglement; $this->user_author_id = $obj->fk_user_author; + + if ($this->cond_reglement_id || $this->mode_reglement_id) + { + $sql = "SELECT cr.rowid, cr.libelle as cond_libelle, cr.code as cond_code, cp.rowid, cp.libelle as mode_libelle, cp.code as mode_code"; + $sql.= " FROM ".MAIN_DB_PREFIX."cond_reglement as cr, ".MAIN_DB_PREFIX."c_paiement as cp"; + $sql.= " WHERE cr.rowid = ".this->cond_reglement_id." AND cp.rowid = ".$this->mode_reglement_id; + + $resqlcond = $this->db->query($sql); + + if ($resqlcond) + { + $obj = $this->db->fetch_object($resqlcond); + $this->cond_reglement = $obj->cond_libelle; + $this->mode_reglement = $obj->mode_libelle; + } + } + if ($obj->fk_statut == 0) {