Ajout d'infos manquantes dans le fetch
This commit is contained in:
parent
3ee845677f
commit
570179fdf1
@ -20,7 +20,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ActionComm {
|
class ActionComm
|
||||||
|
{
|
||||||
var $id;
|
var $id;
|
||||||
var $db;
|
var $db;
|
||||||
|
|
||||||
@ -39,9 +40,12 @@ class ActionComm {
|
|||||||
var $percent;
|
var $percent;
|
||||||
|
|
||||||
|
|
||||||
Function ActionComm($db) {
|
Function ActionComm($db)
|
||||||
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->societe = new Societe($db);
|
$this->societe = new Societe($db);
|
||||||
|
$this->author = new User($db);
|
||||||
|
$this->contact = new Contact($db);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -67,7 +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 ";
|
$sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note,c.libelle, fk_soc, fk_user_author, fk_contact ";
|
||||||
$sql .= "FROM actioncomm as a, c_actioncomm as c WHERE a.id=$id AND a.fk_action=c.id;";
|
$sql .= "FROM 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) ) {
|
||||||
@ -81,6 +85,10 @@ class ActionComm {
|
|||||||
|
|
||||||
$this->societe->id = $obj->fk_soc;
|
$this->societe->id = $obj->fk_soc;
|
||||||
|
|
||||||
|
$this->author->id = $obj->fk_user_author;
|
||||||
|
|
||||||
|
$this->contact->id = $obj->fk_contact;
|
||||||
|
|
||||||
$this->db->free();
|
$this->db->free();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user