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) {