From f1d483e58e73d61da98e351dcafa9ca71e9d6013 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 9 May 2006 19:04:01 +0000 Subject: [PATCH] =?UTF-8?q?r=E9cup=E9ration=20de=20l'interlocuteur=20comme?= =?UTF-8?q?rciale=20d'une=20commande?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/commande.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index b9a798babf1..96834f8141d 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -699,6 +699,22 @@ class Commande $this->cond_reglement_code = $objc->code; } } + + if ($this->user_author_id) + { + $sql = "SELECT name, firstname"; + $sql.= " FROM ".MAIN_DB_PREFIX."user"; + $sql.= " WHERE rowid = ".$this->user_author_id; + + $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;