Ajout lien vers facture le cas échéant

This commit is contained in:
Rodolphe Quiedeville 2003-07-21 20:47:39 +00:00
parent 0d6b71387d
commit bb8192222d

View File

@ -27,16 +27,12 @@ class ActionComm
var $date; var $date;
var $type; var $type;
var $priority; var $priority;
var $user; var $user;
var $author; var $author;
var $societe; var $societe;
var $contact; var $contact;
var $note; var $note;
var $percent; var $percent;
@ -75,8 +71,7 @@ class ActionComm
*/ */
Function fetch($id) Function fetch($id)
{ {
$sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note, c.libelle, fk_soc, fk_user_author, fk_contact, fk_facture ";
$sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note,c.libelle, fk_soc, fk_user_author, fk_contact ";
$sql .= "FROM llx_actioncomm as a, c_actioncomm as c WHERE a.id=$id AND a.fk_action=c.id;"; $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) ) if ($this->db->query($sql) )
@ -96,6 +91,13 @@ class ActionComm
$this->contact->id = $obj->fk_contact; $this->contact->id = $obj->fk_contact;
$this->fk_facture = $obj->fk_facture;
if ($this->fk_facture)
{
$this->objet_url = '<a href="'. DOL_URL_ROOT . '/compta/facture.php3?facid='.$this->fk_facture.'">Facture</a>';
}
$this->db->free(); $this->db->free();
} }
} }