From bb8192222da7ee7cdafe5e898f33b5cc89674ca1 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 21 Jul 2003 20:47:39 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20lien=20vers=20facture=20le=20cas=20=E9c?= =?UTF-8?q?h=E9ant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/actioncomm.class.php3 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/htdocs/actioncomm.class.php3 b/htdocs/actioncomm.class.php3 index dc2692a8b79..6f2bdf2cca3 100644 --- a/htdocs/actioncomm.class.php3 +++ b/htdocs/actioncomm.class.php3 @@ -27,16 +27,12 @@ class ActionComm var $date; var $type; - var $priority; - var $user; var $author; - var $societe; var $contact; var $note; - var $percent; @@ -56,7 +52,7 @@ class ActionComm Function add($author) { $sql = "INSERT INTO llx_actioncomm (datea, fk_action, fk_soc, fk_user_author, fk_user_action, fk_contact, percent, note,priority) "; - $sql .= " VALUES ('$this->date',$this->type,$this->societe, $author->id,"; + $sql .= " VALUES ('$this->date', $this->type, $this->societe, $author->id,"; $sql .= $this->user->id . ", $this->contact, $this->percent, '$this->note', $this->priority);"; if ($this->db->query($sql) ) @@ -74,9 +70,8 @@ class ActionComm * */ Function fetch($id) - { - - $sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note,c.libelle, fk_soc, fk_user_author, fk_contact "; + { + $sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note, c.libelle, fk_soc, fk_user_author, fk_contact, fk_facture "; $sql .= "FROM llx_actioncomm as a, c_actioncomm as c WHERE a.id=$id AND a.fk_action=c.id;"; if ($this->db->query($sql) ) @@ -95,6 +90,13 @@ class ActionComm $this->author->id = $obj->fk_user_author; $this->contact->id = $obj->fk_contact; + + $this->fk_facture = $obj->fk_facture; + + if ($this->fk_facture) + { + $this->objet_url = 'Facture'; + } $this->db->free(); }