Accept property fk_thirdparty instead of fk_soc
This commit is contained in:
parent
75a46030de
commit
c17f5e7f00
@ -598,10 +598,10 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (empty($this->socid) && empty($this->fk_soc)) return 0;
|
if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty)) return 0;
|
||||||
|
|
||||||
$thirdparty = new Societe($this->db);
|
$thirdparty = new Societe($this->db);
|
||||||
$result=$thirdparty->fetch(isset($this->socid)?$this->socid:$this->fk_soc);
|
$result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty));
|
||||||
$this->client = $thirdparty; // deprecated
|
$this->client = $thirdparty; // deprecated
|
||||||
$this->thirdparty = $thirdparty;
|
$this->thirdparty = $thirdparty;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user