diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index b75dac978e3..6cd46f6603b 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -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;