Rcupration de l'auteur de la facture

This commit is contained in:
Regis Houssin 2006-06-07 13:54:48 +00:00
parent 85bf8d96c3
commit f71b505445

View File

@ -347,6 +347,23 @@ class Facture
$this->modelpdf = $obj->model_pdf;
$this->lignes = array();
if ($this->user_author)
{
$sql = "SELECT name, firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."user";
$sql.= " WHERE rowid = ".$this->user_author;
$resqluser = $this->db->query($sql);
if ($resqluser)
{
$obju = $this->db->fetch_object($resqluser);
$this->user_author_name = $obju->name;
$this->user_author_firstname = $obju->firstname;
}
}
if ($this->statut == 0)
{
$this->brouillon = 1;