Ajout: rcupration des libells des conditions et modes de rglement

This commit is contained in:
Regis Houssin 2006-02-28 17:45:25 +00:00
parent e01ea2cafc
commit 70e8bf03d3

View File

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