Skip to content

Commit

Permalink
Accept property fk_thirdparty instead of fk_soc
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 14, 2014
1 parent 75a4603 commit c17f5e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -598,10 +598,10 @@ function fetch_thirdparty()
{
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);
$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->thirdparty = $thirdparty;

Expand Down

0 comments on commit c17f5e7

Please sign in to comment.