Skip to content
Snippets Groups Projects
Commit e1d30837 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Try to remove a warning

parent ada08986
No related branches found
No related tags found
No related merge requests found
......@@ -237,11 +237,14 @@ if ($resql)
$staticmember->id=$obj->rowid;
$staticmember->lastname=$obj->lastname;
$staticmember->firstname=$obj->firstname;
if (! empty($obj->fk_soc)) {
$staticmember->socid = $obj->fk_soc;
if (! empty($obj->fk_soc))
{
$staticmember->fk_soc = $obj->fk_soc;
$staticmember->fetch_thirdparty();
$staticmember->name=$staticmember->thirdparty->name;
} else {
}
else
{
$staticmember->name=$obj->company;
}
$staticmember->ref=$staticmember->getFullName($langs);
......
......@@ -590,7 +590,7 @@ abstract class CommonObject
}
/**
* Load the third party of object from id $this->socid into this->thirdpary
* Load the third party of object, from id $this->socid or $this->fk_soc, into this->thirdpary
*
* @return int <0 if KO, >0 if OK
*/
......@@ -598,10 +598,10 @@ abstract class CommonObject
{
global $conf;
if (empty($this->socid)) return 0;
if (empty($this->socid) && empty($this->fk_soc)) return 0;
$thirdparty = new Societe($this->db);
$result=$thirdparty->fetch($this->socid);
$result=$thirdparty->fetch(isset($this->socid)?$this->socid:$this->fk_soc);
$this->client = $thirdparty; // deprecated
$this->thirdparty = $thirdparty;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment