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

Accept property fk_thirdparty instead of fk_soc

parent 75a46030
No related branches found
No related tags found
No related merge requests found
...@@ -598,10 +598,10 @@ abstract class CommonObject ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment