From f71b505445e8e7e2501f8410d6dcf1f0f3d712b1 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 7 Jun 2006 13:54:48 +0000 Subject: [PATCH] =?UTF-8?q?R=E9cup=E9ration=20de=20l'auteur=20de=20la=20fa?= =?UTF-8?q?cture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/facture.class.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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;