This commit is contained in:
Michael RICOIS 2016-01-11 13:56:09 +00:00
commit a9b2042355
2 changed files with 8 additions and 1 deletions

View File

@ -36,6 +36,12 @@ class MLiens2
*/ */
public $stopAtFirstIsin = false; public $stopAtFirstIsin = false;
/**
* Stop the process to looks for physical person
* @var boolean
*/
public $stopAtPP = true;
/** /**
* Databas table name * Databas table name
* @var string * @var string
@ -262,7 +268,7 @@ class MLiens2
break; break;
} }
//Remove physical person //Remove physical person
elseif ( $item->PpPm == 'PP' ) { elseif ( $item->PpPm == 'PP' && $this->stopAtPP ) {
continue; continue;
} }
//Same id //Same id

View File

@ -1637,6 +1637,7 @@ function LienHeadUltimateData($siren, $nic, $values)
require_once 'Metier/partenaires/classMLiens2.php'; require_once 'Metier/partenaires/classMLiens2.php';
$c = new MLiens2($siren, 'siren', $dbJo); $c = new MLiens2($siren, 'siren', $dbJo);
$c->stopAtPP = false;
$id = $c->getHead(); $id = $c->getHead();
$result = $c->getIdentity($id); $result = $c->getIdentity($id);
$tabData = array(); $tabData = array();