Library Update
This commit is contained in:
parent
50065e7903
commit
c6b6d63c77
@ -487,19 +487,30 @@ class Metier_Bodacc_MBodacc
|
|||||||
'Liquidateurs?'=>1900,
|
'Liquidateurs?'=>1900,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PDO Connection with Doctrine
|
||||||
|
* @var \Doctrine\DBAL\Connection
|
||||||
|
*/
|
||||||
|
protected $conn;
|
||||||
|
|
||||||
protected $iDb;
|
protected $iDb;
|
||||||
|
|
||||||
public function __construct($db = null)
|
/**
|
||||||
|
* Bodacc
|
||||||
|
* @param \Doctrine\DBAL\Connection $conn
|
||||||
|
*/
|
||||||
|
public function __construct($conn = null)
|
||||||
{
|
{
|
||||||
if ( $db === null ) {
|
if ($conn === null) {
|
||||||
$this->iDb = new Metier_Util_Db();
|
$this->conn = Zend_Registry::get('doctrine');
|
||||||
} else {
|
}
|
||||||
$this->iDb = $db;
|
else {
|
||||||
}
|
$this->conn = $conn;
|
||||||
|
}
|
||||||
|
|
||||||
/** Charge toute la table des tribunaux pour ne pas lancer systématiquement des requètes sur le serveur MySQL
|
/* Charge toute la table des tribunaux pour ne pas lancer systématiquement des
|
||||||
** lors des intégrations de Bodacc
|
* requètes sur le serveur MySQL lors des intégrations de Bodacc
|
||||||
**/
|
*/
|
||||||
$this->tabTribunaux = $this->getTabTribunaux();
|
$this->tabTribunaux = $this->getTabTribunaux();
|
||||||
$this->tabFctDir = $this->getTabFctDir();
|
$this->tabFctDir = $this->getTabFctDir();
|
||||||
$this->tabEvenements = $this->getTabEvenements();
|
$this->tabEvenements = $this->getTabEvenements();
|
||||||
@ -508,7 +519,7 @@ class Metier_Bodacc_MBodacc
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converti les accents au format TLS du Bodacc
|
* Converti les accents au format TLS du Bodacc
|
||||||
* @param string $texteBodacc
|
* @param string $texteBodacc
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -535,16 +546,28 @@ class Metier_Bodacc_MBodacc
|
|||||||
$cache = dirname(__FILE__) . '/../Table/BodaccTribunaux.php';
|
$cache = dirname(__FILE__) . '/../Table/BodaccTribunaux.php';
|
||||||
if ( file_exists($cache) ) {
|
if ( file_exists($cache) ) {
|
||||||
return include $cache;
|
return include $cache;
|
||||||
} else {
|
}
|
||||||
$rep=$this->iDb->select('jo.tribunaux', 'triCode, triNom, triCP, triSiret', "triCode IS NOT NULL");
|
else {
|
||||||
$tabTribunaux=array();
|
$tribunaux = array();
|
||||||
foreach($rep as $k=>$trib) {
|
|
||||||
$dep=substr($trib['triCP'],0,2)*1;
|
$sql = "SELECT triCode, triNom, triCP, triSiret FROM jo.tribunaux WHERE triCode IS NOT NULL";
|
||||||
if ($dep==97 || $dep==98) $dep=substr($trib['triCP'],0,3)*1;
|
$stmt = $this->conn->prepare($sql);
|
||||||
$tabTmp=array($trib['triCode']=>array('nom'=>$trib['triNom'],'siret'=>$trib['triSiret'],'dep'=>$dep));
|
$stmt->execute();
|
||||||
$tabTribunaux=array_merge($tabTribunaux, $tabTmp);
|
if ($stmt->rowCount()) {
|
||||||
}
|
while ($t = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||||
return $tabTribunaux;
|
$dep = intval(substr($t->triCP, 0, 2));
|
||||||
|
if ($dep == 97 || $dep == 98) {
|
||||||
|
$dep = intval(substr($t->triCP, 0, 3));
|
||||||
|
}
|
||||||
|
$tribunaux[$t->triCode] = array(
|
||||||
|
'nom' => $t->triNom,
|
||||||
|
'siret' => $t->triSiret,
|
||||||
|
'dep' => $dep
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $tribunaux;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -557,13 +580,20 @@ class Metier_Bodacc_MBodacc
|
|||||||
$cache = dirname(__FILE__) . '/../Table/FctDir.php';
|
$cache = dirname(__FILE__) . '/../Table/FctDir.php';
|
||||||
if ( file_exists($cache) ) {
|
if ( file_exists($cache) ) {
|
||||||
return include $cache;
|
return include $cache;
|
||||||
} else {
|
}
|
||||||
$rep=$this->iDb->select('jo.bodacc_fonctions', 'codeFct, libelle', '1');
|
else {
|
||||||
$tabRet=array();
|
$result = array();
|
||||||
foreach($rep as $tabFct)
|
|
||||||
$tabRet[$tabFct['codeFct']*1]=$tabFct['libelle'];
|
|
||||||
|
|
||||||
return $tabRet;
|
$sql = "SELECT codeFct, libelle FROM jo.bodacc_fonctions";
|
||||||
|
$stmt = $this->conn->prepare($sql);
|
||||||
|
$stmt->execute();
|
||||||
|
if ($stmt->rowCount()) {
|
||||||
|
while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||||
|
$result[intval($row->codeFct)] = $row->libelle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,22 +614,24 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function getTribunauxParCommune($codeInseeCommune)
|
public function getTribunauxParCommune($codeInseeCommune)
|
||||||
{
|
{
|
||||||
$tabTribunaux = array();
|
$result = array();
|
||||||
|
|
||||||
$rep = $this->iDb->select('jo.tribunaux t, jo.tribunauxInsee i',
|
$sql = "SELECT t.triId, t.triIdSup, i.CodeInsee, t.triCode, t.triType, t.triNom,
|
||||||
't.triId, t.triIdSup, i.CodeInsee, t.triCode, t.triType, t.triNom, t.triCP, LPAD(t.triTel,10,0) AS triTel,
|
t.triCP, LPAD(t.triTel,10,0) AS triTel, LPAD(t.triFax,10,0) AS triFax, t.triWeb,
|
||||||
LPAD(t.triFax,10,0) AS triFax, t.triWeb, t.triMail, t.triSiret, t.triAdrNum, t.triAdrIndRep,
|
t.triMail, t.triSiret, t.triAdrNum, t.triAdrIndRep, t.triAdrTypeVoie, t.triAdrVoie,
|
||||||
t.triAdrTypeVoie, t.triAdrVoie, t.triAdrComp, t.triVille, t.triStatut, t.triDateCessation, t.triCommentaire,
|
t.triAdrComp, t.triVille, t.triStatut, t.triDateCessation, t.triCommentaire,
|
||||||
t.triNumGreffe',
|
t.triNumGreffe
|
||||||
"i.CodeInsee='$codeInseeCommune' AND i.triId=t.triId ORDER BY t.triNumGreffe DESC, t.triId ASC",
|
FROM jo.tribunaux t, jo.tribunauxInsee i
|
||||||
false, MYSQL_ASSOC);
|
WHERE i.CodeInsee= :inseeCode AND i.triId=t.triId
|
||||||
if (count($rep) > 0) {
|
ORDER BY t.triNumGreffe DESC, t.triId ASC";
|
||||||
foreach($rep as $k => $trib) {
|
$stmt = $this->conn->prepare($sql);
|
||||||
$tabTribunaux[] = $trib;
|
$stmt->bindValue('inseeCode', $codeInseeCommune);
|
||||||
}
|
$stmt->execute();
|
||||||
}
|
if ($stmt->rowCount()) {
|
||||||
|
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
return $tabTribunaux;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -609,30 +641,28 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function getTribunauxParDep($dep)
|
public function getTribunauxParDep($dep)
|
||||||
{
|
{
|
||||||
$tabTribunaux = array();
|
$result = array();
|
||||||
|
|
||||||
$fields = 't.triId, t.triIdSup, t.triCode, t.triType, t.triNom, t.triCP, LPAD(t.triTel,10,0) AS triTel,
|
$sql = "SELECT t.triId, t.triIdSup, t.triCode, t.triType, t.triNom, t.triCP,
|
||||||
LPAD(t.triFax,10,0) AS triFax, t.triWeb, t.triMail, t.triSiret, t.triAdrNum, t.triAdrIndRep,
|
LPAD(t.triTel,10,0) AS triTel, LPAD(t.triFax,10,0) AS triFax, t.triWeb, t.triMail,
|
||||||
t.triAdrTypeVoie, t.triAdrVoie, t.triAdrComp, t.triVille, t.triStatut, t.triDateCessation, t.triCommentaire,
|
t.triSiret, t.triAdrNum, t.triAdrIndRep, t.triAdrTypeVoie, t.triAdrVoie, t.triAdrComp,
|
||||||
t.triNumGreffe';
|
t.triVille, t.triStatut, t.triDateCessation, t.triCommentaire, t.triNumGreffe
|
||||||
|
FROM jo.tribunaux t WHERE t.triCP BETWEEN :dep1 AND :dep2 ORDER BY t.triType ASC";
|
||||||
if ( $dep<96 ) {
|
$stmt = $this->conn->prepare($sql);
|
||||||
$rep = $this->iDb->select(
|
if ($dep < 96) {
|
||||||
'jo.tribunaux t', $fields,
|
$stmt->bindValue('dep1', $dep.'000');
|
||||||
"t.triCP BETWEEN '".$dep."000' AND '".$dep."999' ORDER BY t.triType ASC", false, MYSQL_ASSOC
|
$stmt->bindValue('dep2', $dep.'999');
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$rep = $this->iDb->select(
|
|
||||||
'jo.tribunaux t', $fields,
|
|
||||||
"t.triCP BETWEEN '".$dep."00' AND '".$dep."99' ORDER BY t.triType ASC", false, MYSQL_ASSOC
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if ( count($rep)>0 ) {
|
else {
|
||||||
foreach($rep as $k=>$trib) {
|
$stmt->bindValue('dep1', $dep.'00');
|
||||||
$tabTribunaux[]=$trib;
|
$stmt->bindValue('dep2', $dep.'99');
|
||||||
}
|
}
|
||||||
}
|
$stmt->execute();
|
||||||
return $tabTribunaux;
|
if ($stmt->rowCount()) {
|
||||||
|
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -641,12 +671,19 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function getTribunalIdCA($codeTribunal)
|
public function getTribunalIdCA($codeTribunal)
|
||||||
{
|
{
|
||||||
$rep = $this->iDb->select('jo.tribunaux', 'triIdSup', "triCode='$codeTribunal'");
|
$sql = "SELECT triIdSup FROM jo.tribunaux WHERE triCode = :code";
|
||||||
return $rep[0][0];
|
$stmt = $this->conn->prepare($sql);
|
||||||
|
$stmt->bindValue('code', $codeTribunal);
|
||||||
|
$stmt->execute();
|
||||||
|
if ($stmt->rowCount()) {
|
||||||
|
return $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Liste des tribunaux
|
||||||
*/
|
*/
|
||||||
public function getListeTribunaux()
|
public function getListeTribunaux()
|
||||||
{
|
{
|
||||||
@ -662,19 +699,26 @@ class Metier_Bodacc_MBodacc
|
|||||||
$cache = dirname(__FILE__) . '/../Table/Evenements.php';
|
$cache = dirname(__FILE__) . '/../Table/Evenements.php';
|
||||||
if ( file_exists($cache) ) {
|
if ( file_exists($cache) ) {
|
||||||
return include $cache;
|
return include $cache;
|
||||||
} else {
|
}
|
||||||
$rep = $this->iDb->select('jo.tabEvenements', 'codEven, libEven, Bodacc_Code, Rubrique, version, lienEtab', '1', false, MYSQL_ASSOC);
|
else {
|
||||||
$tabRet = array();
|
$result = array();
|
||||||
foreach($rep as $k => $even) {
|
|
||||||
$tabRet[$even['codEven']] = array(
|
$sql = "SELECT codEven, libEven, Bodacc_Code, Rubrique, version, lienEtab FROM jo.tabEvenements";
|
||||||
'libEven' => $even['libEven'],
|
$stmt = $this->conn->prepare($sql);
|
||||||
'Bodacc_Code' => $even['Bodacc_Code'],
|
$stmt->execute();
|
||||||
'Rubrique' => $even['Rubrique'],
|
if ($stmt->rowCount()) {
|
||||||
'Version' => $even['version'],
|
while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||||
'LienEtab' => $even['lienEtab'],
|
$result[$row->codEven] = array(
|
||||||
);
|
'libEven' => $row->libEven,
|
||||||
}
|
'Bodacc_Code' => $row->Bodacc_Code,
|
||||||
return $tabRet;
|
'Rubrique' => $row->Rubrique,
|
||||||
|
'Version' => $row->version,
|
||||||
|
'LienEtab' => $row->lienEtab,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -687,14 +731,20 @@ class Metier_Bodacc_MBodacc
|
|||||||
$cache = dirname(__FILE__) . '/../Table/Devises.php';
|
$cache = dirname(__FILE__) . '/../Table/Devises.php';
|
||||||
if ( file_exists($cache) ) {
|
if ( file_exists($cache) ) {
|
||||||
return include $cache;
|
return include $cache;
|
||||||
} else {
|
}
|
||||||
$rep = $this->iDb->select('jo.bodacc_devises', 'libDeviseBodacc, devIso', '1', false, MYSQL_ASSOC);
|
else {
|
||||||
$tabDevises = array();
|
$result = array();
|
||||||
foreach($rep as $k => $trib) {
|
|
||||||
$tabTmp = array($trib['libDeviseBodacc'] => $trib['devIso']);
|
$sql = "SELECT libDeviseBodacc, devIso FROM jo.bodacc_devises";
|
||||||
$tabDevises = array_merge($tabDevises, $tabTmp);
|
$stmt = $this->conn->prepare($sql);
|
||||||
}
|
$stmt->execute();
|
||||||
return $tabDevises;
|
if ($stmt->rowCount()) {
|
||||||
|
while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||||
|
$result[$row->libDeviseBodacc] = $row->devIso;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -781,24 +831,29 @@ class Metier_Bodacc_MBodacc
|
|||||||
if ($dep != 0 && ($tribunal['dep'])*1 == $dep ) {
|
if ($dep != 0 && ($tribunal['dep'])*1 == $dep ) {
|
||||||
if ( str_replace('TGIcc', 'TGI', strtr($tribunal['nom'],array('-'=>' ',' DE LA REUNION'=>''))) == $libelleDuTribunal ) {
|
if ( str_replace('TGIcc', 'TGI', strtr($tribunal['nom'],array('-'=>' ',' DE LA REUNION'=>''))) == $libelleDuTribunal ) {
|
||||||
return $code;
|
return $code;
|
||||||
} elseif ( str_replace('TIcc', 'TI', strtr($tribunal['nom'],array('-'=>' ',' DE LA REUNION'=>''))) == $libelleDuTribunal ) {
|
}
|
||||||
|
elseif ( str_replace('TIcc', 'TI', strtr($tribunal['nom'],array('-'=>' ',' DE LA REUNION'=>''))) == $libelleDuTribunal ) {
|
||||||
return $code;
|
return $code;
|
||||||
} elseif (preg_match('/^PREFECTURE/i',$libelleDuTribunal) && preg_match('/^PREFECTURE/i',$tribunal['nom'])) {
|
}
|
||||||
|
elseif (preg_match('/^PREFECTURE/i',$libelleDuTribunal) && preg_match('/^PREFECTURE/i',$tribunal['nom'])) {
|
||||||
return $code;
|
return $code;
|
||||||
} elseif (preg_match('/^SOUS.PREFECTURE/i',$libelleDuTribunal) && preg_match('/^SOUS.PREFECTURE/i',$tribunal['nom'])) {
|
}
|
||||||
|
elseif (preg_match('/^SOUS.PREFECTURE/i',$libelleDuTribunal) && preg_match('/^SOUS.PREFECTURE/i',$tribunal['nom'])) {
|
||||||
$sprefEnBase = trim(preg_replace('/^SOUS.PREFECTURE (DE|DU|D\')/i','',$tribunal['nom']));
|
$sprefEnBase = trim(preg_replace('/^SOUS.PREFECTURE (DE|DU|D\')/i','',$tribunal['nom']));
|
||||||
$sprefParam = trim(strtr(strtr(preg_replace('/^SOUS.PREFECTURE/i','',$libelleDuTribunal), array(
|
$sprefParam = trim(strtr(strtr(preg_replace('/^SOUS.PREFECTURE/i','',$libelleDuTribunal), array(
|
||||||
'SAINT '=>'ST ', 'SAINTE '=>'STE ', 'BASSIN ARCACHON'=>'ARCACHON', ' (DRÔME)'=>'')),'ÀÂÈÎÔ','AAEIO'));
|
'SAINT '=>'ST ', 'SAINTE '=>'STE ', 'BASSIN ARCACHON'=>'ARCACHON', ' (DRÔME)'=>'')),'ÀÂÈÎÔ','AAEIO'));
|
||||||
if($sprefEnBase == $sprefParam) {
|
if($sprefEnBase == $sprefParam) {
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
} elseif ($dep == 13 && $tribunal['nom'] == 'TGI TARASCON' && $libelleDuTribunal == 'TGI TARASCON SUR RHONE') {
|
}
|
||||||
|
elseif ($dep == 13 && $tribunal['nom'] == 'TGI TARASCON' && $libelleDuTribunal == 'TGI TARASCON SUR RHONE') {
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
elseif ($dep==13 && $tribunal['nom']=='TC TARASCON' && $libelleDuTribunal == 'TC TARASCON SUR RHONE') {
|
elseif ($dep==13 && $tribunal['nom']=='TC TARASCON' && $libelleDuTribunal == 'TC TARASCON SUR RHONE') {
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
} elseif ( $dep==0 && str_replace('TGIcc', 'TGI', strtr($tribunal['nom'],array('-'=>' ',' DE LA REUNION'=>''))) == $libelleDuTribunal ) {
|
}
|
||||||
|
elseif ( $dep==0 && str_replace('TGIcc', 'TGI', strtr($tribunal['nom'],array('-'=>' ',' DE LA REUNION'=>''))) == $libelleDuTribunal ) {
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
elseif ( $dep==978 && str_replace('TGIcc', 'TGI', strtr($tribunal['nom'],array('-'=>' ',' DE LA REUNION'=>''))) == $libelleDuTribunal ) {
|
elseif ( $dep==978 && str_replace('TGIcc', 'TGI', strtr($tribunal['nom'],array('-'=>' ',' DE LA REUNION'=>''))) == $libelleDuTribunal ) {
|
||||||
@ -812,12 +867,15 @@ class Metier_Bodacc_MBodacc
|
|||||||
}
|
}
|
||||||
elseif ( $dep==975 && $libelleDuTribunal=='TGI SAINT PIERRE') {
|
elseif ( $dep==975 && $libelleDuTribunal=='TGI SAINT PIERRE') {
|
||||||
return $code;
|
return $code;
|
||||||
} elseif ( $dep==70 && $libelleDuTribunal=='TC VESOUL') {
|
}
|
||||||
|
elseif ( $dep==70 && $libelleDuTribunal=='TC VESOUL') {
|
||||||
return $code;
|
return $code;
|
||||||
} elseif ( ($dep==95 || $dep==975)
|
}
|
||||||
|
elseif ( ($dep==95 || $dep==975)
|
||||||
&& ($libelleDuTribunal=='TRIBUNAL PREMIERE INSTANCE SAINT PIERRE ET MIQUELON' || $libelleDuTribunal=='TPI SAINT PIERRE ET MIQUELON') ) {
|
&& ($libelleDuTribunal=='TRIBUNAL PREMIERE INSTANCE SAINT PIERRE ET MIQUELON' || $libelleDuTribunal=='TPI SAINT PIERRE ET MIQUELON') ) {
|
||||||
return $code;
|
return $code;
|
||||||
} elseif ( ($dep==971 || $dep==985 || $dep==976)
|
}
|
||||||
|
elseif ( ($dep==971 || $dep==985 || $dep==976)
|
||||||
&& ($libelleDuTribunal=='TRIBUNAL PREMIERE INSTANCE MAMOUDZOU' || $libelleDuTribunal=='TPI MAMOUDZOU') ) {
|
&& ($libelleDuTribunal=='TRIBUNAL PREMIERE INSTANCE MAMOUDZOU' || $libelleDuTribunal=='TPI MAMOUDZOU') ) {
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
@ -851,11 +909,15 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function getEvenement($codeEven)
|
public function getEvenement($codeEven)
|
||||||
{
|
{
|
||||||
$code = ((int)$codeEven)*1;
|
$code = intval($codeEven);
|
||||||
if ($code == 0) {
|
if ($code == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return @$this->tabEvenements[$code]['libEven'];
|
if (array_key_exists($code, $this->tabEvenements)) {
|
||||||
|
return $this->tabEvenements[$code]['libEven'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -865,11 +927,15 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function getVersionEvenement($codeEven)
|
public function getVersionEvenement($codeEven)
|
||||||
{
|
{
|
||||||
$code = ((int)$codeEven)*1;
|
$code = intval($codeEven);
|
||||||
if ($code == 0) {
|
if ($code == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return @$this->tabEvenements[$code]['Version'];
|
if (array_key_exists($code, $this->tabEvenements)) {
|
||||||
|
return $this->tabEvenements[$code]['Version'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -879,11 +945,15 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function getChapitreEvenement($codeEven)
|
public function getChapitreEvenement($codeEven)
|
||||||
{
|
{
|
||||||
$code = ((int)$codeEven)*1;
|
$code = intval($codeEven);
|
||||||
if ($code == 0) {
|
if ($code == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return @$this->tabEvenements[$code]['Rubrique'];
|
if (array_key_exists($code, $this->tabEvenements)) {
|
||||||
|
return $this->tabEvenements[$code]['Rubrique'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -893,9 +963,15 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function getEditionEvenement($codeEven)
|
public function getEditionEvenement($codeEven)
|
||||||
{
|
{
|
||||||
$code=$codeEven*1;
|
$code = intval($codeEven);
|
||||||
if ($code==0) return false;
|
if ($code == 0) {
|
||||||
return @$this->tabEvenements[$code]['Bodacc_Code'];
|
return false;
|
||||||
|
}
|
||||||
|
if (array_key_exists($code, $this->tabEvenements)) {
|
||||||
|
return $this->tabEvenements[$code]['Bodacc_Code'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -905,11 +981,15 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function isEvenementEtab($codeEven)
|
public function isEvenementEtab($codeEven)
|
||||||
{
|
{
|
||||||
$code = $codeEven*1;
|
$code = intval($codeEven);
|
||||||
if ($code == 0) {
|
if ($code == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return @$this->tabEvenements[$code]['LienEtab'];
|
if (array_key_exists($code, $this->tabEvenements)) {
|
||||||
|
return $this->tabEvenements[$code]['LienEtab'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -940,16 +1020,18 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function addDeviseBodacc($strDevise, $deviseIso)
|
public function addDeviseBodacc($strDevise, $deviseIso)
|
||||||
{
|
{
|
||||||
if (!$this->iDb->insert('jo.bodacc_devises', array(
|
$result = $this->conn->insert('jo.bodacc_devices', array(
|
||||||
'libDeviseBodacc' => $strDevise,
|
'libDeviseBodacc' => $strDevise,
|
||||||
'devIso' => $deviseIso,
|
'devIso' => $deviseIso,
|
||||||
'dateInsert' => date('YmdHis')),true)) {
|
'dateInsert' => date('YmdHis')
|
||||||
return false;
|
));
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
$this->tabDevises = $this->getTabDevises();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// On réinitialise le tableau des devises du Bodacc
|
return false;
|
||||||
$this->tabDevises=$this->getTabDevises();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -984,94 +1066,111 @@ class Metier_Bodacc_MBodacc
|
|||||||
return intval($code);
|
return intval($code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param string $strAdministration
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function getDirigeants($strAdministration)
|
public function getDirigeants($strAdministration)
|
||||||
{
|
{
|
||||||
$tabRet=array();
|
$tabRet = array();
|
||||||
$strFonctions=$this->regExFonction;
|
$strFonctions = $this->regExFonction;
|
||||||
$tabNoms=array();
|
$tabNoms = array();
|
||||||
if (is_array($strAdministration))
|
if (is_array($strAdministration)) {
|
||||||
$strAdministration=implode('. ', $strAdministration);
|
$strAdministration = implode('. ', $strAdministration);
|
||||||
$strAdministration=trim($strAdministration);
|
}
|
||||||
$strAdministration=str_ireplace('Nom d\'usage :', 'Nom d\'usage =', trim($strAdministration));
|
$strAdministration = trim($strAdministration);
|
||||||
if ($strAdministration=='') return $tabRet;
|
$strAdministration = str_ireplace('Nom d\'usage :', 'Nom d\'usage =', trim($strAdministration));
|
||||||
$tabAdministration=explode(':', $strAdministration);
|
if ($strAdministration == '') {
|
||||||
//file_put_contents('coucou.log',print_r($tabAdministration, 1), FILE_APPEND);
|
return $tabRet;
|
||||||
$tabFonctions=$tabNoms=$tabCodeFct=$tabOldFct=array();
|
}
|
||||||
|
$tabAdministration = explode(':', $strAdministration);
|
||||||
|
$tabFonctions = $tabNoms = $tabCodeFct = $tabOldFct = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On boucle sur chaque ligne qui doit contenir NOM PRENOM suivi de la fonction de la ligne suivante
|
* On boucle sur chaque ligne qui doit contenir NOM PRENOM suivi de la fonction de la ligne suivante
|
||||||
* La première ligne ne contient pas de NOM PRENOM car il s'agit de la 1ère ligne
|
* La première ligne ne contient pas de NOM PRENOM car il s'agit de la 1ère ligne
|
||||||
*/
|
*/
|
||||||
foreach ($tabAdministration as $i=>$ligne) {
|
foreach ($tabAdministration as $i => $ligne) {
|
||||||
|
// On recherche la fonction et son code fonction de la ligne
|
||||||
/** On recherche la fonction et son code fonction de la ligne */
|
foreach ($this->tabDirigeants as $fonction => $numFct) {
|
||||||
foreach ($this->tabDirigeants as $fonction=>$numFct) {
|
|
||||||
|
|
||||||
//file_put_contents('coucou.log','Fonction : '.$fonction, FILE_APPEND);
|
|
||||||
//@todo : provisoire table bdd en utf8
|
|
||||||
if (preg_match("/(.*)$fonction(.*)$/iu", $ligne, $matches)) {
|
if (preg_match("/(.*)$fonction(.*)$/iu", $ligne, $matches)) {
|
||||||
//file_put_contents('coucou.log',"Matched \n", FILE_APPEND);
|
$tabFonctions[$i] = '';
|
||||||
$tabCodeFct[$i]=$numFct;
|
$tabCodeFct[$i] = $numFct;
|
||||||
$tabFonctions[$i]=@preg_replace("/($strFonctions)/i", '', $tabAdministration[$i+1]);
|
$tabOldFct[$i] = 0;
|
||||||
if(@preg_match("/(partant|ancien|suppression|cha.g|d.part|d.mis(si|is)on|r.vocation)/iu", $tabAdministration[$i+1]))
|
if (array_key_exists($i+1, $tabAdministration)) {
|
||||||
$tabOldFct[$i]=1;
|
$tabFonctions[$i] = preg_replace("/($strFonctions)/i", '', $tabAdministration[$i+1]);
|
||||||
else
|
if(preg_match("/(partant|ancien|suppression|cha.g|d.part|d.mis(si|is)on|r.vocation)/iu", $tabAdministration[$i+1])) {
|
||||||
$tabOldFct[$i]=0;
|
$tabOldFct[$i] = 1;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
//file_put_contents('coucou.log',"\n", FILE_APPEND);
|
|
||||||
}
|
|
||||||
} //file_put_contents('coucou.log',print_r($tabFonctions, 1), FILE_APPEND);
|
|
||||||
/** On boucle sur chaque fonction trouvée et on extrait les noms, prénoms **/
|
|
||||||
foreach ($tabFonctions as $i=>$ligne) {//$ligne
|
|
||||||
$numFonction=$tabCodeFct[$i];
|
|
||||||
$oldFonction=$tabOldFct[$i];
|
|
||||||
$ligne=trim($ligne);
|
|
||||||
/** Chaque Noms pour une même focntion doit être séparée par " et " ou ";" */
|
|
||||||
$strNoms=str_replace(' et ', ';', $ligne);
|
|
||||||
$tabNoms=explode(';', $strNoms);
|
|
||||||
$raisonSociale=$nom=$prenom=$usage='';
|
|
||||||
foreach ($tabNoms as $noms) {
|
|
||||||
if (preg_match("/^(.*)\((.*)\).*\((.*)\)/i", $noms, $matches)) {
|
|
||||||
//Cas type NOM (prenom) (Nom usage : XXXX)
|
|
||||||
$nom=trim(str_replace(':', '', $matches[1]));
|
|
||||||
if (preg_match("/(.*)repr.sent.e?(.*)/iu", $nom, $matches2)) {
|
|
||||||
$raisonSociale=$matches2[1];
|
|
||||||
$nom=trim(str_replace('par ', '', $matches2[2]));
|
|
||||||
}
|
|
||||||
$prenom=trim(str_replace('par ', '', $matches[2]));
|
|
||||||
$usage=trim(str_ireplace('Nom d\'usage =', '', $matches[3]));
|
|
||||||
} elseif (preg_match("/^(.*)\((.*)\)/iu", $noms, $matches)) {
|
|
||||||
$nom=trim(str_replace(':', '', $matches[1]));
|
|
||||||
if (preg_match("/(.*)repr.sent.e?(.*)/iu", $nom, $matches2)) {
|
|
||||||
$raisonSociale=$matches2[1];
|
|
||||||
$nom=trim(str_replace('par ', '', $matches2[2]));
|
|
||||||
}
|
|
||||||
$prenom=trim($matches[2]);
|
|
||||||
$usage='';
|
|
||||||
//Cas type NOM (prenom)
|
|
||||||
} elseif (preg_match("/^(.*)/i", $noms, $matches)) {
|
|
||||||
$tabNomPrenom=$this->getNomPrenomGenre(trim(str_replace(':', '', $matches[1])));
|
|
||||||
$nom=$tabNomPrenom['Nom'];
|
|
||||||
$prenom=$tabNomPrenom['Prenoms'];
|
|
||||||
$usage='';
|
|
||||||
} else
|
|
||||||
die("Cas non gérée pour cette structure de noms : '$noms'");
|
|
||||||
/** @todo Il manque le cas de repr par pour le STE ??? **/
|
|
||||||
if (preg_match('/(en fonction le)|(modification le)/Ui', $nom)) {
|
|
||||||
echo "Je remplace le nom du dirigeant BODACC '$nom' par ";
|
|
||||||
$nom=preg_replace('/\s+en fonction le.*$/','', $nom);
|
|
||||||
$nom=preg_replace('/\s+modification le.*$/','', $nom);
|
|
||||||
echo "'$nom'".PHP_EOL;
|
|
||||||
}
|
|
||||||
$tabRet[]=array('fonction'=>$numFonction, 'rs'=>trim(str_replace(',','',$raisonSociale)), 'nom'=>$nom, 'prenom'=>$prenom, 'nomUsage'=>$usage, 'depart'=>$oldFonction);
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// On boucle sur chaque fonction trouvée et on extrait les noms, prénoms
|
||||||
|
foreach ($tabFonctions as $i => $ligne) {
|
||||||
|
$numFonction = $tabCodeFct[$i];
|
||||||
|
$oldFonction = $tabOldFct[$i];
|
||||||
|
$ligne = trim($ligne);
|
||||||
|
// Chaque Noms pour une même fonction doit être séparée par " et " ou ";" */
|
||||||
|
$strNoms = str_replace(' et ', ';', $ligne);
|
||||||
|
$tabNoms = explode(';', $strNoms);
|
||||||
|
$raisonSociale = $nom = $prenom = $usage = '';
|
||||||
|
foreach ($tabNoms as $noms) {
|
||||||
|
// Cas type NOM (prenom) (Nom usage : XXXX)
|
||||||
|
if (preg_match("/^(.*)\((.*)\).*\((.*)\)/i", $noms, $matches)) {
|
||||||
|
$nom = trim(str_replace(':', '', $matches[1]));
|
||||||
|
if (preg_match("/(.*)repr.sent.e?(.*)/iu", $nom, $matches2)) {
|
||||||
|
$raisonSociale = $matches2[1];
|
||||||
|
$nom = trim(str_replace('par ', '', $matches2[2]));
|
||||||
|
}
|
||||||
|
$prenom = trim(str_replace('par ', '', $matches[2]));
|
||||||
|
$usage = trim(str_ireplace('Nom d\'usage =', '', $matches[3]));
|
||||||
}
|
}
|
||||||
//print_r($tabRet);
|
elseif (preg_match("/^(.*)\((.*)\)/iu", $noms, $matches)) {
|
||||||
//$saisie = fgets(STDIN);
|
$nom = trim(str_replace(':', '', $matches[1]));
|
||||||
|
if (preg_match("/(.*)repr.sent.e?(.*)/iu", $nom, $matches2)) {
|
||||||
|
$raisonSociale = $matches2[1];
|
||||||
|
$nom = trim(str_replace('par ', '', $matches2[2]));
|
||||||
|
}
|
||||||
|
$prenom = trim($matches[2]);
|
||||||
|
$usage = '';
|
||||||
|
}
|
||||||
|
// Cas type NOM (prenom)
|
||||||
|
elseif (preg_match("/^(.*)/i", $noms, $matches)) {
|
||||||
|
$tabNomPrenom = $this->getNomPrenomGenre(trim(str_replace(':', '', $matches[1])));
|
||||||
|
$nom = $tabNomPrenom['Nom'];
|
||||||
|
$prenom = $tabNomPrenom['Prenoms'];
|
||||||
|
$usage = '';
|
||||||
|
}
|
||||||
|
// Cas non gérée
|
||||||
|
else {
|
||||||
|
//die("Cas non gérée pour cette structure de noms : '$noms'");
|
||||||
|
}
|
||||||
|
// @todo Il manque le cas de repr par pour le STE ???
|
||||||
|
if (preg_match('/(en fonction le)|(modification le)/Ui', $nom)) {
|
||||||
|
//echo "Je remplace le nom du dirigeant BODACC '$nom' par ";
|
||||||
|
$nom = preg_replace('/\s+en fonction le.*$/','', $nom);
|
||||||
|
$nom = preg_replace('/\s+modification le.*$/','', $nom);
|
||||||
|
//echo "'$nom'".PHP_EOL;
|
||||||
|
}
|
||||||
|
$tabRet[] = array(
|
||||||
|
'fonction' => $numFonction,
|
||||||
|
'rs' => trim(str_replace(',','',$raisonSociale)),
|
||||||
|
'nom' => $nom,
|
||||||
|
'prenom' => $prenom,
|
||||||
|
'nomUsage' => $usage,
|
||||||
|
'depart' => $oldFonction
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $tabRet;
|
return $tabRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1084,12 +1183,20 @@ class Metier_Bodacc_MBodacc
|
|||||||
{
|
{
|
||||||
$noms = $prenoms = $genre = '';
|
$noms = $prenoms = $genre = '';
|
||||||
$tabMots = preg_split('/( +|\.+)/', $strNomPrenom);
|
$tabMots = preg_split('/( +|\.+)/', $strNomPrenom);
|
||||||
foreach ($tabMots as $i=>$prenom) {
|
foreach ($tabMots as $i => $prenom) {
|
||||||
$tabPrenoms = $this->iDb->select('npaipp.pp_prenoms', 'prenom, genre, mixte, nbTot',
|
if (strlen(trim($prenom)) == 0 || strlen(trim($prenom, " '*-/")) <= 1) {
|
||||||
"prenom='".addslashes($prenom)."' AND nbTot>100 ORDER BY nbTot DESC",
|
$noms.= $prenom.' ';
|
||||||
false, MYSQL_ASSOC);
|
continue;
|
||||||
if (count($tabPrenoms) > 0) {
|
}
|
||||||
$tabPrenom = $tabPrenoms[0];
|
try {
|
||||||
|
$stmt = $this->conn->query("SELECT prenom, genre, mixte, nbTot FROM npaipp.pp_prenoms
|
||||||
|
WHERE prenom='".addslashes($prenom)."' AND nbTot>100 ORDER BY nbTot DESC");
|
||||||
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($stmt->rowCount()) {
|
||||||
|
$tabPrenom = $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||||
// C'est plutôt le nom de famille au début de la chaîne
|
// C'est plutôt le nom de famille au début de la chaîne
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
$noms.= $prenom.' ';
|
$noms.= $prenom.' ';
|
||||||
@ -1109,9 +1216,9 @@ class Metier_Bodacc_MBodacc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array(
|
return array(
|
||||||
'Nom' => trim($noms),
|
'Nom' => trim($noms),
|
||||||
'Prenoms' => preg_replace('/,$/','',trim($prenoms)),
|
'Prenoms' => preg_replace('/,$/','',trim($prenoms)),
|
||||||
'Genre' => $genre
|
'Genre' => $genre
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1124,25 +1231,31 @@ class Metier_Bodacc_MBodacc
|
|||||||
*/
|
*/
|
||||||
public function getNumPageAnnonce($bodaccCode, $annee, $num)
|
public function getNumPageAnnonce($bodaccCode, $annee, $num)
|
||||||
{
|
{
|
||||||
$tabRet = array();
|
$result = array();
|
||||||
$bodacc = $this->iDb->select('jo.bodacc',
|
|
||||||
'Bodacc_Code, Bodacc_Annee_Parution, Bodacc_Num, Num_Annonce, Tribunal_Dept, Tribunal_Code, Rubrique_Bodacc, length(annonce) as Long',
|
|
||||||
"Bodacc_Code='$bodaccCode' AND Bodacc_Annee_Parution=$annee AND Bodacc_Num=$num");
|
|
||||||
|
|
||||||
foreach ($bodacc as $k=>$ann) {
|
$sql = "SELECT Bodacc_Code, Bodacc_Annee_Parution, Bodacc_Num, Num_Annonce, Tribunal_Dept, Tribunal_Code, Rubrique_Bodacc, length(annonce) as Long
|
||||||
$tabRet[$k] = array(
|
FROM jo.bodacc WHERE Bodacc_Code=:code AND Bodacc_Annee_Parution=:annee AND Bodacc_Num=:num";
|
||||||
'BodaccCode' => $ann['Bodacc_Code'],
|
$stmt = $this->conn->prepare($sql);
|
||||||
'AnneeParution' => $ann['Bodacc_Annee_Parution'],
|
$stmt->bindValue('code', $bodaccCode);
|
||||||
'BodaccNum' => $ann['Bodacc_Num'],
|
$stmt->bindValue('annee', $annee);
|
||||||
'NumAnnonce' => $ann['Num_Annonce'],
|
$stmt->bindValue('num', $num);
|
||||||
'Departement' => $ann['Tribunal_Dept'],
|
$stmt->execute();
|
||||||
'Tribunal' => $ann['Tribunal_Code'],
|
if ($stmt->rowCount()) {
|
||||||
'Rubrique' => $ann['Rubrique_Bodacc'],
|
while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||||
'nbCar' => $ann['Long'],
|
$result[] = array(
|
||||||
);
|
'BodaccCode' => $ann->Bodacc_Code,
|
||||||
}
|
'AnneeParution' => $ann->Bodacc_Annee_Parution,
|
||||||
|
'BodaccNum' => $ann->Bodacc_Num,
|
||||||
|
'NumAnnonce' => $ann->Num_Annonce,
|
||||||
|
'Departement' => $ann->Tribunal_Dept,
|
||||||
|
'Tribunal' => $ann->Tribunal_Code,
|
||||||
|
'Rubrique' => $ann->Rubrique_Bodacc,
|
||||||
|
'nbCar' => $ann->Long,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $tabRet;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1164,125 +1277,134 @@ class Metier_Bodacc_MBodacc
|
|||||||
case 'METZG': // Le mercredi
|
case 'METZG': // Le mercredi
|
||||||
case 'MULHOG': // Le mercredi
|
case 'MULHOG': // Le mercredi
|
||||||
$droitLocal=true;
|
$droitLocal=true;
|
||||||
if ($jourJug==3) {
|
if ($jourJug == 3) {
|
||||||
echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du mercredi !".PHP_EOL;
|
echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du mercredi !".PHP_EOL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'THIONG': // Le jeudi à 9h
|
case 'THIONG': // Le jeudi à 9h
|
||||||
$droitLocal=true;
|
$droitLocal = true;
|
||||||
if ($jourJug==4) {
|
if ($jourJug == 4) {
|
||||||
echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du jeudi !".PHP_EOL;
|
echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du jeudi !".PHP_EOL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'SARREG': // Les 1er, 2ème et 4ème mardi
|
case 'SARREG': // Les 1er, 2ème et 4ème mardi
|
||||||
$droitLocal=true;
|
$droitLocal = true;
|
||||||
if ($jourJug==2 && $jjJug<15 && $jjJug>21) {
|
if ($jourJug==2 && $jjJug<15 && $jjJug>21) {
|
||||||
echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du mardi !".PHP_EOL;
|
echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du mardi !".PHP_EOL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'STRASG': // ?
|
case 'STRASG': // ?
|
||||||
$droitLocal=true;
|
$droitLocal = true;
|
||||||
//echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles de Strasbourg !".PHP_EOL;
|
//echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles de Strasbourg !".PHP_EOL;
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
case 'SAVERG': // Le mardi et 2ème, 3ème et 4ème vendredi
|
case 'SAVERG': // Le mardi et 2ème, 3ème et 4ème vendredi
|
||||||
$droitLocal=true;
|
$droitLocal = true;
|
||||||
if ($jourJug==2 || ($jourJug==5 && $jjJug>7)) {
|
if ($jourJug == 2 || ($jourJug == 5 && $jjJug > 7)) {
|
||||||
echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du vendredi !".PHP_EOL;
|
echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du vendredi !".PHP_EOL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case 'COLMAG': // ?
|
case 'COLMAG': // ?
|
||||||
$droitLocal=true;
|
$droitLocal = true;
|
||||||
//echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles de Colmar !".PHP_EOL;
|
//echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles de Colmar !".PHP_EOL;
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($droitLocal && preg_match("/insolvabilit.{0,3}notoire/iu", $texteAnnonce))
|
if ($droitLocal && preg_match("/insolvabilit.{0,3}notoire/iu", $texteAnnonce)) {
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getJALparDep($dep)
|
public function getJALparDep($dep)
|
||||||
{
|
{
|
||||||
$tabRet = array();
|
$result = array();
|
||||||
$rep = $this->iDb->select('jo.tabJAL',
|
|
||||||
'id, dep, nomJal, siteWeb, email, adresse, cp, ville, tel, fax, parution, aboAnnuel, infos',
|
|
||||||
"dep=$dep", false, MYSQL_ASSOC);
|
|
||||||
foreach($rep as $k => $jal) {
|
|
||||||
$tabRet[] = $jal;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $tabRet;
|
$sql = "SELECT id, dep, nomJal, siteWeb, email, adresse, cp, ville, tel, fax, parution, aboAnnuel, infos
|
||||||
|
FROM jo.tabJAL WHERE dep = :dep";
|
||||||
|
$stmt = $this->conn->prepare($sql);
|
||||||
|
$stmt->bindValue('dep', $dep);
|
||||||
|
$stmt->execute();
|
||||||
|
if ($stmt->rowCount()) {
|
||||||
|
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getListeJalCollecte()
|
public function getListeJalCollecte()
|
||||||
{
|
{
|
||||||
$tabRet = array();
|
$result = array();
|
||||||
$rep = $this->iDb->select('jo.tabJAL', 'id, nomJal', 'sedDateAbo<>0 GROUP BY nomJal ORDER BY nomJal ASC', false, MYSQL_ASSOC);
|
|
||||||
foreach($rep as $k => $jal) {
|
|
||||||
$tabRet['_'.$jal['id']] = $jal['nomJal'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $tabRet;
|
$sql = "SELECT id, nomJal FROM jo.tabJAL WHERE sedDateAbo!=0 GROUP BY nomJal ORDER BY nomJal ASC";
|
||||||
|
$stmt = $this->conn->prepare($sql);
|
||||||
|
$stmt->bindValue('dep', $dep);
|
||||||
|
$stmt->execute();
|
||||||
|
if ($stmt->rowCount()) {
|
||||||
|
while($row = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||||
|
$result['_'.$row->id] = $row->nomJal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recherche de l'activité réelle
|
||||||
|
* @param string $siren
|
||||||
|
* @param string $fj
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getActiviteReelle($siren, $fj)
|
public function getActiviteReelle($siren, $fj)
|
||||||
{
|
{
|
||||||
$strEvenVtLg = " AND Rubrique<>'ventes' AND typeEven NOT LIKE '%2700%' AND typeEven NOT LIKE '%2701%' AND typeEven NOT LIKE '%2702%' AND typeEven NOT LIKE '%2703%' AND typeEven NOT LIKE '%2710%' AND typeEven NOT LIKE '%2720%' AND typeEven NOT LIKE '%2721%' AND typeEven NOT LIKE '%2725%' AND typeEven NOT LIKE '%2730%' AND typeEven NOT LIKE '%2740%' AND typeEven NOT LIKE '%2750%' AND typeEven NOT LIKE '%2800%' AND typeEven NOT LIKE '%2840%' AND typeEven NOT LIKE '%2850%' AND typeEven NOT LIKE '%2851%' AND typeEven NOT LIKE '%2860%' AND typeEven NOT LIKE '%2870%' AND typeEven NOT LIKE '%2875%' AND typeEven NOT LIKE '%2880%' AND typeEven NOT LIKE '%2881%' AND typeEven NOT LIKE '%2885%' AND typeEven NOT LIKE '%2890%' AND typeEven NOT LIKE '%2891%' AND typeEven NOT LIKE '%2892%' ";
|
$strEvenVtLg = " AND Rubrique!='ventes' AND typeEven NOT LIKE '%2700%' AND typeEven NOT LIKE '%2701%' AND typeEven NOT LIKE '%2702%' AND typeEven NOT LIKE '%2703%' AND typeEven NOT LIKE '%2710%' AND typeEven NOT LIKE '%2720%' AND typeEven NOT LIKE '%2721%' AND typeEven NOT LIKE '%2725%' AND typeEven NOT LIKE '%2730%' AND typeEven NOT LIKE '%2740%' AND typeEven NOT LIKE '%2750%' AND typeEven NOT LIKE '%2800%' AND typeEven NOT LIKE '%2840%' AND typeEven NOT LIKE '%2850%' AND typeEven NOT LIKE '%2851%' AND typeEven NOT LIKE '%2860%' AND typeEven NOT LIKE '%2870%' AND typeEven NOT LIKE '%2875%' AND typeEven NOT LIKE '%2880%' AND typeEven NOT LIKE '%2881%' AND typeEven NOT LIKE '%2885%' AND typeEven NOT LIKE '%2890%' AND typeEven NOT LIKE '%2891%' AND typeEven NOT LIKE '%2892%' ";
|
||||||
/** Recherche de l'activité réelle **/
|
$sql = "SELECT Activite FROM jo.bodacc_detail WHERE siren=:siren AND Activite<>'' AND Activite NOT LIKE 'non precis%' $strEvenVtLg ORDER BY Bodacc_Date_Parution DESC LIMIT 0,1";
|
||||||
$bodacc = $this->iDb->select('jo.bodacc_detail', 'Activite',
|
$stmt = $this->conn->prepare($sql);
|
||||||
"siren=$siren AND Activite<>'' AND Activite NOT LIKE 'non precis%' $strEvenVtLg ORDER BY Bodacc_Date_Parution DESC LIMIT 0,1", false, MYSQL_ASSOC);
|
$stmt->bindValue('siren', $siren);
|
||||||
$annCap = @$bodacc[0];
|
$stmt->execute();
|
||||||
|
$annCap = $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||||
if ($fj < 7000 || $fj > 7999) {
|
if ($fj < 7000 || $fj > 7999) {
|
||||||
$tabRet['Activite'] = trim($annCap['Activite']);
|
$activite = trim($annCap['Activite']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($tabRet['Activite'] == '' && trim($tab['activite']) != '') {
|
if ($activite == '' && ($fj > 90 && $fj < 94 || $fj > 9000 && $fj < 9400) ) {
|
||||||
$tabRet['Activite'] =trim($tab['activite']);
|
$sql = "SELECT Assoc_Objet, Assoc_NObjet FROM jo.asso WHERE siren=:siren AND (Assoc_Objet!='' OR Assoc_NObjet!='') ORDER BY Date_Parution DESC LIMIT 0,1";
|
||||||
}
|
$stmt = $this->conn->prepare($sql);
|
||||||
elseif ($tabRet['Activite'] == '' && ($fj > 90 && $fj < 94 || $fj > 9000 && $fj < 9400) ) {
|
$stmt->bindValue('siren', $siren);
|
||||||
$siretMin = (''.$siren.'00000')*1;
|
$stmt->execute();
|
||||||
$siretMax = (''.$siren.'99999')*1;
|
$annCap = $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||||
$bodacc = $this->iDb->select('jo.asso', 'Assoc_Web, Assoc_Mail, Assoc_Objet, Assoc_NObjet',
|
$activite = trim($annCap['Assoc_NObjet']);
|
||||||
"siren=$siren AND (Assoc_Objet<>'' OR Assoc_NObjet<>'') ORDER BY Date_Parution DESC LIMIT 0,1", false, MYSQL_ASSOC);
|
if ($activite == '') {
|
||||||
$annCap = @$bodacc[0];
|
$activite = trim($annCap['Assoc_Objet']);
|
||||||
$tabRet['Activite'] = trim($annCap['Assoc_NObjet']);
|
|
||||||
if ($tabRet['Activite'] == '') {
|
|
||||||
$tabRet['Activite'] = trim($annCap['Assoc_Objet']);
|
|
||||||
}
|
|
||||||
if ($tabRet['Web']=='') {
|
|
||||||
$tabRet['Web'] = trim($annCap['Assoc_Web']);
|
|
||||||
}
|
|
||||||
if ($tabRet['Mail']=='') {
|
|
||||||
$tabRet['Mail'] = trim($annCap['Assoc_Mail']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($tabRet['Activite'] == '' && ($fj < 7000 || $fj > 7999)) {
|
elseif ($activite == '' && ($fj < 7000 || $fj > 7999)) {
|
||||||
$bodaccHisto = $this->iDb->select('historiques.entrep e, historiques.texte x',
|
$sql = "SELECT e.ANBASE, e.NOBOD, e.CODTRI, e.JAL, e.DATE, e.CODEVE, e.SSCODE, e.DEPT, e.NOANN, e.ROLE, e.SIREN, e.E1GSIR, e.E1GNIC, x.annonceNum, x.annonceTxt
|
||||||
'e.ANBASE, e.NOBOD, e.CODTRI, e.JAL, e.DATE, e.CODEVE, e.SSCODE, e.DEPT, e.NOANN, e.ROLE, e.SIREN, e.E1GSIR, e.E1GNIC, x.annonceNum, x.annonceTxt',
|
FROM historiques.entrep e, historiques.texte x
|
||||||
"e.E1GSIR=$siren AND e.ANBASE=x.annonceNum AND e.DATE BETWEEN 19890101 AND 20041231 AND x.annonceTxt LIKE '%ctivit%' GROUP BY e.ANBASE ORDER BY e.DATE DESC", false, MYSQL_ASSOC);
|
WHERE e.E1GSIR=:siren AND e.ANBASE=x.annonceNum AND e.DATE BETWEEN 19890101 AND 20041231 AND x.annonceTxt LIKE '%ctivit%'
|
||||||
if (count($bodaccHisto) > 0) {
|
GROUP BY e.ANBASE ORDER BY e.DATE DESC";
|
||||||
foreach ($bodaccHisto as $idx => $ann) {
|
$stmt = $this->conn->prepare($sql);
|
||||||
if ($tabCodeTri != '' && $tabCodeTri != @$ann['CODTRI']) {
|
$stmt->bindValue('siren', $siren);
|
||||||
$tabCodeTri = @$ann['CODTRI'];
|
$stmt->execute();
|
||||||
}
|
if ($stmt->rowCount()) {
|
||||||
if ( ($ann['CODEVE'] < 20) || ($ann['CODEVE'] >= 30 && $ann['CODEVE'] < 42)
|
while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||||
|| ($ann['CODEVE'] >= 51 && $ann['CODEVE'] < 80) ) {
|
if ( ($ann['CODEVE'] < 20) || ($ann['CODEVE'] >= 30 && $ann['CODEVE'] < 42) || ($ann['CODEVE'] >= 51 && $ann['CODEVE'] < 80) ) {
|
||||||
if (preg_match('/(.*)Activit(?:e|é)(?:.|)\:(.*)(?:Adresse(?:.*|)|Commentaires?|Administration|Etablissement principal|Date d\'effet|Date.de.d.but d.activit.|Capital|Nom commercial)(?:.|)\:/Uisu', $ann['annonceTxt'], $matches))
|
if (preg_match('/(.*)Activit(?:e|é)(?:.|)\:(.*)(?:Adresse(?:.*|)|Commentaires?|Administration|Etablissement principal|Date d\'effet|Date.de.d.but d.activit.|Capital|Nom commercial)(?:.|)\:/Uisu', $ann['annonceTxt'], $matches))
|
||||||
if (strpos(substr($matches[1],-20),'cess') === false && strpos(substr($matches[1],-20),'date') === false) {
|
if (strpos(substr($matches[1],-20),'cess') === false && strpos(substr($matches[1],-20),'date') === false) {
|
||||||
$tabRet['Activite'] = $matches[2];
|
$activite = $matches[2];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $tabRet['Activite'];
|
|
||||||
|
return $activite;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,11 +54,11 @@ class Metier_Defaillance_Detect
|
|||||||
protected $PlanDateEnd;
|
protected $PlanDateEnd;
|
||||||
protected $PlanPeriod = 120;
|
protected $PlanPeriod = 120;
|
||||||
|
|
||||||
protected $ListEvenProcol = array(50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 1100,1101,1102,1110,1111,1115,1116,1118,1119,1120,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1214,1215,1216,1217,1218,1219,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1346,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1423,1425,1430,1431,1435,1436,1440,1445,1450,1455,1460,1463,1465,1470,1472,1474,1475,1480,1490,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1517,1518,1519,1520,1521,1522,1525,1530,1535,1540,1541,1542,1543,1544,1545,1546,1580,1600,1601,1602,1603,1604,1605,1610,1611,1620,1640,1645,1650,1700,1800,1801,1900,1901,1999);
|
protected $ListEvenProcol = array();
|
||||||
protected $ListEvenProcolDelete = array();
|
protected $ListEvenProcolDelete = array();
|
||||||
protected $ListEvenAbsorption = array(2720, 2721);
|
protected $ListEvenAbsorption = array();
|
||||||
protected $ListEvenRadiation = array(40, 41, 42, 2202, 2203, 2204, 2210, 2211, 2212, 6000, 6001, 6002, 6003, 6004, 6005, 6100, 6200, 6300, 6400, 6500, 6600, 6700, 8090);
|
protected $ListEvenRadiation = array();
|
||||||
protected $ListEvenDissolution = array(2202, 2203, 2204, 2210, 2211, 2212);
|
protected $ListEvenDissolution = array();
|
||||||
|
|
||||||
protected $ProcolMaxYear = 12;
|
protected $ProcolMaxYear = 12;
|
||||||
|
|
||||||
@ -87,6 +87,18 @@ class Metier_Defaillance_Detect
|
|||||||
// Définir la date du jour
|
// Définir la date du jour
|
||||||
$this->DateToday = date('Ymd');
|
$this->DateToday = date('Ymd');
|
||||||
|
|
||||||
|
// Liste des événements au départ d'une procol
|
||||||
|
$this->ListEvenProcol = include __DIR__ . '/EvenProcol.php';
|
||||||
|
|
||||||
|
// Liste des événements d'absorption
|
||||||
|
$this->ListEvenAbsorption = include __DIR__ . '/EvenAbsorption.php';
|
||||||
|
|
||||||
|
// Liste des événements de radiation
|
||||||
|
$this->ListEvenRadiation = include __DIR__ . '/EvenRadiation.php';
|
||||||
|
|
||||||
|
// Liste des événements de dissolution
|
||||||
|
$this->ListEvenDissolution = include __DIR__ . '/EvenDissolution.php';
|
||||||
|
|
||||||
// Définir la liste des évenéments de la rubrique procol avec le paramètre d'effacement
|
// Définir la liste des évenéments de la rubrique procol avec le paramètre d'effacement
|
||||||
$this->ListEvenProcolDelete = include __DIR__ . '/ProcolDelete.php';
|
$this->ListEvenProcolDelete = include __DIR__ . '/ProcolDelete.php';
|
||||||
}
|
}
|
||||||
|
@ -92,9 +92,7 @@ return array(
|
|||||||
'value' => 'CONTINUE',
|
'value' => 'CONTINUE',
|
||||||
'params' => array(
|
'params' => array(
|
||||||
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'PL'),
|
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'PL'),
|
||||||
array( 'var' => 'Even', 'op' => 'EGAL', 'value' => array(
|
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 4),
|
||||||
// @todo : appel de jugement
|
|
||||||
)),
|
|
||||||
array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'PA'),
|
array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'PA'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -124,7 +122,6 @@ return array(
|
|||||||
'value' => 'CONTINUE',
|
'value' => 'CONTINUE',
|
||||||
'params' => array(
|
'params' => array(
|
||||||
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
||||||
array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenProcol'),
|
|
||||||
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 1),
|
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 1),
|
||||||
array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''),
|
array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''),
|
||||||
),
|
),
|
||||||
@ -135,7 +132,6 @@ return array(
|
|||||||
'value' => 'CONTINUE',
|
'value' => 'CONTINUE',
|
||||||
'params' => array(
|
'params' => array(
|
||||||
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
||||||
array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenProcol'),
|
|
||||||
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 2),
|
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 2),
|
||||||
array( 'var' => 'FJ', 'op' => 'MIN', 'value' => 1000),
|
array( 'var' => 'FJ', 'op' => 'MIN', 'value' => 1000),
|
||||||
array( 'var' => 'FJ', 'op' => 'MAX', 'value' => 1999),
|
array( 'var' => 'FJ', 'op' => 'MAX', 'value' => 1999),
|
||||||
@ -147,7 +143,6 @@ return array(
|
|||||||
'value' => 'CONTINUE',
|
'value' => 'CONTINUE',
|
||||||
'params' => array(
|
'params' => array(
|
||||||
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
||||||
array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenProcol'),
|
|
||||||
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 2),
|
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 2),
|
||||||
array( 'var' => 'InseeActif', 'op' => 'EGAL', 'value' => 1),
|
array( 'var' => 'InseeActif', 'op' => 'EGAL', 'value' => 1),
|
||||||
array( 'var' => 'FJ', 'op' => 'MAX', 'value' => 9000),
|
array( 'var' => 'FJ', 'op' => 'MAX', 'value' => 9000),
|
||||||
@ -161,7 +156,6 @@ return array(
|
|||||||
'value' => 'CONTINUE',
|
'value' => 'CONTINUE',
|
||||||
'params' => array(
|
'params' => array(
|
||||||
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
||||||
array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenProcol'),
|
|
||||||
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 3),
|
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 3),
|
||||||
array( 'var' => 'RcsActif', 'op' => 'EGAL', 'value' => 1),
|
array( 'var' => 'RcsActif', 'op' => 'EGAL', 'value' => 1),
|
||||||
array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''),
|
array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''),
|
||||||
@ -173,7 +167,6 @@ return array(
|
|||||||
'value' => 'CONTINUE',
|
'value' => 'CONTINUE',
|
||||||
'params' => array(
|
'params' => array(
|
||||||
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'),
|
||||||
array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenProcol'),
|
|
||||||
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 4),
|
array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 4),
|
||||||
array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'PA'),
|
array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'PA'),
|
||||||
),
|
),
|
||||||
|
5
library/Metier/Defaillance/EvenAbsorption.php
Normal file
5
library/Metier/Defaillance/EvenAbsorption.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
return array(
|
||||||
|
2720, //Fusion/Absorption (entitée absorbée)
|
||||||
|
2721, //Fusion/Absorption (entitée absorbée non identifiée)
|
||||||
|
);
|
9
library/Metier/Defaillance/EvenDissolution.php
Normal file
9
library/Metier/Defaillance/EvenDissolution.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
return array(
|
||||||
|
2202, //Dissolution
|
||||||
|
2203, //Dissolution de la société
|
||||||
|
2204, //Cessation d'activité avec dissolution
|
||||||
|
2210, //Déclaration de dissolution par l'associé unique.
|
||||||
|
2211, //Clôture de la liquidation
|
||||||
|
2212, //Liquidation amiable
|
||||||
|
);
|
174
library/Metier/Defaillance/EvenProcol.php
Normal file
174
library/Metier/Defaillance/EvenProcol.php
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
<?php
|
||||||
|
return array(
|
||||||
|
50,
|
||||||
|
51,
|
||||||
|
52,
|
||||||
|
53,
|
||||||
|
54,
|
||||||
|
55,
|
||||||
|
56,
|
||||||
|
57,
|
||||||
|
58,
|
||||||
|
59,
|
||||||
|
60,
|
||||||
|
61,
|
||||||
|
62,
|
||||||
|
63,
|
||||||
|
64,
|
||||||
|
65,
|
||||||
|
66,
|
||||||
|
67,
|
||||||
|
68,
|
||||||
|
69,
|
||||||
|
70,
|
||||||
|
71,
|
||||||
|
72,
|
||||||
|
73,
|
||||||
|
74,
|
||||||
|
75,
|
||||||
|
76,
|
||||||
|
77,
|
||||||
|
78,
|
||||||
|
79,
|
||||||
|
1100, //Ouverture sauvegarde
|
||||||
|
1101, //Jugement arrêtant plan de sauvegarde
|
||||||
|
1102, //Réforme de Redressement Judiciaire en Sauvegarde
|
||||||
|
1110, //Ouverture Sauvegarde Financière Accélérée
|
||||||
|
1111, //Ouverture Sauvegarde Accélérée
|
||||||
|
1115, //Plan de Sauvegarde Financière Accélérée
|
||||||
|
1116, //Plan de Sauvegarde Accélérée
|
||||||
|
1118, //Clôture de sauvegarde accélérée
|
||||||
|
1119, //Clôture de sauvegarde financière accélérée
|
||||||
|
1120, //Exécution du plan de sauvegarde
|
||||||
|
1200, //Redressement Judiciaire
|
||||||
|
1201, //Conversion sauvegarde en Redressement Judiciaire
|
||||||
|
1202, //Renouvellement de la période d'observation
|
||||||
|
1203, //Avis de dépôt de l'état de collocation
|
||||||
|
1204, //Avis de dépôt de l'état des créances
|
||||||
|
1205, //Avis de dépôt de l'état des créances complémentaires nées après jugement d'ouverture
|
||||||
|
1206, //Avis de dépôt de l'état des créances nées après jugement d'ouverture
|
||||||
|
1207, //Règlements amiables
|
||||||
|
1208, //Avis de dépôt du projet de répartition
|
||||||
|
1209, //Règlement judiciaire
|
||||||
|
1210, //Production de titres et créances
|
||||||
|
1211, //Redressement Judiciaire par extension au(x) gérant(s)
|
||||||
|
1212, //Réforme de Liquidation Judiciaire en Redressement Judiciaire
|
||||||
|
1214, //Avis de dépôt de l'état des créances (Loi de 1985)
|
||||||
|
1215, //Jugement de désignation des organes de la procédure
|
||||||
|
1216, //Autre avis de dépôt
|
||||||
|
1217, //Redressement Judiciaire sur résolution du plan de sauvegarde
|
||||||
|
1218, //Avis de dépôt de l'état des créances et du projet de répartition
|
||||||
|
1219, //Avis aux salariés
|
||||||
|
1300, //Conversion Redressement Judiciaire en Liquidation Judiciaire
|
||||||
|
1301, //Ouverture Liquidation Judiciaire
|
||||||
|
1302, //Ouverture Liquidation Judiciaire Simplifiée
|
||||||
|
1303, //Ouverture Liquidation Judiciaire sur résolution du plan
|
||||||
|
1304, //Réouverture Liquidation Judiciaire
|
||||||
|
1305, //Liquidation Judiciaire
|
||||||
|
1306, //Liquidation Judiciaire simplifiée
|
||||||
|
1307, //Conversion sauvegarde en Liquidation Judiciaire
|
||||||
|
1308, //Fin du régime de Liquidation Judiciaire Simplifiée
|
||||||
|
1309, //Conversion Liquidation Judiciaire en Liquidation Judiciaire Simplifiée
|
||||||
|
1310, //Procédure d'insolvabilité européenne
|
||||||
|
1311, //Liquidation Judiciaire par extension au(x) gérant(s)
|
||||||
|
1312, //Liquidation Judiciaire avec continuation d'exploitation
|
||||||
|
1313, //Liquidation Judiciaire sans remise des accessoires
|
||||||
|
1314, //Ouverture Liquidation Judiciaire sur résolution du plan de sauvegarde
|
||||||
|
1346, //Procédure d'insolvabilité (Règlement 1346/2000 du Conseil Européen)
|
||||||
|
1400, //Nomination d'un administrateur judiciaire
|
||||||
|
1401, //Nomination d'un mandataire judiciaire
|
||||||
|
1402, //Nomination d'un représentant des créanciers
|
||||||
|
1403, //Nominnation/Remplacement de commissaire à l'exécution du plan
|
||||||
|
1404, //Prolongement de la mission du commissaire à l'exécution du plan
|
||||||
|
1405, //Nomination d'un juge commissaire
|
||||||
|
1406, //Changement de SYNDIC
|
||||||
|
1407, //Modification de plan
|
||||||
|
1408, //Modification du plan de cession
|
||||||
|
1409, //Modification du plan de continuation
|
||||||
|
1410, //Suite de jugement/règlement/liquidation
|
||||||
|
1411, //Arrêt du plan de cession
|
||||||
|
1412, //Arrêt du plan de cession partielle
|
||||||
|
1413, //Arrêt du plan de continuation
|
||||||
|
1414, //Arrêt du plan de redressement
|
||||||
|
1415, //Prolongement du plan cession
|
||||||
|
1416, //Jugement constatant la bonne exécution du plan
|
||||||
|
1417, //Jugement d'extension de liquidation judiciaire
|
||||||
|
1418, //Jugement d'extension d'une procédure de redressement judiciaire
|
||||||
|
1419, //Jugement d'extension d'une procédure de sauvegarde
|
||||||
|
1420, //Nomination d'un liquidateur judiciaire
|
||||||
|
1421, //Jugement prorogeant le plan de redressement
|
||||||
|
1423, //Entreprise / Fond de commerce en faillite à céder
|
||||||
|
1425, //Plan de cession avec location gérance
|
||||||
|
1430, //Jugement autorisant la poursuite d'activité
|
||||||
|
1431, //Jugement de cessation partielle d'activité
|
||||||
|
1435, //Suspension de l'exécution provisoire
|
||||||
|
1436, //Suspension provisoire des poursuites
|
||||||
|
1440, //Jugement accordant un délai pour déposer la liste des créances
|
||||||
|
1445, //Concordat
|
||||||
|
1450, //Jugement modifiant la date de cessation des paiements
|
||||||
|
1455, //Jugement arrêtant le plan d'apurement du passif
|
||||||
|
1460, //Homologation du plan
|
||||||
|
1463, //Modification du plan de sauvegarde
|
||||||
|
1465, //Clôture de la procédure suite à l'homologation du plan
|
||||||
|
1470, //Fin de mission d'administrateur judiciaire
|
||||||
|
1472, //Fin de mission du commissaire à l'exécution du plan
|
||||||
|
1474, //Modification d'intervenant(s)
|
||||||
|
1475, //Modification de la mission d'un intervenant
|
||||||
|
1480, //Jugement ordonnant la jonction des procédures
|
||||||
|
1490, //Confusion des patrimoines de sociétés
|
||||||
|
1500, //Clôture de la procédure
|
||||||
|
1501, //Clôture de la procédure après cession totale
|
||||||
|
1502, //Clôture de la procédure pour extinction du passif
|
||||||
|
1503, //Clôture de la procédure pour insuffisance d'actif
|
||||||
|
1504, //Clôture sauvegarde pour absence de projet de plan
|
||||||
|
1505, //Appel de jugement
|
||||||
|
1506, //Infirmation Jugement
|
||||||
|
1507, //Extrait d'arrêt de la cour d'appel
|
||||||
|
1508, //Extinction du plan de sauvegarde
|
||||||
|
1509, //Extinction du plan de redressement
|
||||||
|
1510, //Rejet du plan
|
||||||
|
1511, //Résolution du plan de cession
|
||||||
|
1512, //Résolution du plan de continuation
|
||||||
|
1513, //Résolution du plan de sauvegarde
|
||||||
|
1514, //Clôture de la procédure de sauvegarde
|
||||||
|
1515, //Arrêt divers
|
||||||
|
1517, //Rectification d'une erreur matérielle
|
||||||
|
1518, //Infirmation Interdiction de gérer/Faillite Personnelle
|
||||||
|
1519, //Infirmation de jugement d'extension de liquidation judiciaire
|
||||||
|
1520, //Ordonnance
|
||||||
|
1521, //Délocalisation de la procédure vers un autre Tribunal
|
||||||
|
1522, //Clôture de la procédure par dissolution de l'union
|
||||||
|
1525, //Appel du ministère public
|
||||||
|
1530, //Jugement constatant l'impécuniosité de la procédure de liquidation
|
||||||
|
1535, //Jugement modifiant le délai imparti pour la clôture des opérations de liquidation
|
||||||
|
1540, //Ordonnance statuant sur les contestations du projet de répartition
|
||||||
|
1541, //Rétractation de prononcé de liquidation judiciaire sur tierce opposition
|
||||||
|
1542, //Rétractation de jugement d'ouverture d'une procédure de sauvegarde sur tierce opposition
|
||||||
|
1543, //Rétractation de jugement d'ouverture d'une procédure de redressement judiciaire sur tierce opposition
|
||||||
|
1544, //Rétractation de jugement d'ouverture d'une procédure de liquidation judiciaire sur tierce opposition
|
||||||
|
1545, //Rétractation de jugement d'ouverture sur tierce opposition
|
||||||
|
1546, //Rétractation de jugement (sur tierce opposition)
|
||||||
|
1580, //Jugement prononçant la continuation de l'activité par apurement du passif
|
||||||
|
1600, //Faillite personnelle
|
||||||
|
1601, //Interdiction de gérer
|
||||||
|
1602, //Jugement de réhabilitation
|
||||||
|
1603, //Liquidation de biens
|
||||||
|
1604, //Banqueroute
|
||||||
|
1605, //Jugement autorisant la reprise des poursuites individuelles
|
||||||
|
1610, //Faillite personnelle (Loi de 1985)
|
||||||
|
1611, //Interdiction de gérer (Loi de 1985)
|
||||||
|
1620, //Jugement condamnant le dirigeant en comblement du passif
|
||||||
|
1640, //Rétablissement Professionnel
|
||||||
|
1645, //Clôture du Rétablissement Professionnel
|
||||||
|
1650, //Rétablissement Personnel
|
||||||
|
1700, //Décision soumise à publicité
|
||||||
|
1800, //Suppression des mentions relatives à une procédure collective du K-Bis (Art. R123-135)
|
||||||
|
1801, //Clôture de la procédure collective (mention faite au K-Bis, Art. R631-43)
|
||||||
|
1900, //Interdiction temporaire d'exercice de la profession de CAC
|
||||||
|
1901, //Radiation de la liste des CAC
|
||||||
|
1999, //Autre procédure collective
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
26
library/Metier/Defaillance/EvenRadiation.php
Normal file
26
library/Metier/Defaillance/EvenRadiation.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
return array(
|
||||||
|
40,
|
||||||
|
41,
|
||||||
|
42,
|
||||||
|
2202, //Dissolution
|
||||||
|
2203, //Dissolution de la société
|
||||||
|
2204, //Cessation d'activité avec dissolution
|
||||||
|
2210, //Déclaration de dissolution par l'associé unique.
|
||||||
|
2211, //Clôture de la liquidation
|
||||||
|
2212, //Liquidation amiable
|
||||||
|
6000, //Radiation pour cause de clôture de la liquidation (amiable/simplifié/général)
|
||||||
|
6001, //Radiation pour cause de clôture de la liquidation amiable
|
||||||
|
6002, //Radiation pour cause de clôture de la liquidation judiciaire pour insuffisance d'actif
|
||||||
|
6003, //Radiation pour cause de clôture de la liquidation judiciaire
|
||||||
|
6004, //Radiation pour cause de clôture de la liquidation judiciaire simplifié
|
||||||
|
6005, //Radiation pour clôture du plan de cession
|
||||||
|
6100, //Radiation pour cause de décès
|
||||||
|
6200, //Radiation pour cause de mention d'office
|
||||||
|
6300, //Radiation pour cause de non-exercice
|
||||||
|
6400, //Radiation pour cause de transfert
|
||||||
|
6500, //Radiation pour cause de jugement de clôture du plan de cession
|
||||||
|
6600, //Radiation d'un établissement
|
||||||
|
6700, //Radiation
|
||||||
|
8090, //Dissolution d'association
|
||||||
|
);
|
@ -1,46 +1,46 @@
|
|||||||
<?php
|
<?php
|
||||||
return array(
|
return array(
|
||||||
1005 => 1,
|
1005 => 1, //Vente aux enchères suite à saisie
|
||||||
1010 => 1,
|
1010 => 1, //Déclaration de cessation de paiement
|
||||||
1050 => 1,
|
1050 => 1, //Homologation de la conciliation
|
||||||
1055 => 1,
|
1055 => 1, //Résolution de la conciliation
|
||||||
1110 => 1,
|
1110 => 1, //Ouverture Sauvegarde Financière Accélérée
|
||||||
1111 => 1,
|
1111 => 1, //Ouverture Sauvegarde Accélérée
|
||||||
1115 => 1,
|
1115 => 1, //Plan de Sauvegarde Financière Accélérée
|
||||||
1116 => 1,
|
1116 => 1, //Plan de Sauvegarde Accélérée
|
||||||
1118 => 1,
|
1118 => 1, //Clôture de sauvegarde accélérée
|
||||||
1119 => 1,
|
1119 => 1, //Clôture de sauvegarde financière accélérée
|
||||||
1120 => 1,
|
1120 => 1, //Exécution du plan de sauvegarde
|
||||||
1203 => 1,
|
1203 => 1, //Avis de dépôt de l'état de collocation
|
||||||
1207 => 1,
|
1207 => 1, //Règlements amiables
|
||||||
1416 => 1,
|
1416 => 1, //Jugement constatant la bonne exécution du plan
|
||||||
1435 => 1,
|
1435 => 1, //Suspension de l'exécution provisoire
|
||||||
1436 => 1,
|
1436 => 1, //Suspension provisoire des poursuites
|
||||||
1500 => 2,
|
1500 => 2, //Clôture de la procédure
|
||||||
1501 => 2,
|
1501 => 2, //Clôture de la procédure après cession totale
|
||||||
1502 => 1,
|
1502 => 1, //Clôture de la procédure pour extinction du passif
|
||||||
1503 => 2,
|
1503 => 2, //Clôture de la procédure pour insuffisance d'actif
|
||||||
1504 => 2,
|
1504 => 2, //Clôture sauvegarde pour absence de projet de plan
|
||||||
1505 => 1,
|
1505 => 1, //Appel de jugement
|
||||||
1506 => 1,
|
1506 => 1, //Infirmation Jugement
|
||||||
1507 => 4,
|
1507 => 4, //Extrait d'arrêt de la cour d'appel
|
||||||
1514 => 1,
|
1514 => 1, //Clôture de la procédure de sauvegarde
|
||||||
1515 => 1,
|
1515 => 1, //Arrêt divers
|
||||||
1517 => 1,
|
1517 => 1, //Rectification d'une erreur matérielle
|
||||||
1520 => 1,
|
1520 => 1, //Ordonnance
|
||||||
1522 => 1,
|
1522 => 1, //Clôture de la procédure par dissolution de l'union
|
||||||
1525 => 4,
|
1525 => 4, //Appel du ministère public
|
||||||
1541 => 1,
|
1541 => 1, //Rétractation de prononcé de liquidation judiciaire sur tierce opposition
|
||||||
1542 => 1,
|
1542 => 1, //Rétractation de jugement d'ouverture d'une procédure de sauvegarde sur tierce opposition
|
||||||
1543 => 1,
|
1543 => 1, //Rétractation de jugement d'ouverture d'une procédure de redressement judiciaire sur tierce opposition
|
||||||
1544 => 1,
|
1544 => 1, //Rétractation de jugement d'ouverture d'une procédure de liquidation judiciaire sur tierce opposition
|
||||||
1545 => 1,
|
1545 => 1, //Rétractation de jugement d'ouverture sur tierce opposition
|
||||||
1550 => 1,
|
1550 => 1, //Jugement d'homologation de l'accord
|
||||||
1645 => 1,
|
1645 => 1, //Clôture du Rétablissement Professionnel
|
||||||
1650 => 1,
|
1650 => 1, //Rétablissement Personnel
|
||||||
1700 => 1,
|
1700 => 1, //Décision soumise à publicité
|
||||||
1800 => 1,
|
1800 => 1, //Suppression des mentions relatives à une procédure collective du K-Bis (Art. R123-135)
|
||||||
1801 => 1,
|
1801 => 1, //Clôture de la procédure collective (mention faite au K-Bis, Art. R631-43)
|
||||||
1900 => 1,
|
1900 => 1, //Interdiction temporaire d'exercice de la profession de CAC
|
||||||
1901 => 1,
|
1901 => 1, //Radiation de la liste des CAC
|
||||||
);
|
);
|
||||||
|
@ -9,32 +9,40 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
|
|
||||||
const INT = 1000;
|
const INT = 1000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Db Adapter
|
* PDO Connection with Doctrine
|
||||||
* @var Zend_Db_Adapter_Abstract
|
* @var \Doctrine\DBAL\Connection
|
||||||
*/
|
*/
|
||||||
public $db;
|
protected $conn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Infogreffe : Document Bilan
|
||||||
* @param string $siren
|
* @param \Doctrine\DBAL\Connection $conn
|
||||||
*/
|
*/
|
||||||
public function __construct($siren, $db = null)
|
public function __construct($conn = null)
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
//Set type
|
// Set Database
|
||||||
|
if ($conn === null) {
|
||||||
|
$this->conn = Zend_Registry::get('doctrine');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->conn = $conn;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set type
|
||||||
$this->type_document = 'AC';
|
$this->type_document = 'AC';
|
||||||
|
}
|
||||||
|
|
||||||
//Set Siren
|
/**
|
||||||
|
* Défini le SIREN
|
||||||
|
* @param string $siren
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setSiren($siren)
|
||||||
|
{
|
||||||
$this->siren = $siren;
|
$this->siren = $siren;
|
||||||
|
|
||||||
//Get defaut database adapter
|
|
||||||
if ($db === null) {
|
|
||||||
$this->db = Zend_Db_Table_Abstract::getDefaultAdapter();
|
|
||||||
} else {
|
|
||||||
$this->db = $db;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,9 +54,7 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
$this->mode_diffusion = 'XL';
|
$this->mode_diffusion = 'XL';
|
||||||
$this->reference_client = 'list-' . $this->siren;
|
$this->reference_client = 'list-' . $this->siren;
|
||||||
|
|
||||||
$actesM = new Application_Model_JoGreffesActes($this->db);
|
// Requete WebService
|
||||||
|
|
||||||
//Requete WebService
|
|
||||||
$actesXML = null;
|
$actesXML = null;
|
||||||
if ( $onlyDb === false ) {
|
if ( $onlyDb === false ) {
|
||||||
//Infogreffe webservice
|
//Infogreffe webservice
|
||||||
@ -62,45 +68,50 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
//echo $e->getMessage();
|
//echo $e->getMessage();
|
||||||
}
|
}
|
||||||
if ( $requestOk === true ) {
|
if ( $requestOk === true ) {
|
||||||
try {
|
// Set All line state to 0
|
||||||
$actesM->update(array('actif' => 0), 'siren='.$this->siren);
|
try {
|
||||||
} catch(Zend_Db_Exception $e) {
|
$this->conn->update('jo.greffes_actes',
|
||||||
|
array('actif' => 0), array('siren' => $this->siren));
|
||||||
}
|
}
|
||||||
|
catch(\Doctrine\DBAL\DBALException $e) {}
|
||||||
$actesXML = $this->formatList($xml);
|
$actesXML = $this->formatList($xml);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Lecture de la base de données
|
// Lecture de la base de données
|
||||||
$sql = $actesM->select()
|
$columns = array(
|
||||||
->from($actesM, array(
|
'siren',
|
||||||
'siren',
|
'numRC',
|
||||||
'numRC',
|
'LPAD(numGreffe,4,0) AS numGreffe',
|
||||||
'LPAD(numGreffe,4,0) AS numGreffe',
|
'pdfLink',
|
||||||
'pdfLink',
|
'pdfSize',
|
||||||
'pdfSize',
|
'pdfPage',
|
||||||
'pdfPage',
|
'num_depot',
|
||||||
'num_depot',
|
'date_depot',
|
||||||
'date_depot',
|
'date_acte',
|
||||||
'date_acte',
|
'LPAD(num_acte,2,0) AS num_acte',
|
||||||
'LPAD(num_acte,2,0) AS num_acte',
|
'type_acte',
|
||||||
'type_acte',
|
'type_acte_libelle',
|
||||||
'type_acte_libelle',
|
'nbpages_acte',
|
||||||
'nbpages_acte',
|
'decision_nature',
|
||||||
'decision_nature',
|
'decision_libelle',
|
||||||
'decision_libelle',
|
'mode_diffusion',
|
||||||
'mode_diffusion'
|
);
|
||||||
))
|
try {
|
||||||
->where('siren=?', $this->siren)
|
$qb = $this->conn->createQueryBuilder();
|
||||||
->where('actif=1')
|
$qb->select($columns)->from('jo.greffes_actes')
|
||||||
->order('date_depot DESC')
|
->where('siren=:siren')->setParameter('siren', $this->siren)->andWhere('actif=1')
|
||||||
->order('num_depot DESC')
|
->orderBy('date_depot', 'DESC')->orderBy('num_depot', 'DESC')
|
||||||
->order('num_acte ASC')
|
->orderBy('num_acte', 'ASC')->orderBy('date_acte', 'DESC');
|
||||||
->order('date_acte DESC');
|
$stmt = $qb->execute();
|
||||||
$rows = $actesM->fetchAll($sql);
|
}
|
||||||
|
catch(\Doctrine\DBAL\DBALException $e) {
|
||||||
|
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$actes = array();
|
$actes = array();
|
||||||
if ( count($rows)>0 ) {
|
if ($stmt->rowCount() > 0) {
|
||||||
|
$rows = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
foreach ( $rows as $row ) {
|
foreach ( $rows as $row ) {
|
||||||
$item = new stdClass();
|
$item = new stdClass();
|
||||||
$item->File = $row->pdfLink;
|
$item->File = $row->pdfLink;
|
||||||
@ -141,7 +152,7 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo : En cours
|
* Commande Téléchargement
|
||||||
* @param string $depotDate
|
* @param string $depotDate
|
||||||
* @param int $depotNum
|
* @param int $depotNum
|
||||||
* @param string $acteType
|
* @param string $acteType
|
||||||
@ -154,33 +165,34 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
*/
|
*/
|
||||||
public function getCommandeT($depotDate, $depotNum, $acteType, $acteDate, $acteNum, $orderId = null)
|
public function getCommandeT($depotDate, $depotNum, $acteType, $acteDate, $acteNum, $orderId = null)
|
||||||
{
|
{
|
||||||
//Lire dans la base de données
|
// Lire dans la base de données
|
||||||
$actesM = new Application_Model_JoGreffesActes($this->db);
|
$columns = array(
|
||||||
|
'siren',
|
||||||
|
'numRC',
|
||||||
|
'LPAD(numGreffe,4,0) AS numGreffe',
|
||||||
|
'pdfLink',
|
||||||
|
'num_depot',
|
||||||
|
'date_depot',
|
||||||
|
'date_acte',
|
||||||
|
'LPAD(num_acte,2,0) AS num_acte',
|
||||||
|
'type_acte',
|
||||||
|
);
|
||||||
|
$qb = $this->conn->createQueryBuilder();
|
||||||
|
$qb->select($columns)->from('jo.greffes_actes')
|
||||||
|
->where('siren=:siren')->setParameter('siren', $this->siren)
|
||||||
|
->andWhere('num_depot=:depotNum')->setParameter('depotNum', $depotNum)
|
||||||
|
->andWhere('date_depot=:depotDate')->setParameter('depotDate', $depotDate)
|
||||||
|
->andWhere('num_acte=:acteNum')->setParameter('acteNum', $acteNum)
|
||||||
|
->andWhere('date_acte=:acteDate')->setParameter('acteDate', $acteDate)
|
||||||
|
->andWhere('type_acte=:acteType')->setParameter('acteType', $acteType);
|
||||||
|
$stmt = $qb->execute();
|
||||||
|
|
||||||
$sql = $actesM->select()
|
if ( $stmt->rowCount() == 0 ) {
|
||||||
->from($actesM, array(
|
|
||||||
'siren',
|
|
||||||
'numRC',
|
|
||||||
'LPAD(numGreffe,4,0) AS numGreffe',
|
|
||||||
'pdfLink',
|
|
||||||
'num_depot',
|
|
||||||
'date_depot',
|
|
||||||
'date_acte',
|
|
||||||
'LPAD(num_acte,2,0) AS num_acte',
|
|
||||||
'type_acte',
|
|
||||||
))
|
|
||||||
->where('siren=?', $this->siren)
|
|
||||||
->where('num_depot=?', $depotNum)
|
|
||||||
->where('date_depot=?', $depotDate)
|
|
||||||
->where('num_acte=?', $acteNum)
|
|
||||||
->where('date_acte=?', $acteDate)
|
|
||||||
->where('type_acte=?', $acteType);
|
|
||||||
|
|
||||||
$row = $actesM->fetchRow($sql);
|
|
||||||
if ( null === $row ) {
|
|
||||||
throw new Exception('Not exist');
|
throw new Exception('Not exist');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
|
||||||
$this->mode_diffusion = 'T';
|
$this->mode_diffusion = 'T';
|
||||||
$this->reference_client = 'T'.date('YmdHis');
|
$this->reference_client = 'T'.date('YmdHis');
|
||||||
$this->greffe = $row->numGreffe;
|
$this->greffe = $row->numGreffe;
|
||||||
@ -206,25 +218,25 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
mkdir($this->config->storage->path . '/' . $dir, 0777, true);
|
mkdir($this->config->storage->path . '/' . $dir, 0777, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set filename
|
// Set filename
|
||||||
$filename = $dir . '/' . $this->getFileName($date, $num, $type, $options);
|
$filename = $dir . '/' . $this->getFileName($date, $num, $type, $options);
|
||||||
|
|
||||||
if ( $row->pdfLink != '' ) {
|
if ( $row->pdfLink != '' ) {
|
||||||
|
|
||||||
//Set the filename
|
// Set the filename
|
||||||
$filename = $dir . '/' . $row->pdfLink;
|
$filename = $dir . '/' . $row->pdfLink;
|
||||||
|
|
||||||
//Check if filename exist
|
// Check if filename exist
|
||||||
if ( !file_exists($this->config->storage->path . '/' . $filename) ) {
|
if ( !file_exists($this->config->storage->path . '/' . $filename) ) {
|
||||||
throw new Exception('File not found', self::INT);
|
throw new Exception('File not found', self::INT);
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif ( file_exists($this->config->storage->path . '/' . $filename) ) {
|
} elseif ( file_exists($this->config->storage->path . '/' . $filename) ) {
|
||||||
|
|
||||||
//Analyser le fichier - Nombre de page et taille
|
// Analyser le fichier - Nombre de page et taille
|
||||||
$infos = $this->pdfInfos($this->config->storage->path . '/' . $filename);
|
$infos = $this->pdfInfos($this->config->storage->path . '/' . $filename);
|
||||||
|
|
||||||
//Enregistrer les infos du fichier dans la base de données
|
// Enregistrer les infos du fichier dans la base de données
|
||||||
if (false !== $infos) {
|
if (false !== $infos) {
|
||||||
$this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']);
|
$this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']);
|
||||||
} else {
|
} else {
|
||||||
@ -246,20 +258,19 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $orderId !== null ) {
|
if ( $orderId !== null ) {
|
||||||
$commandeM = new Application_Model_Sdv1GreffeCommandesAc();
|
$this->conn->update('sdv1.greffe_commandes_ac', array(
|
||||||
$commandeM->update(array(
|
'cmdUrl' => $url,
|
||||||
'cmdUrl'=> $url,
|
'dateCommande' => date('YmdHis')),
|
||||||
'dateCommande' => date('YmdHis'),
|
array('id' => $orderId));
|
||||||
), 'id='.$orderId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Récupérer le fichier
|
// Récupérer le fichier
|
||||||
$getfile = $this->download($url, $filename);
|
$getfile = $this->download($url, $filename);
|
||||||
|
|
||||||
//Analyser le fichier - Nombre de page et taille
|
// Analyser le fichier - Nombre de page et taille
|
||||||
$infos = $this->pdfInfos($getfile);
|
$infos = $this->pdfInfos($getfile);
|
||||||
|
|
||||||
//Enregistrer les infos du fichier dans la base de données
|
// Enregistrer les infos du fichier dans la base de données
|
||||||
if (false !== $infos) {
|
if (false !== $infos) {
|
||||||
$this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']);
|
$this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']);
|
||||||
} else {
|
} else {
|
||||||
@ -271,47 +282,50 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Commande courrier
|
||||||
* @param unknown $depotDate
|
* @param string $depotDate
|
||||||
* @param unknown $depotNum
|
* @param int $depotNum
|
||||||
* @param unknown $acteType
|
* @param string $acteType
|
||||||
* @param unknown $acteDate
|
* @param string $acteDate
|
||||||
* @param unknown $acteNum
|
* @param int $acteNum
|
||||||
* @param string $reference
|
* @param string $reference
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function getCommandeC($depotDate, $depotNum, $acteType, $acteDate, $acteNum, $reference = '')
|
public function getCommandeC($depotDate, $depotNum, $acteType, $acteDate, $acteNum, $reference = '')
|
||||||
{
|
{
|
||||||
//Lire dans la base de données
|
// Lire dans la base de données
|
||||||
$actesM = new Application_Model_JoGreffesActes();
|
$columns = array(
|
||||||
$sql = $actesM->select()
|
'siren',
|
||||||
->from($actesM, array(
|
'numRC',
|
||||||
'siren',
|
'LPAD(numGreffe,4,0) AS numGreffe',
|
||||||
'numRC',
|
'pdfLink',
|
||||||
'LPAD(numGreffe,4,0) AS numGreffe',
|
'num_depot',
|
||||||
'pdfLink',
|
'date_depot',
|
||||||
'num_depot',
|
'date_acte',
|
||||||
'date_depot',
|
'LPAD(num_acte,2,0) AS num_acte',
|
||||||
'date_acte',
|
'type_acte',
|
||||||
'LPAD(num_acte,2,0) AS num_acte',
|
);
|
||||||
'type_acte',
|
$qb = $this->conn->createQueryBuilder();
|
||||||
))
|
$qb->select($columns)->from('jo.greffes_actes')
|
||||||
->where('siren=?', $this->siren)
|
->where('siren=:siren')->setParameter('siren', $this->siren)
|
||||||
->where('num_depot=?', $depotNum)
|
->andWhere('num_depot=:depotNum')->setParameter('depotNum', $depotNum)
|
||||||
->where('date_depot=?', $depotDate)
|
->andWhere('date_depot=:depotDate')->setParameter('depotDate', $depotDate)
|
||||||
->where('num_acte=?', $acteNum)
|
->andWhere('num_acte=:acteNum')->setParameter('acteNum', $acteNum)
|
||||||
->where('date_acte=?', $acteDate)
|
->andWhere('date_acte=:acteDate')->setParameter('acteDate', $acteDate)
|
||||||
->where('type_acte=?', $acteType);
|
->andWhere('type_acte=:acteType')->setParameter('acteType', $acteType);
|
||||||
$row = $actesM->fetchRow($sql);
|
$stmt = $qb->execute();
|
||||||
if ( null === $row ) {
|
|
||||||
|
if ($stmt->rowCount() == 0) {
|
||||||
throw new Exception('Not exist');
|
throw new Exception('Not exist');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->mode_diffusion = 'C';
|
$this->mode_diffusion = 'C';
|
||||||
$this->reference_client = $reference;
|
$this->reference_client = $reference;
|
||||||
|
|
||||||
//Générer les paramètres de commande depuis la base de données
|
$row = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
|
||||||
|
// Générer les paramètres de commande depuis la base de données
|
||||||
$this->greffe = $row->numGreffe;
|
$this->greffe = $row->numGreffe;
|
||||||
$this->dossier_millesime = substr($row->numRC,0,2);
|
$this->dossier_millesime = substr($row->numRC,0,2);
|
||||||
$this->dossier_statut = substr($row->numRC,2,1);
|
$this->dossier_statut = substr($row->numRC,2,1);
|
||||||
@ -321,11 +335,11 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
$this->date_acte = $row->date_acte;
|
$this->date_acte = $row->date_acte;
|
||||||
$this->num = $row->num_acte;
|
$this->num = $row->num_acte;
|
||||||
|
|
||||||
//Faire la requete
|
// Faire la requete
|
||||||
try {
|
try {
|
||||||
$xml = $this->callRequest();
|
$xml = $this->callRequest();
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
//La prise en charge du courrier est effective
|
// La prise en charge du courrier est effective
|
||||||
if ( $e->getCode() != 17 ) {
|
if ( $e->getCode() != 17 ) {
|
||||||
throw new Exception($e->getMessage());
|
throw new Exception($e->getMessage());
|
||||||
}
|
}
|
||||||
@ -525,56 +539,64 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
'actif' => 1,
|
'actif' => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
//Only new element are inserted
|
|
||||||
try {
|
try {
|
||||||
$acteM = new Application_Model_JoGreffesActes($this->db);
|
$sql = "SELECT * FROM jo.greffes_actes
|
||||||
$sql = $acteM->select()
|
WHERE siren=:siren AND num_depot=:depotNum AND date_depot=:depotDate
|
||||||
->where('siren=?', $list['num_siren'])
|
AND num_acte=:acteNum ORDER BY dateInsert";
|
||||||
->where('num_depot=?', intval($list['num_depot']))
|
$stmt = $this->conn->prepare($sql);
|
||||||
->where('date_depot=?', $list['date_depot'])
|
$stmt->bindValue('siren', $this->siren);
|
||||||
//->where('date_acte=?', $depot['date_acte'])
|
$stmt->bindValue('depotNum', intval($list['num_depot']));
|
||||||
->where('num_acte=?', intval($depot['num_acte']))
|
$stmt->bindValue('depotDate', $list['date_depot']);
|
||||||
->order('dateInsert DESC');
|
$stmt->bindValue('acteNum', intval($depot['num_acte']));
|
||||||
$rows = $acteM->fetchAll($sql);
|
$stmt->execute();
|
||||||
} catch(Zend_Db_Adapter_Exception $e) {
|
// Insert
|
||||||
throw new Exception($e->getMessage());
|
if ($stmt->rowCount() == 0) {
|
||||||
}
|
|
||||||
|
|
||||||
//Insert new element
|
|
||||||
if ( count($rows)==0 ) {
|
|
||||||
try {
|
|
||||||
//Add dateInsert
|
|
||||||
$data['dateInsert'] = date('YmdHis');
|
$data['dateInsert'] = date('YmdHis');
|
||||||
$result = $acteM->insert($data);
|
|
||||||
} catch(Zend_Exception $e) {
|
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//Update information
|
|
||||||
else {
|
|
||||||
//Correct multiple item
|
|
||||||
$item = $rows[0];
|
|
||||||
if ( count($rows) > 1 ) {
|
|
||||||
try {
|
try {
|
||||||
$result = $acteM->delete(array(
|
$result = $this->conn->insert('jo.greffes_actes', $data);
|
||||||
'siren='.$this->siren,
|
}
|
||||||
'num_depot='.intval($list['num_depot']),
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
'date_depot="'.$list['date_depot'].'"',
|
|
||||||
'num_acte='.intval($depot['num_acte']),
|
|
||||||
'id!='.$item->id,
|
|
||||||
));
|
|
||||||
} catch(Zend_Exception $e) {
|
|
||||||
throw new Exception($e->getMessage());
|
throw new Exception($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Update
|
||||||
|
else {
|
||||||
|
// Get first Item
|
||||||
|
$item = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
|
||||||
try {
|
// Correction anomalie item multiple
|
||||||
$result = $acteM->update($data, 'id='.$item->id);
|
if ($stmt->rowCount() > 1) {
|
||||||
} catch(Zend_Exception $e) {
|
$this->conn->beginTransaction();
|
||||||
throw new Exception($e->getMessage());
|
try {
|
||||||
|
while ($rowDel = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||||
|
$this->conn->delete('jo.greffes_actes', array(
|
||||||
|
'id' => $rowDel->id));
|
||||||
|
}
|
||||||
|
$this->conn->commit();
|
||||||
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
|
$this->conn->rollBack();
|
||||||
|
throw new Exception($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Real Update
|
||||||
|
try {
|
||||||
|
$result = $this->conn->update('jo.greffes_actes', $data,
|
||||||
|
array('id' => $item->id));
|
||||||
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
|
throw new Exception($e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
|
throw new Exception($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -591,27 +613,24 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
protected function dbSetFile($filename, $size = 0, $numberOfPage = '', $version = '')
|
protected function dbSetFile($filename, $size = 0, $numberOfPage = '', $version = '')
|
||||||
{
|
{
|
||||||
$data = array(
|
$data = array(
|
||||||
'pdfLink' => $filename,
|
'pdfLink' => $filename,
|
||||||
'pdfSize' => $size,
|
'pdfSize' => $size,
|
||||||
'pdfPage' => $numberOfPage,
|
'pdfPage' => $numberOfPage,
|
||||||
'pdfVer' => $version,
|
'pdfVer' => $version,
|
||||||
'pdfDate' => date('Ymd'),
|
'pdfDate' => date('Ymd'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$where = array(
|
$identifier = array(
|
||||||
'siren='.$this->siren,
|
'siren' => $this->siren,
|
||||||
'num_depot='.$this->num_depot,
|
'num_depot' => $this->num_depot,
|
||||||
'date_depot="'.$this->date_depot.'"',
|
'date_depot' => $this->date_depot,
|
||||||
'date_acte="'.$this->date_acte.'"',
|
'date_acte' => $this->date_acte,
|
||||||
'num_acte='.$this->num,
|
'num_acte' => $this->num,
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$acteM = new Application_Model_JoGreffesActes();
|
$result = $this->conn->update('jo.greffes_actes', $data, $identifier);
|
||||||
$result = $acteM->update($data, $where);
|
} catch(\Doctrine\DBAL\DBALException $e) {
|
||||||
} catch(Zend_Db_Adapter_Exception $e) {
|
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
} catch(Zend_Db_Exception $e) {
|
|
||||||
throw new Exception($e->getMessage());
|
throw new Exception($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,6 +640,4 @@ class Metier_Infogreffe_DocAC extends Metier_Infogreffe_Service
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -6,41 +6,49 @@ require_once dirname(__FILE__) . '/Service.php';
|
|||||||
*/
|
*/
|
||||||
class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
||||||
{
|
{
|
||||||
|
|
||||||
const INT = 1000;
|
const INT = 1000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Db Adapter
|
* Type de comptes
|
||||||
* @var Zend_Db_Adapter_Abstract
|
|
||||||
*/
|
|
||||||
public $db;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* consolides|sociaux
|
* consolides|sociaux
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $type_comptes;
|
public $type_comptes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* PDO Connection with Doctrine
|
||||||
* @param string $siren
|
* @var \Doctrine\DBAL\Connection
|
||||||
*/
|
*/
|
||||||
public function __construct($siren, $db = null)
|
protected $conn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Infogreffe : Document Bilan
|
||||||
|
* @param \Doctrine\DBAL\Connection $conn
|
||||||
|
*/
|
||||||
|
public function __construct($conn = null)
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
//Set type
|
// Set Database
|
||||||
$this->type_document = 'BI';
|
if ($conn === null) {
|
||||||
|
$this->conn = Zend_Registry::get('doctrine');
|
||||||
//Set Siren
|
|
||||||
$this->siren = $siren;
|
|
||||||
|
|
||||||
//Get defaut database adapter
|
|
||||||
if ($db === null) {
|
|
||||||
$this->db = Zend_Db_Table_Abstract::getDefaultAdapter();
|
|
||||||
} else {
|
|
||||||
$this->db = $db;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$this->conn = $conn;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set type
|
||||||
|
$this->type_document = 'BI';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Défini le SIREN
|
||||||
|
* @param string $siren
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setSiren($siren)
|
||||||
|
{
|
||||||
|
$this->siren = $siren;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,59 +61,61 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
$this->mode_diffusion = 'XL';
|
$this->mode_diffusion = 'XL';
|
||||||
$this->reference_client = 'list-' . $this->siren;
|
$this->reference_client = 'list-' . $this->siren;
|
||||||
|
|
||||||
$bilansM = new Application_Model_JoGreffesBilans();
|
// Requete WebService
|
||||||
|
|
||||||
//Requete WebService
|
|
||||||
$bilansXML = null;
|
$bilansXML = null;
|
||||||
if ( $onlyDb === false ) {
|
if ( $onlyDb === false ) {
|
||||||
//Infogreffe webservice
|
// Infogreffe webservice
|
||||||
try {
|
try {
|
||||||
$xml = $this->callRequest();
|
$xml = $this->callRequest();
|
||||||
$requestOk = true;
|
$requestOk = true;
|
||||||
} catch( Exception $e ) {
|
} catch( Exception $e ) {
|
||||||
$requestOk = false;
|
$requestOk = false;
|
||||||
//@todo : get error message
|
// @todo : get error message
|
||||||
}
|
}
|
||||||
if ( $requestOk === true ) {
|
if ( $requestOk === true ) {
|
||||||
//Set All line state to 0
|
// Set All line state to 0
|
||||||
try {
|
try {
|
||||||
$bilansM->update(array('actif' => 0), 'siren='.$this->siren);
|
$this->conn->update('jo.greffes_bilans',
|
||||||
} catch(Zend_Db_Exception $e) {
|
array('actif' => 0), array('siren' => $this->siren));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
catch(\Doctrine\DBAL\DBALException $e) {}
|
||||||
$bilansXML = $this->formatList($xml);
|
$bilansXML = $this->formatList($xml);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Lecture de la base de données
|
// Lecture de la base de données
|
||||||
$sql = $bilansM->select()
|
$columns = array(
|
||||||
->from($bilansM, array(
|
'siren',
|
||||||
'siren',
|
'numRC',
|
||||||
'numRC',
|
'LPAD(numGreffe,4,0) AS numGreffe',
|
||||||
'LPAD(numGreffe,4,0) AS numGreffe',
|
'pdfLink',
|
||||||
'pdfLink',
|
'pdfSize',
|
||||||
'pdfSize',
|
'pdfPage',
|
||||||
'pdfPage',
|
'millesime',
|
||||||
'millesime',
|
'num_depot',
|
||||||
'num_depot',
|
'date_cloture',
|
||||||
'date_cloture',
|
'type_comptes',
|
||||||
'type_comptes',
|
'mode_diffusion',
|
||||||
'mode_diffusion',
|
'duree_exercice',
|
||||||
'duree_exercice',
|
'saisie_date',
|
||||||
'saisie_date',
|
'saisie_code',
|
||||||
'saisie_code',
|
'pages',
|
||||||
'pages',
|
);
|
||||||
))
|
try {
|
||||||
->where('siren=?', $this->siren)
|
$qb = $this->conn->createQueryBuilder();
|
||||||
->where('actif=1')
|
$qb->select($columns)->from('jo.greffes_bilans')
|
||||||
->order('date_cloture DESC')
|
->where('siren=:siren')->setParameter('siren', $this->siren)->andWhere('actif=1')
|
||||||
->order('num_depot DESC')
|
->orderBy('date_cloture', 'DESC')->orderBy('num_depot', 'DESC')
|
||||||
->order('dateInsert DESC');
|
->orderBy('date_cloture', 'DESC');
|
||||||
//GROUP BY type_comptes, date_cloture AND ORDER BY num_depot DESC
|
$stmt = $qb->execute();
|
||||||
$rows = $bilansM->fetchAll($sql);
|
}
|
||||||
|
catch(\Doctrine\DBAL\DBALException $e) {
|
||||||
|
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$bilans = array();
|
$bilans = array();
|
||||||
if ( count($rows)>0 ) {
|
if ($stmt->rowCount() > 0) {
|
||||||
|
$rows = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
foreach ( $rows as $row ) {
|
foreach ( $rows as $row ) {
|
||||||
$item = new stdClass();
|
$item = new stdClass();
|
||||||
$item->File = $row->pdfLink;
|
$item->File = $row->pdfLink;
|
||||||
@ -183,33 +193,35 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
*/
|
*/
|
||||||
public function getCommandeT($dateCloture = null, $type = 'sociaux', $orderId = null)
|
public function getCommandeT($dateCloture = null, $type = 'sociaux', $orderId = null)
|
||||||
{
|
{
|
||||||
//Lire dans la base de données
|
// Lire dans la base de données
|
||||||
$bilansM = new Application_Model_JoGreffesBilans();
|
$columns = array(
|
||||||
$sql = $bilansM->select()
|
'siren',
|
||||||
->from($bilansM, array(
|
'numRC',
|
||||||
'siren',
|
'LPAD(numGreffe,4,0) AS numGreffe',
|
||||||
'numRC',
|
'pdfLink',
|
||||||
'LPAD(numGreffe,4,0) AS numGreffe',
|
'millesime',
|
||||||
'pdfLink',
|
'num_depot',
|
||||||
'millesime',
|
'date_cloture',
|
||||||
'num_depot',
|
'type_comptes',
|
||||||
'date_cloture',
|
);
|
||||||
'type_comptes',
|
$qb = $this->conn->createQueryBuilder();
|
||||||
))
|
$qb->select($columns)->from('jo.greffes_bilans')
|
||||||
->where('siren=?', $this->siren)
|
->where('siren=:siren')->setParameter('siren', $this->siren)
|
||||||
->where('date_cloture=?', $dateCloture);
|
->andWhere('date_cloture=:date')->setParameter('date', $dateCloture);
|
||||||
if ( $type == 'sociaux' || $type == '' ) {
|
if ( $type == 'sociaux' || $type == '' ) {
|
||||||
$sql->where("(type_comptes='sociaux' OR type_comptes='')");
|
$qb->andWhere("(type_comptes='sociaux' OR type_comptes='')");
|
||||||
} else {
|
} else {
|
||||||
$sql->where('type_comptes=?',$type);
|
$qb->andWhere('type_comptes=:type')->setParameter('type', $type);
|
||||||
}
|
}
|
||||||
$sql->order('dateInsert DESC')->order('num_depot DESC')->limit(1);
|
$qb->orderBy('dateInsert', 'DESC')->orderBy('num_depot', 'DESC');
|
||||||
|
$stmt = $qb->execute();
|
||||||
|
|
||||||
$row = $bilansM->fetchRow($sql);
|
if ( $stmt->rowCount() == 0 ) {
|
||||||
if ( null === $row ) {
|
|
||||||
throw new Exception("Element doesn't exist");
|
throw new Exception("Element doesn't exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
|
||||||
$this->mode_diffusion = 'T';
|
$this->mode_diffusion = 'T';
|
||||||
$this->reference_client = 'T'.date('YmdHis');
|
$this->reference_client = 'T'.date('YmdHis');
|
||||||
$this->greffe = $row->numGreffe;
|
$this->greffe = $row->numGreffe;
|
||||||
@ -262,11 +274,10 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $orderId !== null ) {
|
if ( $orderId !== null ) {
|
||||||
$commandeM = new Application_Model_Sdv1GreffeCommandesBi();
|
$this->conn->update('sdv1.greffe_commandes_bi', array(
|
||||||
$commandeM->update(array(
|
'cmdUrl' => $url,
|
||||||
'cmdUrl'=> $url,
|
'dateCommande' => date('YmdHis')),
|
||||||
'dateCommande' => date('YmdHis'),
|
array('id' => $orderId));
|
||||||
), 'id='.$orderId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Récupérer le fichier
|
//Récupérer le fichier
|
||||||
@ -298,33 +309,36 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
{
|
{
|
||||||
$this->mode_diffusion = 'C';
|
$this->mode_diffusion = 'C';
|
||||||
|
|
||||||
//Lire dans la base de données
|
// Lire dans la base de données
|
||||||
$bilansM = new Application_Model_JoGreffesBilans();
|
$columns = array(
|
||||||
$sql = $bilansM->select()
|
'siren',
|
||||||
->from($bilansM, array(
|
'numRC',
|
||||||
'siren',
|
'LPAD(numGreffe,4,0) AS numGreffe',
|
||||||
'numRC',
|
'pdfLink',
|
||||||
'LPAD(numGreffe,4,0) AS numGreffe',
|
'millesime',
|
||||||
'pdfLink',
|
'num_depot',
|
||||||
'millesime',
|
'date_cloture',
|
||||||
'num_depot',
|
'type_comptes',
|
||||||
'date_cloture',
|
);
|
||||||
'type_comptes',
|
$qb = $this->conn->createQueryBuilder();
|
||||||
))
|
$qb->select($columns)->from('jo.greffes_bilans')
|
||||||
->where('siren=?', $this->siren)
|
->where('siren=:siren')->setParameter('siren', $this->siren)
|
||||||
->where('date_cloture=?', $dateCloture);
|
->andWhere('date_cloture=:date')->setParameter('date', $dateCloture);
|
||||||
if ($type=='sociaux') {
|
if ($type == 'sociaux') {
|
||||||
$sql->where("(type_comptes='sociaux' OR type_comptes='')");
|
$qb->andWhere("(type_comptes='sociaux' OR type_comptes='')");
|
||||||
} else {
|
} else {
|
||||||
$sql->where('type_comptes=?',$type);
|
$qb->andWhere('type_comptes=:type')->setParameter('type', $type);
|
||||||
}
|
}
|
||||||
$row = $bilansM->fetchRow($sql);
|
$stmt = $qb->execute();
|
||||||
if ( null === $row ) {
|
|
||||||
|
if ( $stmt->rowCount() == 0 ) {
|
||||||
throw new Exception('Not exist');
|
throw new Exception('Not exist');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->reference_client = $reference;
|
$this->reference_client = $reference;
|
||||||
|
|
||||||
|
$row = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
|
||||||
//Générer les paramètres de commande depuis la base de données
|
//Générer les paramètres de commande depuis la base de données
|
||||||
$this->greffe = $row->numGreffe;
|
$this->greffe = $row->numGreffe;
|
||||||
$this->dossier_millesime = substr($row->numRC,0,2);
|
$this->dossier_millesime = substr($row->numRC,0,2);
|
||||||
@ -355,7 +369,7 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
*/
|
*/
|
||||||
public function getFileName($type, $dateCloture)
|
public function getFileName($type, $dateCloture)
|
||||||
{
|
{
|
||||||
if ($type=='') {
|
if ($type == '') {
|
||||||
$type = 'sociaux';
|
$type = 'sociaux';
|
||||||
}
|
}
|
||||||
$date = substr($dateCloture,0,4).substr($dateCloture,5,2).substr($dateCloture,8,2);
|
$date = substr($dateCloture,0,4).substr($dateCloture,5,2).substr($dateCloture,8,2);
|
||||||
@ -372,7 +386,7 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
*/
|
*/
|
||||||
public function getFilePath($type, $dateCloture)
|
public function getFilePath($type, $dateCloture)
|
||||||
{
|
{
|
||||||
if ($type=='') {
|
if ($type == '') {
|
||||||
$type = 'sociaux';
|
$type = 'sociaux';
|
||||||
}
|
}
|
||||||
return 'bilans' . '/' . $type . '/' . substr($dateCloture,0,4);
|
return 'bilans' . '/' . $type . '/' . substr($dateCloture,0,4);
|
||||||
@ -392,10 +406,8 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
$bilan_complet = $liste_bilan_complet->getElementsByTagName('bilan_complet');
|
$bilan_complet = $liste_bilan_complet->getElementsByTagName('bilan_complet');
|
||||||
|
|
||||||
$bilans = array();
|
$bilans = array();
|
||||||
if ( count($bilan_complet)>0 )
|
if (count($bilan_complet) > 0) {
|
||||||
{
|
foreach( $bilan_complet as $element ) {
|
||||||
foreach( $bilan_complet as $element )
|
|
||||||
{
|
|
||||||
$bilan = array();
|
$bilan = array();
|
||||||
$num_gest = $element->getElementsByTagName('num_gest')->item(0);
|
$num_gest = $element->getElementsByTagName('num_gest')->item(0);
|
||||||
$bilan['num_gest']['greffe'] = $num_gest->getElementsByTagName('greffe')->item(0)->nodeValue;
|
$bilan['num_gest']['greffe'] = $num_gest->getElementsByTagName('greffe')->item(0)->nodeValue;
|
||||||
@ -412,8 +424,7 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
$bilan['num_depot'] = $element->getElementsByTagName('num_depot')->item(0)->nodeValue;
|
$bilan['num_depot'] = $element->getElementsByTagName('num_depot')->item(0)->nodeValue;
|
||||||
$bilan['type_comptes'] = $element->getElementsByTagName('type_comptes')->item(0)->nodeValue;
|
$bilan['type_comptes'] = $element->getElementsByTagName('type_comptes')->item(0)->nodeValue;
|
||||||
$mode_diffusion = $element->getElementsByTagName('mode_diffusion')->item(0)->getElementsByTagName('mode');
|
$mode_diffusion = $element->getElementsByTagName('mode_diffusion')->item(0)->getElementsByTagName('mode');
|
||||||
foreach($mode_diffusion as $mode)
|
foreach($mode_diffusion as $mode) {
|
||||||
{
|
|
||||||
$bilan['mode_diffusion'][] = $mode->getAttribute('type');
|
$bilan['mode_diffusion'][] = $mode->getAttribute('type');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,8 +433,7 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
|
|
||||||
//Génération de l'index pour le tri
|
//Génération de l'index pour le tri
|
||||||
$date = $bilan['date_cloture_iso'];
|
$date = $bilan['date_cloture_iso'];
|
||||||
if( !empty($date) )
|
if( !empty($date) ) {
|
||||||
{
|
|
||||||
$key = substr($date,0,4).substr($date,5,2).substr($date,8,2).'-'.$bilan['num_depot'];
|
$key = substr($date,0,4).substr($date,5,2).substr($date,8,2).'-'.$bilan['num_depot'];
|
||||||
//Affectation liste générale avec un index permettant le tri
|
//Affectation liste générale avec un index permettant le tri
|
||||||
$bilans[$key] = $bilan;
|
$bilans[$key] = $bilan;
|
||||||
@ -469,7 +479,7 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
*/
|
*/
|
||||||
protected function dbUpdateItem($list)
|
protected function dbUpdateItem($list)
|
||||||
{
|
{
|
||||||
//Insert or Update
|
// Insert or Update
|
||||||
$data = array(
|
$data = array(
|
||||||
'siren' => $list['num_siren'],
|
'siren' => $list['num_siren'],
|
||||||
'numRC' => $list['num_gest']['dossier_millesime'].
|
'numRC' => $list['num_gest']['dossier_millesime'].
|
||||||
@ -484,58 +494,58 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
'actif' => 1,
|
'actif' => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->db->getProfiler()->setEnabled(true);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$bilanM = new Application_Model_JoGreffesBilans();
|
$sql = "SELECT * FROM jo.greffes_bilans
|
||||||
$sql = $bilanM->select()
|
WHERE siren=:siren AND num_depot=:num AND date_cloture=:date ORDER BY dateInsert";
|
||||||
->where('siren=?', $this->siren)
|
$stmt = $this->conn->prepare($sql);
|
||||||
->where('num_depot=?', $list['num_depot'])
|
$stmt->bindValue('siren', $this->siren);
|
||||||
->where('date_cloture=?', $list['date_cloture_iso'])
|
$stmt->bindValue('num', $list['num_depot']);
|
||||||
//->where('type_comptes=?', $list['type_comptes'])
|
$stmt->bindValue('date', $list['date_cloture_iso']);
|
||||||
->order('dateInsert ASC');
|
$stmt->execute();
|
||||||
$rows = $bilanM->fetchAll($sql);
|
// Insert
|
||||||
} catch(Zend_Db_Exception $e) {
|
if ($stmt->rowCount() == 0) {
|
||||||
/*echo $query = $this->db->getProfiler()->getLastQueryProfile()->getQuery();
|
$data['dateInsert'] = date('YmdHis');
|
||||||
echo "\n";
|
|
||||||
$queryParams = $this->db->getProfiler()->getLastQueryProfile()->getQueryParams();
|
|
||||||
print_r($queryParams);
|
|
||||||
echo "\n";*/
|
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->db->getProfiler()->setEnabled(false);
|
|
||||||
|
|
||||||
if ( count($rows) == 0 ) {
|
|
||||||
//Add dateInsert
|
|
||||||
$data['dateInsert'] = date('YmdHis');
|
|
||||||
try {
|
|
||||||
$result = $bilanM->insert($data);
|
|
||||||
} catch(Zend_Exception $e) {
|
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//Correct multiple item
|
|
||||||
$item = $rows[0];
|
|
||||||
if ( count($rows) > 1 ) {
|
|
||||||
try {
|
try {
|
||||||
$result = $bilanM->delete(array(
|
$result = $this->conn->insert('jo.greffes_bilans', $data);
|
||||||
$bilanM->getAdapter()->quoteInto('siren=?', $this->siren),
|
}
|
||||||
$bilanM->getAdapter()->quoteInto('num_depot=?', $list['num_depot']),
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
$bilanM->getAdapter()->quoteInto('date_cloture=?', $list['date_cloture_iso']),
|
throw new Exception($e->getMessage());
|
||||||
$bilanM->getAdapter()->quoteInto('type_comptes=?', $list['type_comptes']),
|
}
|
||||||
'id!='.$item->id,
|
}
|
||||||
));
|
// Update
|
||||||
} catch(Zend_Exception $e) {
|
else {
|
||||||
|
// Get first Item
|
||||||
|
$item = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
|
||||||
|
// Correction anomalie item multiple
|
||||||
|
if ($stmt->rowCount() > 1) {
|
||||||
|
$this->conn->beginTransaction();
|
||||||
|
try {
|
||||||
|
while ($rowDel = $stmt->fetch(\PDO::FETCH_OBJ)) {
|
||||||
|
$this->conn->delete('jo.greffes_bilans', array(
|
||||||
|
'id' => $rowDel->id));
|
||||||
|
}
|
||||||
|
$this->conn->commit();
|
||||||
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
|
$this->conn->rollBack();
|
||||||
|
throw new Exception($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Real Update
|
||||||
|
try {
|
||||||
|
$result = $this->conn->update('jo.greffes_bilans', $data,
|
||||||
|
array('id' => $item->id));
|
||||||
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
throw new Exception($e->getMessage());
|
throw new Exception($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
}
|
||||||
$result = $bilanM->update($data, 'id='.$item->id);
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
} catch(Zend_Exception $e) {
|
throw new Exception($e->getMessage());
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
@ -556,25 +566,22 @@ class Metier_Infogreffe_DocBI extends Metier_Infogreffe_Service
|
|||||||
public function dbSetFile($filename, $size = 0, $numberOfPage = '', $version = '')
|
public function dbSetFile($filename, $size = 0, $numberOfPage = '', $version = '')
|
||||||
{
|
{
|
||||||
$data = array(
|
$data = array(
|
||||||
'pdfLink' => $filename,
|
'pdfLink' => $filename,
|
||||||
'pdfSize' => $size,
|
'pdfSize' => $size,
|
||||||
'pdfPage' => $numberOfPage,
|
'pdfPage' => $numberOfPage,
|
||||||
'pdfVer' => $version,
|
'pdfVer' => $version,
|
||||||
'pdfDate' => date('Ymd'),
|
'pdfDate' => date('Ymd'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$where = array(
|
$identifier = array(
|
||||||
'siren='.$this->siren,
|
'siren' => $this->siren,
|
||||||
'date_cloture="'.$this->date_cloture.'"',
|
'date_cloture' => $this->date_cloture,
|
||||||
'type_comptes="'.$this->type_comptes.'"',
|
'type_comptes' => $this->type_comptes,
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$bilanM = new Application_Model_JoGreffesBilans();
|
$result = $this->conn->update('jo.greffes_bilans', $data, $identifier);
|
||||||
$result = $bilanM->update($data, $where);
|
} catch(\Doctrine\DBAL\DBALException $e) {
|
||||||
} catch(Zend_Db_Adapter_Exception $e) {
|
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
} catch(Zend_Db_Exception $e) {
|
|
||||||
throw new Exception($e->getMessage());
|
throw new Exception($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,37 +8,43 @@ class Metier_Infogreffe_DocST extends Metier_Infogreffe_Service
|
|||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Db Adapter
|
* PDO Connection with Doctrine
|
||||||
* @var Zend_Db_Adapter_Abstract
|
* @var \Doctrine\DBAL\Connection
|
||||||
*/
|
*/
|
||||||
public $db;
|
protected $conn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Infogreffe : Document Bilan
|
||||||
* @param string $siren
|
* @param \Doctrine\DBAL\Connection $conn
|
||||||
*/
|
*/
|
||||||
public function __construct($siren, $db = null)
|
public function __construct($conn = null)
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
//Set type
|
// Set Database
|
||||||
$this->type_document = 'ST';
|
if ($conn === null) {
|
||||||
|
$this->conn = Zend_Registry::get('doctrine');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->conn = $conn;
|
||||||
|
}
|
||||||
|
|
||||||
//Set Siren
|
// Set type
|
||||||
$this->siren = $siren;
|
$this->type_document = 'ST';
|
||||||
|
}
|
||||||
|
|
||||||
//Get defaut database adapter
|
/**
|
||||||
if ($db === null) {
|
* Défini le SIREN
|
||||||
$this->db = Zend_Db_Table_Abstract::getDefaultAdapter();
|
* @param string $siren
|
||||||
} else {
|
* @return void
|
||||||
$this->db = $db;
|
*/
|
||||||
}
|
public function setSiren($siren)
|
||||||
}
|
{
|
||||||
|
$this->siren = $siren;
|
||||||
|
}
|
||||||
|
|
||||||
public function getList()
|
public function getList()
|
||||||
{
|
{}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCommandeT()
|
public function getCommandeT()
|
||||||
{
|
{
|
||||||
@ -67,11 +73,10 @@ class Metier_Infogreffe_DocST extends Metier_Infogreffe_Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $orderId !== null ) {
|
if ( $orderId !== null ) {
|
||||||
$commandeM = new Application_Model_Sdv1GreffeCommandesBi();
|
$this->conn->update('sdv1.greffe_commandes_st', array(
|
||||||
$commandeM->update(array(
|
'cmdUrl' => $url,
|
||||||
'cmdUrl'=> $url,
|
'dateCommande' => date('YmdHis')),
|
||||||
'dateCommande' => date('YmdHis'),
|
array('id' => $orderId));
|
||||||
), 'id='.$orderId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Récupérer le fichier
|
//Récupérer le fichier
|
||||||
@ -117,10 +122,7 @@ class Metier_Infogreffe_DocST extends Metier_Infogreffe_Service
|
|||||||
*/
|
*/
|
||||||
public function getFilePath($type, $dateCloture)
|
public function getFilePath($type, $dateCloture)
|
||||||
{
|
{
|
||||||
if ($type=='') {
|
return 'statut/' . $type . '/' . substr($dateCloture,0,4);
|
||||||
$type = 'sociaux';
|
|
||||||
}
|
|
||||||
return 'bilans' . '/' . $type . '/' . substr($dateCloture,0,4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -238,6 +238,7 @@ class Metier_Infogreffe_Service
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Download file from URL
|
* Download file from URL
|
||||||
|
* @todo : Use Guzzle
|
||||||
* @param string $url
|
* @param string $url
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -13,11 +13,6 @@ class Metier_Liens_Base
|
|||||||
*/
|
*/
|
||||||
protected $siren = null;
|
protected $siren = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Zend_Db_Adapter_Abstract
|
|
||||||
*/
|
|
||||||
protected $db;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array to list id find during list of childrens
|
* Array to list id find during list of childrens
|
||||||
* @var array
|
* @var array
|
||||||
@ -43,38 +38,50 @@ class Metier_Liens_Base
|
|||||||
public $stopAtPP = true;
|
public $stopAtPP = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Databas table name
|
* PDO Connection with Doctrine
|
||||||
* @var string
|
* @var \Doctrine\DBAL\Connection
|
||||||
*/
|
*/
|
||||||
protected $_schema = 'jo';
|
protected $conn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Gestion des liens inter entreprises
|
||||||
* @param string $id
|
* @param \Doctrine\DBAL\Connection $conn
|
||||||
* @param string $type ref|siren
|
|
||||||
* @param Zend_Db_Adapter $db
|
|
||||||
* @throws SoapFault
|
|
||||||
*/
|
*/
|
||||||
public function __construct($id, $type = 'ref', $db = null)
|
public function __construct($conn = null)
|
||||||
{
|
{
|
||||||
//Get defaut database adapter
|
if ($conn === null) {
|
||||||
if( $db === null ) {
|
$this->conn = Zend_Registry::get('doctrine');
|
||||||
$this->db = Zend_Db_Table_Abstract::getDefaultAdapter();
|
}
|
||||||
} else {
|
else {
|
||||||
$this->db = $db;
|
$this->conn = $conn;
|
||||||
Zend_Db_Table_Abstract::setDefaultAdapter($db);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get Id
|
/**
|
||||||
|
* Identifiant
|
||||||
|
* @param string $id
|
||||||
|
* @param string $type ref|siren
|
||||||
|
*/
|
||||||
|
public function setId($id, $type = 'ref')
|
||||||
|
{
|
||||||
|
// Get Id
|
||||||
if ( $type == 'siren' ) {
|
if ( $type == 'siren' ) {
|
||||||
$this->siren = $id;
|
$this->siren = $id;
|
||||||
$refM = new Application_Model_JoLiensRef();
|
try {
|
||||||
$sql = $refM->select()->where('siren=?', $id)->where('dateSuppr=0');
|
$sql = "SELECT * FROM jo.liensRef WHERE siren = :id AND dateSuppr = 0";
|
||||||
$result = $refM->fetchRow($sql);
|
$stmt = $this->conn->prepare($sql);
|
||||||
if ( $result !== null ) {
|
$stmt->bindValue('id', $id);
|
||||||
$this->idRef = $result->id;
|
$stmt->execute();
|
||||||
}
|
if ($stmt->rowCount() > 0) {
|
||||||
} else {
|
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
$this->idRef = $result->id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
|
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
$this->idRef = $id;
|
$this->idRef = $id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,34 +105,36 @@ class Metier_Liens_Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$sql = $this->db->select()
|
$qb = $this->conn->createQueryBuilder();
|
||||||
->from(array('l'=>$this->_schema.'.liens2'),
|
$qb->select(array(
|
||||||
array('id', 'idAct', 'PDetention', 'Pvote', 'MajMin', 'idPar',
|
'l.id', 'l.idAct', 'l.PDetention', 'l.Pvote', 'l.MajMin', 'l.idPar',
|
||||||
'dateEffetLien', 'dateInsert', 'dateUpdate'))
|
'l.dateEffetLien', 'l.dateInsert', 'l.dateUpdate',
|
||||||
->where('idPar=?', $id)
|
'LPAD(r.siren, 9, 0) AS siren', 'r.PpPm', 'r.RS', 'r.sigle', 'r.civilite', 'r.nom',
|
||||||
->join(array('r'=>$this->_schema.'.liensRef'), 'l.idAct=r.id',
|
'r.prenom', 'r.nom_usage', 'r.naissance_date', 'r.naissance_dept_pays',
|
||||||
array('LPAD(siren, 9, 000000000) AS siren','PpPm', 'RS', 'sigle', 'civilite', 'nom', 'prenom', 'nom_usage',
|
'r.naissance_lieu', 'r.nat', 'r.adresse_num', 'r.adresse_btq', 'r.adresse_codvoie',
|
||||||
'naissance_date', 'naissance_dept_pays', 'naissance_lieu', 'nat',
|
'r.adresse_libvoie', 'r.adresse_comp', 'r.adresse_cp', 'r.adresse_ville',
|
||||||
'adresse_num', 'adresse_btq', 'adresse_codvoie', 'adresse_libvoie',
|
'r.adresse_pays', 'r.idLoc1Type', 'r.idLoc1Num', 'r.idLoc2Type', 'r.idLoc2Num',
|
||||||
'adresse_comp', 'adresse_cp', 'adresse_ville', 'adresse_pays',
|
'r.idLoc3Type', 'r.idLoc3Num'
|
||||||
'idLoc1Type', 'idLoc1Num', 'idLoc2Type', 'idLoc2Num', 'idLoc3Type', 'idLoc3Num',
|
)
|
||||||
))
|
)->from('jo.liens2', 'l')->join('l', 'jo.liensRef', 'r', 'l.idAct = r.id')
|
||||||
->order('PDetention DESC');
|
->where('l.idPar = :id')->setParameter('id', $id)
|
||||||
|
->orderBy('l.PDetention', 'DESC');
|
||||||
|
|
||||||
//Actif / Inactif
|
// Actif / Inactif
|
||||||
if ( null !== $actif ) {
|
if ( null !== $actif ) {
|
||||||
if ( false === $actif ) {
|
if ( false === $actif ) {
|
||||||
$sql->where('l.actif=?',0);
|
$qb->andWhere('l.actif = 0');
|
||||||
} else {
|
} else {
|
||||||
$sql->where('l.actif=?',1);
|
$qb->andWhere('l.actif = 1');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//Don't display deleted - anomaly
|
// Don't display deleted - anomaly
|
||||||
$sql->where('l.dateSuppr=?', '0000-00-00 00:00:00');
|
$qb->andWhere("l.dateSuppr = '0000-00-00 00:00:00'");
|
||||||
|
$stmt = $qb->execute();
|
||||||
$liens = $this->db->fetchAll($sql, null, Zend_Db::FETCH_OBJ);
|
$liens = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
} catch (Zend_Db_Exception $e) {
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,34 +166,36 @@ class Metier_Liens_Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$sql = $this->db->select()
|
$qb = $this->conn->createQueryBuilder();
|
||||||
->from(array('l'=>$this->_schema.'.liens2'),
|
$qb->select(array(
|
||||||
array('id', 'idAct', 'PDetention', 'Pvote', 'MajMin', 'idPar',
|
'l.id', 'l.idAct', 'l.PDetention', 'l.Pvote', 'l.MajMin', 'l.idPar',
|
||||||
'dateEffetLien', 'dateInsert', 'dateUpdate'))
|
'l.dateEffetLien', 'l.dateInsert', 'l.dateUpdate',
|
||||||
->where('idAct=?', $id)
|
'LPAD(r.siren, 9, 0) AS siren', 'r.PpPm', 'r.RS', 'r.sigle', 'r.civilite', 'r.nom',
|
||||||
->join(array('r'=>$this->_schema.'.liensRef'), 'l.idPar=r.id',
|
'r.prenom', 'r.nom_usage', 'r.naissance_date', 'r.naissance_dept_pays',
|
||||||
array('LPAD(siren, 9, 000000000) AS siren','PpPm', 'RS', 'sigle', 'civilite', 'nom', 'prenom', 'nom_usage',
|
'r.naissance_lieu', 'r.nat', 'r.adresse_num', 'r.adresse_btq', 'r.adresse_codvoie',
|
||||||
'naissance_date', 'naissance_dept_pays', 'naissance_lieu', 'nat',
|
'r.adresse_libvoie', 'r.adresse_comp', 'r.adresse_cp', 'r.adresse_ville',
|
||||||
'adresse_num', 'adresse_btq', 'adresse_codvoie', 'adresse_libvoie',
|
'r.adresse_pays', 'r.idLoc1Type', 'r.idLoc1Num', 'r.idLoc2Type', 'r.idLoc2Num',
|
||||||
'adresse_comp', 'adresse_cp', 'adresse_ville', 'adresse_pays',
|
'r.idLoc3Type', 'r.idLoc3Num'
|
||||||
'idLoc1Type', 'idLoc1Num', 'idLoc2Type', 'idLoc2Num', 'idLoc3Type', 'idLoc3Num',
|
)
|
||||||
))
|
)->from('jo.liens2', 'l')->join('l', 'jo.liensRef', 'r', 'l.idPar=r.id')
|
||||||
->order('PDetention DESC');
|
->where('l.idAct = :id')->setParameter('id', $id)
|
||||||
|
->orderBy('l.PDetention', 'DESC');
|
||||||
|
|
||||||
//Actif / Inactif
|
// Actif / Inactif
|
||||||
if ( null !== $actif ) {
|
if ( null !== $actif ) {
|
||||||
if ( false === $actif ) {
|
if ( false === $actif ) {
|
||||||
$sql->where('l.actif=?',0);
|
$qb->andWhere('l.actif = 0');
|
||||||
} else {
|
} else {
|
||||||
$sql->where('l.actif=?',1);
|
$qb->andWhere('l.actif = 1');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Don't display deleted - anomaly
|
//Don't display deleted - anomaly
|
||||||
$sql->where('l.dateSuppr=?', '0000-00-00 00:00:00');
|
$qb->andWhere("l.dateSuppr = '0000-00-00 00:00:00'");
|
||||||
|
$stmt = $qb->execute();
|
||||||
$liens = $this->db->fetchAll($sql, null, Zend_Db::FETCH_OBJ);
|
$liens = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
} catch (Zend_Db_Exception $e) {
|
}
|
||||||
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,42 +205,45 @@ class Metier_Liens_Base
|
|||||||
/**
|
/**
|
||||||
* Fonctions de direction
|
* Fonctions de direction
|
||||||
* @param boolean $actif
|
* @param boolean $actif
|
||||||
* @return Zend_Db_Table_Rowset_Abstract
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getDirections($actif = null)
|
public function getDirections($actif = null)
|
||||||
{
|
{
|
||||||
if ( null === $this->siren ) {
|
if (null === $this->siren) {
|
||||||
$refM = new Application_Model_JoLiensRef();
|
$sql = "SELECT LPAD(siren, 9, 0) AS siren FROM jo.liensRef WHERE id = :id";
|
||||||
$rows = $refM->find($this->idRef);
|
$stmt = $this->conn->prepare($sql);
|
||||||
$siren = str_pad($rows->current()->siren, 9, '0', STR_PAD_LEFT);
|
$stmt->bindValue('id', $this->idRef);
|
||||||
} else {
|
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
$siren = $result->siren;
|
||||||
|
}
|
||||||
|
else {
|
||||||
$siren = $this->siren;
|
$siren = $this->siren;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
if ( null !== $siren && intval($siren) != 0 )
|
if (null !== $siren && intval($siren) != 0) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
$directionsM = new Application_Model_JoRncsDirigeants();
|
$qb = $this->conn->createQueryBuilder();
|
||||||
$sql = $directionsM->select()->from($directionsM, array(
|
$qb->select(array('LPAD(siren, 9, 0) AS siren', 'raisonSociale',
|
||||||
'LPAD(siren, 9, 000000000) AS siren','raisonSociale', 'dirSiren', 'dirRS', 'civilite', 'nom',
|
'dirSiren', 'dirRS', 'civilite', 'nom', 'prenom', 'naissance_date',
|
||||||
'prenom', 'naissance_date', 'naissance_lieu', 'fonction_code', 'fonction_lib'
|
'naissance_lieu', 'fonction_code', 'fonction_lib')
|
||||||
))->where("typeDir IN ('PM', 'PP')")->where('dirSiren=?', $siren);
|
)->from('jo.rncs_dirigeants')->where("typeDir IN ('PM', 'PP')")
|
||||||
|
->andWhere('dirSiren = :siren')->setParameter('siren', $siren);
|
||||||
//Actif / Inactif
|
// Actif / Inactif
|
||||||
if ( null !== $actif ) {
|
if (null !== $actif) {
|
||||||
if ( false === $actif ) {
|
if ( false === $actif ) {
|
||||||
$sql->where('actif=?',0);
|
$qb->andWhere('actif = 0');
|
||||||
} else {
|
|
||||||
$sql->where('actif=?',1);
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$qb->andWhere('actif = 1');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$sql->order('fonction_code DESC');
|
$qb->orderBy('fonction_code', 'DESC');
|
||||||
$sql->order('raisonSociale ASC');
|
$qb->orderBy('raisonSociale', 'ASC');
|
||||||
|
$stmt = $qb->execute();
|
||||||
$result = $directionsM->fetchAll($sql);
|
$result = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
} catch (Zend_Db_Exception $e) {
|
} catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
throw new Exception(__METHOD__ . ': ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -237,7 +251,6 @@ class Metier_Liens_Base
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne la maison mère
|
* Retourne la maison mère
|
||||||
* @param int $id
|
* @param int $id
|
||||||
@ -296,7 +309,7 @@ class Metier_Liens_Base
|
|||||||
/**
|
/**
|
||||||
* Retourne les éléments identitaire présent dans lienRef
|
* Retourne les éléments identitaire présent dans lienRef
|
||||||
* @param string $id
|
* @param string $id
|
||||||
* @return Zend_Db_Table_Rowset_Abstract
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getIdentity($id = null)
|
public function getIdentity($id = null)
|
||||||
{
|
{
|
||||||
@ -304,10 +317,12 @@ class Metier_Liens_Base
|
|||||||
$id = $this->idRef;
|
$id = $this->idRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
$refM = new Application_Model_JoLiensRef();
|
$sql = "SELECT * FROM jo.liensRef WHERE id = :id";
|
||||||
$row = $refM->find($id);
|
$stmt = $this->conn->prepare($sql);
|
||||||
if (null !== $row) {
|
$stmt->bindValue('id', $id);
|
||||||
return $row->current();
|
$stmt->execute();
|
||||||
|
if ($stmt->rowCount() > 0) {
|
||||||
|
return $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -319,7 +334,7 @@ class Metier_Liens_Base
|
|||||||
* @param int $nbNiveaux
|
* @param int $nbNiveaux
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getTree( $pctMin=33, $nbNiveaux=10 )
|
public function getTree($pctMin = 33, $nbNiveaux = 10)
|
||||||
{
|
{
|
||||||
//Get identity to stop at isin
|
//Get identity to stop at isin
|
||||||
$itemWithIsin = null;
|
$itemWithIsin = null;
|
||||||
@ -423,13 +438,16 @@ class Metier_Liens_Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Liste des entités du CAC40
|
||||||
* @return multitype:NULL
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCAC40()
|
public function getCAC40()
|
||||||
{
|
{
|
||||||
$sql = "SELECT isin, nom, MAX(`date`) AS dateMAJ FROM sdv1.bourse_listes WHERE lstCode='xcac40p' GROUP BY lstCode, isin HAVING MAX(`date`) ORDER BY dateMAJ DESC;";
|
$sql = "SELECT isin, nom, MAX(date) AS dateMAJ FROM sdv1.bourse_listes
|
||||||
$result = $this->db->query($sql);
|
WHERE lstCode='xcac40p' GROUP BY lstCode, isin HAVING MAX(date) ORDER BY dateMAJ DESC;";
|
||||||
|
$stmt = $this->conn->prepare($sql);
|
||||||
|
$stmt->execute();
|
||||||
|
$result = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
|
|
||||||
$output = array();
|
$output = array();
|
||||||
foreach ( $result as $item ) {
|
foreach ( $result as $item ) {
|
||||||
@ -444,23 +462,19 @@ class Metier_Liens_Base
|
|||||||
* @param number $pctMin
|
* @param number $pctMin
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getGroupeCAC40( $pctMin=50 )
|
public function getGroupeCAC40($pctMin = 50)
|
||||||
{
|
{
|
||||||
$listeIsin = $this->getCAC40();
|
$listeIsin = $this->getCAC40();
|
||||||
$isin = implode(",",$listeIsin);
|
$isin = "'".implode("','",$listeIsin)."'";
|
||||||
|
|
||||||
$refM = new Application_Model_JoLiensRef();
|
|
||||||
$sql = $refM->select()
|
|
||||||
->where("idLoc1Type=63")->where("idLoc1Num IN (?)", $isin)
|
|
||||||
->orWhere("idLoc2Type=63")->where("idLoc2Num IN (?)", $isin)
|
|
||||||
->orWhere("idLoc3Type=63")->where("idLoc3Num IN (?)", $isin);
|
|
||||||
|
|
||||||
$result = $refM->fetchAll($sql);
|
|
||||||
|
|
||||||
$this->findId = array();
|
$this->findId = array();
|
||||||
|
|
||||||
|
$sql = "SELECT id FROM jo.liensRef WHERE (idLoc1Type=63 AND idLoc1Num IN (".$isin."))
|
||||||
|
OR (idLoc2Type=63 AND idLoc2Num IN (".$isin.")) OR (idLoc3Type=63 AND idLoc3Num IN (".$isin."))";
|
||||||
|
$stmt = $this->conn->executeQuery($sql);
|
||||||
$output = array();
|
$output = array();
|
||||||
if ( $result->count()>0 ) {
|
if ($stmt->rowCount() > 0) {
|
||||||
|
$result = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
foreach ( $result as $item ) {
|
foreach ( $result as $item ) {
|
||||||
$output = $output + $this->getListeGroupeCAC40($item->id, $pctMin);
|
$output = $output + $this->getListeGroupeCAC40($item->id, $pctMin);
|
||||||
}
|
}
|
||||||
@ -504,7 +518,7 @@ class Metier_Liens_Base
|
|||||||
* @param number $pctMin
|
* @param number $pctMin
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function isInGroupeCAC40( $pctMin=50 )
|
public function isInGroupeCAC40($pctMin = 50)
|
||||||
{
|
{
|
||||||
//Si pas d'actionnaires => false
|
//Si pas d'actionnaires => false
|
||||||
if ( count($this->getActionnaires()) == 0 ) {
|
if ( count($this->getActionnaires()) == 0 ) {
|
||||||
@ -524,18 +538,16 @@ class Metier_Liens_Base
|
|||||||
*/
|
*/
|
||||||
protected function getCountry()
|
protected function getCountry()
|
||||||
{
|
{
|
||||||
$countryM = new Application_Model_JoTabPays();
|
$sql = "SELECT codPays3, libPays FROM jo.tabPays WHERE codPays3 IS NOT NULL";
|
||||||
$sql = $countryM->select()
|
$stmt = $this->conn->prepare($sql);
|
||||||
->from($countryM, array('codPays3', 'libPays'))
|
$stmt->execute();
|
||||||
->where('codPays3 IS NOT NULL');
|
if ($stmt->rowCount() > 0) {
|
||||||
$rows = $countryM->fetchAll($sql);
|
$data = array();
|
||||||
if ( $rows !== null ) {
|
foreach($rows as $item) {
|
||||||
$data = array();
|
$data[$item->codPays3] = $item->libPays;
|
||||||
foreach($rows as $item) {
|
}
|
||||||
$data[$item->codPays3] = $item->libPays;
|
return $data;
|
||||||
}
|
}
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -11,263 +11,300 @@ class Metier_Partenaires_MArtisanat
|
|||||||
public $libErreur='';
|
public $libErreur='';
|
||||||
public $cookie='';
|
public $cookie='';
|
||||||
public $iDb;
|
public $iDb;
|
||||||
public $enCache=false;
|
|
||||||
|
|
||||||
function __construct() {
|
protected $remote = false;
|
||||||
$this->iDb=new Metier_Util_Db();
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->iDb = new Metier_Util_Db();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIdentite($siren, $refresh=false) {
|
/**
|
||||||
$siren=$siren*1;
|
* Active la récupération des données distantes
|
||||||
$res=$this->iDb->select('jo.artisanat', 'id, siren, actif, numRM, denomination, sigle, nomCommercial, enseigne, fj, effectif, aprm, debutActivite, activite, adresse, cp, ville, cessation, radiation, nbInscriptions, nom, prenom, nomUsage, dateNaiss, lieuNaiss, natio, qualite, qualif, dateQualif, dateFctDeb, dateFctFin, IF(dateInsert>dateUpdate,dateInsert,dateUpdate) AS dateUpdate', "siren=$siren", false, MYSQL_ASSOC);
|
*/
|
||||||
if (count($res)>0 && !$refresh) {
|
public function setRemote()
|
||||||
$this->enCache=true;
|
{
|
||||||
$tabInsert=$res[0];
|
$this->remote = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getIdentite($siren)
|
||||||
|
{
|
||||||
|
$siren = $siren * 1;
|
||||||
|
$res = $this->iDb->select('jo.artisanat', 'id, siren, actif, numRM, denomination, sigle, nomCommercial, enseigne, fj, effectif, aprm, debutActivite, activite, adresse, cp, ville, cessation, radiation, nbInscriptions, nom, prenom, nomUsage, dateNaiss, lieuNaiss, natio, qualite, qualif, dateQualif, dateFctDeb, dateFctFin, IF(dateInsert>dateUpdate,dateInsert,dateUpdate) AS dateUpdate', "siren=$siren", false, MYSQL_ASSOC);
|
||||||
|
if (count($res)>0 && !$this->remote) {
|
||||||
|
$tabInsert = $res[0];
|
||||||
} elseif (ARTISANAT_DISPO_WEB) {
|
} elseif (ARTISANAT_DISPO_WEB) {
|
||||||
$this->enCache=false;
|
$tabInsert = $this->getRemoteIdentite();
|
||||||
$url='http://www.cma-paris.fr/CMP/rm_recherche.php?dom=Gerer&fonction=recherche';
|
|
||||||
$page=getUrl($url, '', '', $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
|
||||||
$this->body=$page['body'];
|
|
||||||
$this->codeRetour=$page['code'];
|
|
||||||
if ($this->codeRetour<>'200') {
|
|
||||||
$this->libErreur='Erreur Artisanat 200a !';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$this->cookie=$page['header']['Set-Cookie'];
|
|
||||||
$this->referer=$url;
|
|
||||||
|
|
||||||
$url='http://www.cma-paris.fr/CMP/rm_recherche.php?dom=Gerer&fonction=cherche';
|
|
||||||
$postData=array( 'siren_op'=>'%3D',
|
|
||||||
'siren'=>$siren,
|
|
||||||
'den_rent_op'=>'%25',
|
|
||||||
'den_rent'=>'',
|
|
||||||
'adresse_op'=>'contient',
|
|
||||||
'adresse'=>'',
|
|
||||||
'bde_rent_op'=>'%25',
|
|
||||||
'bde_rent'=>'',
|
|
||||||
'nom_rdir_op'=>'%25',
|
|
||||||
'nom_rdir'=>'',
|
|
||||||
'pren_rdir_op'=>'%25',
|
|
||||||
'pren_rdir'=>'',
|
|
||||||
'table'=>'rentreprise',//'rentrad',
|
|
||||||
'x'=>56,
|
|
||||||
'y'=>14,
|
|
||||||
);
|
|
||||||
sleep(rand(1, 2));
|
|
||||||
$page=getUrl($url, $this->cookie, $postData, $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
|
||||||
$this->body=$page['body'];
|
|
||||||
$this->codeRetour=$page['code'];
|
|
||||||
if ($this->codeRetour<>'200') {
|
|
||||||
$this->libErreur='Erreur Artisanat 200b !';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$this->referer=$url;
|
|
||||||
|
|
||||||
if (preg_match('/<span.class="rouge">aucune.entreprise.ne.correspond(?:.*)vos.crit(?:.*)de.recherche<\/span>/Uis', $this->body, $matches)) {
|
|
||||||
$url='http://www.cma-paris.fr/CMP/rm_recherche.php?dom=Gerer&fonction=cherche';
|
|
||||||
$postData=array( 'siren_op'=>'%3D',
|
|
||||||
'siren'=>$siren,
|
|
||||||
'den_rent_op'=>'%25',
|
|
||||||
'den_rent'=>'',
|
|
||||||
'adresse_op'=>'contient',
|
|
||||||
'adresse'=>'',
|
|
||||||
'bde_rent_op'=>'%25',
|
|
||||||
'bde_rent'=>'',
|
|
||||||
'nom_rdir_op'=>'%25',
|
|
||||||
'nom_rdir'=>'',
|
|
||||||
'pren_rdir_op'=>'%25',
|
|
||||||
'pren_rdir'=>'',
|
|
||||||
'table'=>'rentrad',
|
|
||||||
'x'=>56,
|
|
||||||
'y'=>14,
|
|
||||||
);
|
|
||||||
sleep(rand(1, 2));
|
|
||||||
$page=getUrl($url, $this->cookie, $postData, $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
|
||||||
$this->body=$page['body'];
|
|
||||||
$this->codeRetour=$page['code'];
|
|
||||||
if ($this->codeRetour<>'200') {
|
|
||||||
$this->libErreur='Erreur Artisanat 200c !';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$this->referer=$url;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Gestion des multi-inscriptions au RM **/
|
|
||||||
if (preg_match('/<b class="gris">(.*)entreprises.correspondent(?:.*)vos.crit(?:.*)de.recherche<\/span>/Uis', $this->body, $matches))
|
|
||||||
{
|
|
||||||
$nbRep=trim($matches[1])*1;
|
|
||||||
$iRadMax=-1;
|
|
||||||
if (preg_match_all('/<a class="turquoise" href="(rm\.php\?dom=Gerer&fonction=dossier&(.*))">/Uis', $this->body, $matches)) {
|
|
||||||
$tabUrls=array_unique($matches[1]);
|
|
||||||
$anRadMax=0;
|
|
||||||
// Recherche de la dernière inscription
|
|
||||||
foreach ($tabUrls as $iUrl=>$url) {
|
|
||||||
// On prend la dernière inscription
|
|
||||||
$tabTmp=explode('&',$url);
|
|
||||||
if (substr($tabTmp[3],0,8)=='an_rera=') {
|
|
||||||
$anRad=substr($tabTmp[3],8);
|
|
||||||
if ($anRad>$anRadMax) {
|
|
||||||
$anRadMax=$anRad;
|
|
||||||
$iRadMax=$iUrl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($iRadMax==-1) die('$iRadMax==-1 Cas impossible !'.PHP_EOL.print_r($tabUrls,true).PHP_EOL.print_r($matches,true));
|
|
||||||
// Accès à la dernière fiche
|
|
||||||
$url='http://www.cma-paris.fr/CMP/'.strtr(trim($tabUrls[$iRadMax]),array('&'=>'&'));
|
|
||||||
sleep(rand(1, 2));
|
|
||||||
$page=getUrl($url, $this->cookie, '', $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
|
||||||
$this->body=$page['body'];
|
|
||||||
$this->codeRetour=$page['code'];
|
|
||||||
if ($this->codeRetour<>'200') {
|
|
||||||
$this->libErreur='Erreur Artisanat 200c !';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$this->referer=$url;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tabInsert=array();
|
|
||||||
|
|
||||||
if (preg_match('/n° d\'identification \(SIREN\)<\/span><\/td>(?:.*)<td align="left" nowrap>(.*) <\/td>((?:.*)n° de gestion rm<\/span><\/td>(?:.*)<td align="left" nowrap>(.*)<\/td>)?/Uis', $this->body, $matches)) {
|
|
||||||
$sirenLu=$matches[1]*1;
|
|
||||||
if ($siren==$sirenLu) {
|
|
||||||
$tabInsert['siren']=$matches[1];
|
|
||||||
$tabInsert['numRM']=@$matches[2];
|
|
||||||
} else {
|
|
||||||
$this->libErreur='Erreur Siren $sirenLu<>$siren !';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} elseif (preg_match('/<span class="rouge">aucune entreprise ne correspond à vos critères de recherche<\/span>/Uis', $this->body, $matches)) {
|
|
||||||
$this->libErreur='Erreur Artisan absent de la base Artisanat !';
|
|
||||||
// die($this->body);
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
$this->libErreur='Erreur Siren absent dans la page !';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$actif=null;
|
|
||||||
if (preg_match("/Renseignements.relatif(?:.*)entreprise(.*)<\/b>/Uis", $this->body, $matches)) {
|
|
||||||
switch (trim(strtr($matches[1],array(chr(160)=>'')))) {
|
|
||||||
case 'en activité': $actif=1; break;
|
|
||||||
case 'radiée': $actif=0; break;
|
|
||||||
default: print_r($matches);die(); break;
|
|
||||||
}
|
|
||||||
//die(PHP_EOL.'$actif='.$actif.PHP_EOL.print_r($matches));
|
|
||||||
}
|
|
||||||
$tabInsert['actif']=$actif;
|
|
||||||
if ($actif===null) {
|
|
||||||
//die("siren=$siren".PHP_EOL."sirenLu=$sirenLu".PHP_EOL.$this->body);
|
|
||||||
$this->libErreur='Erreur Actif/Radié non trouvé !';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">dénomination<\/span><\/td>(?:.*)<td align="left" colspan="5">(.*)<\/td>/Uis', $this->body, $matches)) {
|
|
||||||
$tabInsert['denomination']=$matches[1];
|
|
||||||
}
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">dénomination<\/span><\/td>(?:.*)<td align="left" colspan="5">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['denomination']=$matches[1];
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">sigle<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['sigle']=$matches[1];
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise"> nom commercial<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['nomCommercial']=$matches[1];
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">enseigne<\/span><\/td>(?:.*)<td align="left" colspan="4">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['enseigne']=$matches[1];
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">forme juridique<\/span><\/td>(?:.*)<td align="left" colspan="5">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['fj']=$matches[1];
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">effectif<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['effectif']=$matches[1];
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">code APRM<\/span><\/td>(?:.*)<td align="left">(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['aprm']=$matches[1];
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">début d\'activité<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['debutActivite']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise"> activité\(s\) exercée\(s\) donnant lieu à immatriculation<\/span>(?:.*)<td colspan="5">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['activite']=trim($matches[1]);
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">adresse de l\'entreprise<\/span><\/td>(?:.*)<td align="left" colspan="5">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['adresse']=trim($matches[1]);
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">code postal<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['cp']=trim($matches[1]);
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">ville<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['ville']=trim($matches[1]);
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">cessation d\'activité<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['cessation']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">radiation du RM<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['radiation']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
|
||||||
$tabEtabs=array();
|
|
||||||
if (preg_match('/<!--deb Etablissements secondaires-->(?:.*)<b class="gris">Aucune inscription complémentaire<\/b>(?:.*)<!--fin Etablissements secondaires-->/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['nbInscriptions']=0;
|
|
||||||
elseif (preg_match('/<!--deb Etablissements secondaires-->(?:.*)<b class="gris">Inscription complémentaire<\/b>(.*)<!--fin Etablissements secondaires-->/Uis', $this->body, $matches)) {
|
|
||||||
$tabInsert['nbInscriptions']=0;
|
|
||||||
if (preg_match_all('/<tr>(?:.*)<td><img alt="" src="inter\/pixtrans\.gif" width="30" height="1"><\/td>(?:.*)<td nowrap>(?:.*)<!-- adresse -->(.*)<\/td>(?:.*)<td nowrap>(?:.*)<!-- code postal et ville -->(.*)<\/td>(?:.*)<td nowrap>(?:.*)<!-- enseigne -->(.*)<\/td>(?:.*)<td>(?:.*)<!-- debut activite -->(.*)<\/td>(?:.*)<td>(?:.*)<!-- fin activite -->(.*)<\/td>(?:.*)<\/tr>/Uis', $matches[1], $matches2)) {
|
|
||||||
foreach ($matches2[1] as $i=>$adresse) {
|
|
||||||
$tabEtabs[$i]['siren'] =$siren;
|
|
||||||
$tabEtabs[$i]['num'] =$i;
|
|
||||||
$tabEtabs[$i]['adresse'] =trim(strtr(html_entity_decode($adresse),chr(160),' '));
|
|
||||||
$tabEtabs[$i]['cpVille'] =trim(strtr(html_entity_decode($matches2[2][$i]),chr(160),' '));
|
|
||||||
$tabEtabs[$i]['enseigne']=trim(strtr(html_entity_decode($matches2[3][$i]),chr(160),' '));
|
|
||||||
$tabEtabs[$i]['actDeb'] =Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches2[4][$i]),chr(160),' ')));
|
|
||||||
$tabEtabs[$i]['actFin'] =Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches2[5][$i]),chr(160),' ')));
|
|
||||||
$tabInsert['nbInscriptions']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Informations sur la Personne Physique **/
|
|
||||||
if (preg_match('/<a class="turquoise" href="(rm\.php\?dom=Gerer&fonction=dirigeant&dept_re(.*))" onclick="window\.open\(this\.href/Uis', $this->body, $matches)) {
|
|
||||||
$urlDir='http://www.cma-paris.fr/CMP/'.strtr(trim($matches[1]),array('&'=>'&'));
|
|
||||||
//die($urlDir);
|
|
||||||
sleep(rand(1, 2));
|
|
||||||
$page=getUrl($urlDir, $this->cookie, '', $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
|
||||||
$this->body=$page['body'];
|
|
||||||
$this->codeRetour=$page['code'];
|
|
||||||
if ($this->codeRetour<>'200') {
|
|
||||||
$this->libErreur='Erreur Artisanat 200d !';
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$this->referer=$url;
|
|
||||||
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">nom<\/span><\/td>(?:.*)<td align="left" nowrap>(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['nom']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">prénom<\/span><\/td>(?:.*)<td align="left" nowrap>(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['prenom']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">nom d\'usage<\/span><\/td>(?:.*)<td align="left" nowrap>(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['nomUsage']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"(?:.*)<span class="turquoise"> date de naissance<\/span><\/td>(?:.*)-->(?:.*)<td(?: +)align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['dateNaiss']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
|
||||||
// if (preg_match('/date de naissance(.*)<td background="inter\/pix3_turquoise\.gif" align="right"/Uis', $this->body, $matches))
|
|
||||||
// die(print_r($matches));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise"> lieu de naissance<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['lieuNaiss']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">nationalité<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['natio']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">qualité<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['qualite']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right" nowrap><span class="turquoise">qualification artisanale<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['qualif']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">date d\'obtention<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['datequalif']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
|
||||||
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">prise de fonction<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['dateFctDeb']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
|
||||||
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">fin de fonction<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches))
|
|
||||||
$tabInsert['dateFctFin']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Insertion en base de données
|
|
||||||
$tabInsert['dateInsert']=date('Y-m-d H:i:s');
|
|
||||||
$id=$this->iDb->insert('jo.artisanat', $tabInsert, true);
|
|
||||||
$tabInsert['id']=$id;
|
|
||||||
foreach ($tabEtabs as $tabInsert2) {
|
|
||||||
$tabInsert2['dateInsert']=$tabInsert['dateInsert'];
|
|
||||||
$id2=$this->iDb->insert('jo.artisanat_etab', $tabInsert2, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$tabInsert['dateUpdate']=substr($tabInsert['dateInsert'],0,10);
|
|
||||||
unset($tabInsert['dateInsert']);
|
|
||||||
}
|
}
|
||||||
return $tabInsert;
|
return $tabInsert;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
public function getRemoteIdentite()
|
||||||
|
{
|
||||||
|
$url = 'http://www.cma-paris.fr/CMP/rm_recherche.php?dom=Gerer&fonction=recherche';
|
||||||
|
$page = getUrl($url, '', '', $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
||||||
|
$this->body = $page['body'];
|
||||||
|
$this->codeRetour = $page['code'];
|
||||||
|
if ($this->codeRetour != '200') {
|
||||||
|
$this->libErreur = 'Erreur Artisanat 200a !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->cookie = $page['header']['Set-Cookie'];
|
||||||
|
$this->referer = $url;
|
||||||
|
|
||||||
|
$url = 'http://www.cma-paris.fr/CMP/rm_recherche.php?dom=Gerer&fonction=cherche';
|
||||||
|
$postData = array(
|
||||||
|
'siren_op' => '%3D',
|
||||||
|
'siren' => $siren,
|
||||||
|
'den_rent_op' => '%25',
|
||||||
|
'den_rent' => '',
|
||||||
|
'adresse_op' => 'contient',
|
||||||
|
'adresse' => '',
|
||||||
|
'bde_rent_op' => '%25',
|
||||||
|
'bde_rent' => '',
|
||||||
|
'nom_rdir_op' => '%25',
|
||||||
|
'nom_rdir' => '',
|
||||||
|
'pren_rdir_op' => '%25',
|
||||||
|
'pren_rdir' => '',
|
||||||
|
'table' => 'rentreprise',//'rentrad',
|
||||||
|
'x' => 56,
|
||||||
|
'y' => 14,
|
||||||
|
);
|
||||||
|
sleep(rand(1, 2));
|
||||||
|
$page = getUrl($url, $this->cookie, $postData, $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
||||||
|
$this->body = $page['body'];
|
||||||
|
$this->codeRetour = $page['code'];
|
||||||
|
if ($this->codeRetour != '200') {
|
||||||
|
$this->libErreur = 'Erreur Artisanat 200b !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->referer = $url;
|
||||||
|
|
||||||
|
if (preg_match('/<span.class="rouge">aucune.entreprise.ne.correspond(?:.*)vos.crit(?:.*)de.recherche<\/span>/Uis', $this->body, $matches)) {
|
||||||
|
$url = 'http://www.cma-paris.fr/CMP/rm_recherche.php?dom=Gerer&fonction=cherche';
|
||||||
|
$postData = array(
|
||||||
|
'siren_op' => '%3D',
|
||||||
|
'siren' => $siren,
|
||||||
|
'den_rent_op' => '%25',
|
||||||
|
'den_rent' => '',
|
||||||
|
'adresse_op' => 'contient',
|
||||||
|
'adresse' => '',
|
||||||
|
'bde_rent_op' => '%25',
|
||||||
|
'bde_rent' => '',
|
||||||
|
'nom_rdir_op' => '%25',
|
||||||
|
'nom_rdir' => '',
|
||||||
|
'pren_rdir_op' => '%25',
|
||||||
|
'pren_rdir' => '',
|
||||||
|
'table' => 'rentrad',
|
||||||
|
'x' => 56,
|
||||||
|
'y' => 14,
|
||||||
|
);
|
||||||
|
sleep(rand(1, 2));
|
||||||
|
$page=getUrl($url, $this->cookie, $postData, $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
||||||
|
$this->body = $page['body'];
|
||||||
|
$this->codeRetour = $page['code'];
|
||||||
|
if ($this->codeRetour != '200') {
|
||||||
|
$this->libErreur='Erreur Artisanat 200c !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->referer=$url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Gestion des multi-inscriptions au RM **/
|
||||||
|
if (preg_match('/<b class="gris">(.*)entreprises.correspondent(?:.*)vos.crit(?:.*)de.recherche<\/span>/Uis', $this->body, $matches)) {
|
||||||
|
$nbRep = trim($matches[1])*1;
|
||||||
|
$iRadMax = -1;
|
||||||
|
if (preg_match_all('/<a class="turquoise" href="(rm\.php\?dom=Gerer&fonction=dossier&(.*))">/Uis', $this->body, $matches)) {
|
||||||
|
$tabUrls = array_unique($matches[1]);
|
||||||
|
$anRadMax = 0;
|
||||||
|
// Recherche de la dernière inscription
|
||||||
|
foreach ($tabUrls as $iUrl => $url) {
|
||||||
|
// On prend la dernière inscription
|
||||||
|
$tabTmp = explode('&',$url);
|
||||||
|
if (substr($tabTmp[3],0,8) == 'an_rera=') {
|
||||||
|
$anRad=substr($tabTmp[3],8);
|
||||||
|
if ($anRad > $anRadMax) {
|
||||||
|
$anRadMax = $anRad;
|
||||||
|
$iRadMax = $iUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($iRadMax==-1) die('$iRadMax==-1 Cas impossible !'.PHP_EOL.print_r($tabUrls,true).PHP_EOL.print_r($matches,true));
|
||||||
|
// Accès à la dernière fiche
|
||||||
|
$url = 'http://www.cma-paris.fr/CMP/'.strtr(trim($tabUrls[$iRadMax]),array('&'=>'&'));
|
||||||
|
sleep(rand(1, 2));
|
||||||
|
$page = getUrl($url, $this->cookie, '', $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
||||||
|
$this->body = $page['body'];
|
||||||
|
$this->codeRetour = $page['code'];
|
||||||
|
if ($this->codeRetour != '200') {
|
||||||
|
$this->libErreur = 'Erreur Artisanat 200c !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->referer = $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tabInsert = array();
|
||||||
|
|
||||||
|
if (preg_match('/n° d\'identification \(SIREN\)<\/span><\/td>(?:.*)<td align="left" nowrap>(.*) <\/td>((?:.*)n° de gestion rm<\/span><\/td>(?:.*)<td align="left" nowrap>(.*)<\/td>)?/Uis', $this->body, $matches)) {
|
||||||
|
$sirenLu = $matches[1]*1;
|
||||||
|
if ($siren == $sirenLu) {
|
||||||
|
$tabInsert['siren'] = $matches[1];
|
||||||
|
$tabInsert['numRM'] = @$matches[2];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->libErreur = 'Erreur Siren $sirenLu<>$siren !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (preg_match('/<span class="rouge">aucune entreprise ne correspond à vos critères de recherche<\/span>/Uis', $this->body, $matches)) {
|
||||||
|
$this->libErreur = 'Erreur Artisan absent de la base Artisanat !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->libErreur = 'Erreur Siren absent dans la page !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$actif = null;
|
||||||
|
if (preg_match("/Renseignements.relatif(?:.*)entreprise(.*)<\/b>/Uis", $this->body, $matches)) {
|
||||||
|
switch (trim(strtr($matches[1],array(chr(160)=>'')))) {
|
||||||
|
case 'en activité': $actif = 1; break;
|
||||||
|
case 'radiée': $actif = 0; break;
|
||||||
|
default: print_r($matches); die(); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$tabInsert['actif'] = $actif;
|
||||||
|
if ($actif === null) {
|
||||||
|
$this->libErreur = 'Erreur Actif/Radié non trouvé !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">dénomination<\/span><\/td>(?:.*)<td align="left" colspan="5">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['denomination'] = $matches[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">dénomination<\/span><\/td>(?:.*)<td align="left" colspan="5">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['denomination']=$matches[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">sigle<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['sigle']=$matches[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise"> nom commercial<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['nomCommercial']=$matches[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">enseigne<\/span><\/td>(?:.*)<td align="left" colspan="4">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['enseigne']=$matches[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">forme juridique<\/span><\/td>(?:.*)<td align="left" colspan="5">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['fj']=$matches[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">effectif<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['effectif']=$matches[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">code APRM<\/span><\/td>(?:.*)<td align="left">(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['aprm']=$matches[1];
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">début d\'activité<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['debutActivite']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise"> activité\(s\) exercée\(s\) donnant lieu à immatriculation<\/span>(?:.*)<td colspan="5">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['activite']=trim($matches[1]);
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">adresse de l\'entreprise<\/span><\/td>(?:.*)<td align="left" colspan="5">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['adresse']=trim($matches[1]);
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">code postal<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['cp']=trim($matches[1]);
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">ville<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['ville']=trim($matches[1]);
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">cessation d\'activité<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['cessation']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">radiation du RM<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['radiation']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
||||||
|
}
|
||||||
|
$tabEtabs=array();
|
||||||
|
if (preg_match('/<!--deb Etablissements secondaires-->(?:.*)<b class="gris">Aucune inscription complémentaire<\/b>(?:.*)<!--fin Etablissements secondaires-->/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['nbInscriptions']=0;
|
||||||
|
}
|
||||||
|
elseif (preg_match('/<!--deb Etablissements secondaires-->(?:.*)<b class="gris">Inscription complémentaire<\/b>(.*)<!--fin Etablissements secondaires-->/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['nbInscriptions']=0;
|
||||||
|
if (preg_match_all('/<tr>(?:.*)<td><img alt="" src="inter\/pixtrans\.gif" width="30" height="1"><\/td>(?:.*)<td nowrap>(?:.*)<!-- adresse -->(.*)<\/td>(?:.*)<td nowrap>(?:.*)<!-- code postal et ville -->(.*)<\/td>(?:.*)<td nowrap>(?:.*)<!-- enseigne -->(.*)<\/td>(?:.*)<td>(?:.*)<!-- debut activite -->(.*)<\/td>(?:.*)<td>(?:.*)<!-- fin activite -->(.*)<\/td>(?:.*)<\/tr>/Uis', $matches[1], $matches2)) {
|
||||||
|
foreach ($matches2[1] as $i=>$adresse) {
|
||||||
|
$tabEtabs[$i]['siren'] = $siren;
|
||||||
|
$tabEtabs[$i]['num'] = $i;
|
||||||
|
$tabEtabs[$i]['adresse'] = trim(strtr(html_entity_decode($adresse),chr(160),' '));
|
||||||
|
$tabEtabs[$i]['cpVille'] = trim(strtr(html_entity_decode($matches2[2][$i]),chr(160),' '));
|
||||||
|
$tabEtabs[$i]['enseigne']= trim(strtr(html_entity_decode($matches2[3][$i]),chr(160),' '));
|
||||||
|
$tabEtabs[$i]['actDeb'] = Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches2[4][$i]),chr(160),' ')));
|
||||||
|
$tabEtabs[$i]['actFin'] = Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches2[5][$i]),chr(160),' ')));
|
||||||
|
$tabInsert['nbInscriptions']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Informations sur la Personne Physique **/
|
||||||
|
if (preg_match('/<a class="turquoise" href="(rm\.php\?dom=Gerer&fonction=dirigeant&dept_re(.*))" onclick="window\.open\(this\.href/Uis', $this->body, $matches)) {
|
||||||
|
$urlDir='http://www.cma-paris.fr/CMP/'.strtr(trim($matches[1]),array('&'=>'&'));
|
||||||
|
//die($urlDir);
|
||||||
|
sleep(rand(1, 2));
|
||||||
|
$page = getUrl($urlDir, $this->cookie, '', $this->referer, false, 'www.cma-paris.fr', false, '', '', 21);
|
||||||
|
$this->body = $page['body'];
|
||||||
|
$this->codeRetour = $page['code'];
|
||||||
|
if ($this->codeRetour != '200') {
|
||||||
|
$this->libErreur = 'Erreur Artisanat 200d !';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$this->referer = $url;
|
||||||
|
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">nom<\/span><\/td>(?:.*)<td align="left" nowrap>(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['nom']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">prénom<\/span><\/td>(?:.*)<td align="left" nowrap>(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['prenom']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">nom d\'usage<\/span><\/td>(?:.*)<td align="left" nowrap>(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['nomUsage']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"(?:.*)<span class="turquoise"> date de naissance<\/span><\/td>(?:.*)-->(?:.*)<td(?: +)align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['dateNaiss']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise"> lieu de naissance<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['lieuNaiss']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">nationalité<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['natio']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">qualité<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['qualite']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right" nowrap><span class="turquoise">qualification artisanale<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['qualif']=trim(strtr(html_entity_decode($matches[1]),chr(160),' '));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">date d\'obtention<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['datequalif']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">prise de fonction<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['dateFctDeb']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
||||||
|
}
|
||||||
|
if (preg_match('/<td background="inter\/pix3_turquoise\.gif" align="right"><span class="turquoise">fin de fonction<\/span><\/td>(?:.*)<td align="left">(.*)<\/td>/Uis', $this->body, $matches)) {
|
||||||
|
$tabInsert['dateFctFin']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim(strtr(html_entity_decode($matches[1]),chr(160),' ')));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Insertion en base de données
|
||||||
|
$tabInsert['dateInsert'] = date('Y-m-d H:i:s');
|
||||||
|
$id = $this->iDb->insert('jo.artisanat', $tabInsert, true);
|
||||||
|
$tabInsert['id'] = $id;
|
||||||
|
foreach ($tabEtabs as $tabInsert2) {
|
||||||
|
$tabInsert2['dateInsert'] = $tabInsert['dateInsert'];
|
||||||
|
$id2 = $this->iDb->insert('jo.artisanat_etab', $tabInsert2, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$tabInsert['dateUpdate'] = substr($tabInsert['dateInsert'],0,10);
|
||||||
|
unset($tabInsert['dateInsert']);
|
||||||
|
|
||||||
|
return $tabInsert;
|
||||||
|
}
|
||||||
|
}
|
@ -4,162 +4,162 @@ class Metier_Partenaires_MBilansInput
|
|||||||
public $CtrlEcartMax = 10;
|
public $CtrlEcartMax = 10;
|
||||||
|
|
||||||
public $Ctrl = array (
|
public $Ctrl = array (
|
||||||
// --- Bilan Simplifié
|
// --- Bilan Simplifié
|
||||||
'S' => array(
|
'S' => array(
|
||||||
// Actif Simplifié
|
// Actif Simplifié
|
||||||
'010-012=013'=>'Fonds commercial (Brut,Amor/Prov et Net incohérents)',
|
'010-012=013'=>'Fonds commercial (Brut,Amor/Prov et Net incohérents)',
|
||||||
'014-016=017'=>'Immos incorpo. autres (Brut,Amor/Prov et Net incohérents)',
|
'014-016=017'=>'Immos incorpo. autres (Brut,Amor/Prov et Net incohérents)',
|
||||||
'028-030=031'=>'Immos corpo. (Brut,Amor/Prov et Net incohérents)',
|
'028-030=031'=>'Immos corpo. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'040-042=043'=>'Immos finan. (Brut,Amor/Prov et Net incohérents)',
|
'040-042=043'=>'Immos finan. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'044-048=049'=>'Total (I) Actif Immos (Brut,Amor/Prov et Net incohérents)',
|
'044-048=049'=>'Total (I) Actif Immos (Brut,Amor/Prov et Net incohérents)',
|
||||||
'010+014+028+040=044'=>'Total Actif immobilisé Brut',
|
'010+014+028+040=044'=>'Total Actif immobilisé Brut',
|
||||||
'012+016+030+042=048'=>'Total Actif immobilisé Amor/Prov',
|
'012+016+030+042=048'=>'Total Actif immobilisé Amor/Prov',
|
||||||
'013+017+031+043=049'=>'Total Actif immobilisé Net',
|
'013+017+031+043=049'=>'Total Actif immobilisé Net',
|
||||||
'050-052=053'=>'Stocks MP (Brut,Amor/Prov et Net incohérents)',
|
'050-052=053'=>'Stocks MP (Brut,Amor/Prov et Net incohérents)',
|
||||||
'060-062=063'=>'Stocks Marchandises (Brut,Amor/Prov et Net incohérents)',
|
'060-062=063'=>'Stocks Marchandises (Brut,Amor/Prov et Net incohérents)',
|
||||||
'064-066=067'=>'Avances et acomptes/cmds (Brut,Amor/Prov et Net incohérents)',
|
'064-066=067'=>'Avances et acomptes/cmds (Brut,Amor/Prov et Net incohérents)',
|
||||||
'068-070=071'=>'Créances clients et CR (Brut,Amor/Prov et Net incohérents)',
|
'068-070=071'=>'Créances clients et CR (Brut,Amor/Prov et Net incohérents)',
|
||||||
'072-074=075'=>'Autres créances (Brut,Amor/Prov et Net incohérents)',
|
'072-074=075'=>'Autres créances (Brut,Amor/Prov et Net incohérents)',
|
||||||
'080-082=083'=>'VMP (Brut,Amor/Prov et Net incohérents)',
|
'080-082=083'=>'VMP (Brut,Amor/Prov et Net incohérents)',
|
||||||
'084-086=087'=>'Disponibilités (Brut,Amor/Prov et Net incohérents)',
|
'084-086=087'=>'Disponibilités (Brut,Amor/Prov et Net incohérents)',
|
||||||
'088-090=091'=>' (Brut,Amor/Prov et Net incohérents)',
|
'088-090=091'=>' (Brut,Amor/Prov et Net incohérents)',
|
||||||
'092-094=095'=>'Ch. constatées d\'avance (Brut,Amor/Prov et Net incohérents)',
|
'092-094=095'=>'Ch. constatées d\'avance (Brut,Amor/Prov et Net incohérents)',
|
||||||
'096-098=099'=>'Total (II) Actif Circulant (Brut,Amor/Prov et Net incohérents)',
|
'096-098=099'=>'Total (II) Actif Circulant (Brut,Amor/Prov et Net incohérents)',
|
||||||
'110-112=113'=>'Total ACTIF (Brut,Amor/Prov et Net incohérents)',
|
'110-112=113'=>'Total ACTIF (Brut,Amor/Prov et Net incohérents)',
|
||||||
'050+060+064+068+072+080+084+088+092=096'=>'Total Actif circulant Brut',
|
'050+060+064+068+072+080+084+088+092=096'=>'Total Actif circulant Brut',
|
||||||
'052+062+066+070+074+082+086+090+094=098'=>'Total Actif circulant Amor/Prov',
|
'052+062+066+070+074+082+086+090+094=098'=>'Total Actif circulant Amor/Prov',
|
||||||
'053+063+067+071+075+083+087+091+092=099'=>'Total Actif circulant Net',
|
'053+063+067+071+075+083+087+091+092=099'=>'Total Actif circulant Net',
|
||||||
'044+096=110'=>'Total ACTIF Brut',
|
'044+096=110'=>'Total ACTIF Brut',
|
||||||
'048+098=112'=>'Total ACTIF Amor/Prov',
|
'048+098=112'=>'Total ACTIF Amor/Prov',
|
||||||
'049+099=113'=>'Total ACTIF Net',
|
'049+099=113'=>'Total ACTIF Net',
|
||||||
// Passif Simplifié
|
// Passif Simplifié
|
||||||
'120+124+126+130+132+134+136+140=142'=>'Total Capitaux Propres',
|
'120+124+126+130+132+134+136+140=142'=>'Total Capitaux Propres',
|
||||||
'156+164+166+172+174=176'=>'Total Dettes',
|
'156+164+166+172+174=176'=>'Total Dettes',
|
||||||
'142+154+176=180'=>'Total Passif',
|
'142+154+176=180'=>'Total Passif',
|
||||||
'113=180'=>'Actif=Passif',
|
'113=180'=>'Actif=Passif',
|
||||||
// CDR Simplifié
|
// CDR Simplifié
|
||||||
'210+214+218+222+224+226+230=232'=>'Total des produits d\'exploitation',
|
'210+214+218+222+224+226+230=232'=>'Total des produits d\'exploitation',
|
||||||
'234+236+238+240+242+244+250+252+254+256+262=264'=>'Total des charges d\'exploitation',
|
'234+236+238+240+242+244+250+252+254+256+262=264'=>'Total des charges d\'exploitation',
|
||||||
'210+214+218+222+224+226+230=232'=>'Total des produits d\'exploitation',
|
'210+214+218+222+224+226+230=232'=>'Total des produits d\'exploitation',
|
||||||
'232-264=270'=>'Résultat d\'exploitation',
|
'232-264=270'=>'Résultat d\'exploitation',
|
||||||
'232+280+290-264-294-300-306=310'=>'Résultat d\'exploitation',
|
'232+280+290-264-294-300-306=310'=>'Résultat d\'exploitation',
|
||||||
),
|
),
|
||||||
// --- Bilan Réel Normal
|
// --- Bilan Réel Normal
|
||||||
'N' => array(
|
'N' => array(
|
||||||
// Actif immobilisé
|
// Actif immobilisé
|
||||||
'AA=AA2'=>'Capital souscrit non appelé',
|
'AA=AA2'=>'Capital souscrit non appelé',
|
||||||
'AB-AC=AC1'=>'Frais d\'étab. (Brut,Amor/Prov et Net incohérents)',
|
'AB-AC=AC1'=>'Frais d\'étab. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AD-AE=AE1'=>'Frais de R&D (Brut,Amor/Prov et Net incohérents)',
|
'AD-AE=AE1'=>'Frais de R&D (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AF-AG=AG1'=>'Brevets (Brut,Amor/Prov et Net incohérents)',
|
'AF-AG=AG1'=>'Brevets (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AH-AI=AI1'=>'Fonds commercial (Brut,Amor/Prov et Net incohérents)',
|
'AH-AI=AI1'=>'Fonds commercial (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AJ-AK=AK1'=>'Autres immo inc. (Brut,Amor/Prov et Net incohérents)',
|
'AJ-AK=AK1'=>'Autres immo inc. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AL-AM=AM1'=>'Acomptes immo inc. (Brut,Amor/Prov et Net incohérents)',
|
'AL-AM=AM1'=>'Acomptes immo inc. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AN-AO=AO1'=>'Terrains (Brut,Amor/Prov et Net incohérents)',
|
'AN-AO=AO1'=>'Terrains (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AP-AQ=AQ1'=>'Constructions (Brut,Amor/Prov et Net incohérents)',
|
'AP-AQ=AQ1'=>'Constructions (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AR-AS=AS1'=>'Installations (Brut,Amor/Prov et Net incohérents)',
|
'AR-AS=AS1'=>'Installations (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AT-AU=AU1'=>'Autres immo corp. (Brut,Amor/Prov et Net incohérents)',
|
'AT-AU=AU1'=>'Autres immo corp. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AV-AW=AW1'=>'Immos en cours (Brut,Amor/Prov et Net incohérents)',
|
'AV-AW=AW1'=>'Immos en cours (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AX-AY=AY1'=>'Acomptes immo corp. (Brut,Amor/Prov et Net incohérents)',
|
'AX-AY=AY1'=>'Acomptes immo corp. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'CS-CT=CT1'=>'Immo Fi participations/équiv. (Brut,Amor/Prov et Net incohérents)',
|
'CS-CT=CT1'=>'Immo Fi participations/équiv. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'CU-CV=CV1'=>'Autres participations (Brut,Amor/Prov et Net incohérents)',
|
'CU-CV=CV1'=>'Autres participations (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BB-BC=BC1'=>'Créances rattachées à des particip. (Brut,Amor/Prov et Net incohérents)',
|
'BB-BC=BC1'=>'Créances rattachées à des particip. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BD-BE=BE1'=>'Autres titres immo. (Brut,Amor/Prov et Net incohérents)',
|
'BD-BE=BE1'=>'Autres titres immo. (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BF-BG=BG1'=>'Prêts (Brut,Amor/Prov et Net incohérents)',
|
'BF-BG=BG1'=>'Prêts (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BH-BI=BI1'=>'Autres Immo Financières (Brut,Amor/Prov et Net incohérents)',
|
'BH-BI=BI1'=>'Autres Immo Financières (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BJ-BK=BK1'=>'Total de l\'Actif Immobilisé (Brut,Amor/Prov et Net incohérents)',
|
'BJ-BK=BK1'=>'Total de l\'Actif Immobilisé (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AB+AD+AF+AH+AJ+AL+AN+AP+AR+AT+AV+AX+CS+CU+BB+BD+BF+BH=BJ'=>'Total des Immobilisations (Brut)',
|
'AB+AD+AF+AH+AJ+AL+AN+AP+AR+AT+AV+AX+CS+CU+BB+BD+BF+BH=BJ'=>'Total des Immobilisations (Brut)',
|
||||||
'AC+AE+AG+AI+AK+AM+AO+AQ+AS+AU+AW+AY+CT+CV+BC+BE+BG+BI=BK'=>'Total des Immobilisations (Amor.)',
|
'AC+AE+AG+AI+AK+AM+AO+AQ+AS+AU+AW+AY+CT+CV+BC+BE+BG+BI=BK'=>'Total des Immobilisations (Amor.)',
|
||||||
'AC1+AE1+AG1+AI1+AK1+AM1+AO1+AQ1+AS1+AU1+AW1+AY1+CT1+CV1+BC1+BE1+BG1+BI1=BK1'=>'Total des Immobilisations (Net)',
|
'AC1+AE1+AG1+AI1+AK1+AM1+AO1+AQ1+AS1+AU1+AW1+AY1+CT1+CV1+BC1+BE1+BG1+BI1=BK1'=>'Total des Immobilisations (Net)',
|
||||||
// Actif circulant
|
// Actif circulant
|
||||||
'BL-BM=BM1'=>'Stocks de MP (Brut,Amor/Prov et Net incohérents)',
|
'BL-BM=BM1'=>'Stocks de MP (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BN-BO=BO1'=>'Stocks en cours de prod. biens (Brut,Amor/Prov et Net incohérents)',
|
'BN-BO=BO1'=>'Stocks en cours de prod. biens (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BP-BQ=BQ1'=>'Stocks en cours de prod. services (Brut,Amor/Prov et Net incohérents)',
|
'BP-BQ=BQ1'=>'Stocks en cours de prod. services (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BR-BS=BS1'=>'Stocks produits finis (Brut,Amor/Prov et Net incohérents)',
|
'BR-BS=BS1'=>'Stocks produits finis (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BT-BU=BU1'=>'Stocks de marchandises (Brut,Amor/Prov et Net incohérents)',
|
'BT-BU=BU1'=>'Stocks de marchandises (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BV-BW=BW1'=>'Avances et acomptes/cmds (Brut,Amor/Prov et Net incohérents)',
|
'BV-BW=BW1'=>'Avances et acomptes/cmds (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BX-BY=BY1'=>'Créances clients (Brut,Amor/Prov et Net incohérents)',
|
'BX-BY=BY1'=>'Créances clients (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BZ-CA=CA1'=>'Autres créances (Brut,Amor/Prov et Net incohérents)',
|
'BZ-CA=CA1'=>'Autres créances (Brut,Amor/Prov et Net incohérents)',
|
||||||
'CB-CC=CC1'=>'Capital souscrit appelé non versé (Brut,Amor/Prov et Net incohérents)',
|
'CB-CC=CC1'=>'Capital souscrit appelé non versé (Brut,Amor/Prov et Net incohérents)',
|
||||||
'CD-CE=CE1'=>'VMP (Brut,Amor/Prov et Net incohérents)',
|
'CD-CE=CE1'=>'VMP (Brut,Amor/Prov et Net incohérents)',
|
||||||
'CF-CG=CG1'=>'Disponibilités (Brut,Amor/Prov et Net incohérents)',
|
'CF-CG=CG1'=>'Disponibilités (Brut,Amor/Prov et Net incohérents)',
|
||||||
'CH-CI=CI1'=>'Charges Const. d\'avance(Brut,Amor/Prov et Net incohérents)',
|
'CH-CI=CI1'=>'Charges Const. d\'avance(Brut,Amor/Prov et Net incohérents)',
|
||||||
'CJ-CK=CK1'=>'Total de l\'Actif Circulant (Brut,Amor/Prov et Net incohérents)',
|
'CJ-CK=CK1'=>'Total de l\'Actif Circulant (Brut,Amor/Prov et Net incohérents)',
|
||||||
'BL+BN+BP+BR+BT+BV+BX+BZ+CB+CD+CF+CH=CJ'=>'Total l\'Actif Circulant (Brut)',
|
'BL+BN+BP+BR+BT+BV+BX+BZ+CB+CD+CF+CH=CJ'=>'Total l\'Actif Circulant (Brut)',
|
||||||
'BM+BO+BQ+BS+BU+BW+BY+CA+CC+CE+CG+CI=CK'=>'Total l\'Actif Circulant (Amor.)',
|
'BM+BO+BQ+BS+BU+BW+BY+CA+CC+CE+CG+CI=CK'=>'Total l\'Actif Circulant (Amor.)',
|
||||||
'BM1+BO1+BQ1+BS1+BU1+BW1+BY1+CA1+CC1+CE1+CG1+CI1=CK1'=>'Total l\'Actif Circulant (Net)',
|
'BM1+BO1+BQ1+BS1+BU1+BW1+BY1+CA1+CC1+CE1+CG1+CI1=CK1'=>'Total l\'Actif Circulant (Net)',
|
||||||
'CL=CL2'=>'Charges / plus. ex. (Brut<>Net)',
|
'CL=CL2'=>'Charges / plus. ex. (Brut<>Net)',
|
||||||
'CM=CM2'=>'Primes de Rbt obligations (Brut<>Net)',
|
'CM=CM2'=>'Primes de Rbt obligations (Brut<>Net)',
|
||||||
'CN=CN2'=>'Ecarts de conversion d\'actif (Brut<>Net)',
|
'CN=CN2'=>'Ecarts de conversion d\'actif (Brut<>Net)',
|
||||||
'CO-1A=1A1'=>'Total Actif (Brut,Amor/Prov et Net incohérents)',
|
'CO-1A=1A1'=>'Total Actif (Brut,Amor/Prov et Net incohérents)',
|
||||||
'AA+BJ+CJ+CL+CM+CN=CO'=>'Total Actif Brut',
|
'AA+BJ+CJ+CL+CM+CN=CO'=>'Total Actif Brut',
|
||||||
'BK+CK=1A'=>'Total Actif (Amor.)',
|
'BK+CK=1A'=>'Total Actif (Amor.)',
|
||||||
'AA2+BK1+CK1+CL2+CM2+CN2=1A1'=>'Total Actif Net',
|
'AA2+BK1+CK1+CL2+CM2+CN2=1A1'=>'Total Actif Net',
|
||||||
// PASSIF
|
// PASSIF
|
||||||
'DA+DB+DC+DD+DE+DF+DG+DH+DI+DJ+DK=DL'=>'Passif : s/total I (Capitaux Propres)',
|
'DA+DB+DC+DD+DE+DF+DG+DH+DI+DJ+DK=DL'=>'Passif : s/total I (Capitaux Propres)',
|
||||||
'DM+DN=DO'=>'Passif : s/total II (Autres fonds propres)',
|
'DM+DN=DO'=>'Passif : s/total II (Autres fonds propres)',
|
||||||
'DP+DQ=DR'=>'Passif : s/total III (Provisions)',
|
'DP+DQ=DR'=>'Passif : s/total III (Provisions)',
|
||||||
'DS+DT+DU+DV+DW+DX+DY+DZ+EA+EB=EC'=>'Passif : s/total IV (Dettes+Cpt régul. PCA)',
|
'DS+DT+DU+DV+DW+DX+DY+DZ+EA+EB=EC'=>'Passif : s/total IV (Dettes+Cpt régul. PCA)',
|
||||||
'DL+DO+DR+EC+ED=EE'=>'Total Passif',
|
'DL+DO+DR+EC+ED=EE'=>'Total Passif',
|
||||||
'EE=1A1'=>'Total Actif=Total Passif',
|
'EE=1A1'=>'Total Actif=Total Passif',
|
||||||
// CDR
|
// CDR
|
||||||
'FA+FB=FC'=>'Total Ventes de marchandises',
|
'FA+FB=FC'=>'Total Ventes de marchandises',
|
||||||
'FD+FE=FF'=>'Total Production vendue de biens',
|
'FD+FE=FF'=>'Total Production vendue de biens',
|
||||||
'FG+FH=FI'=>'Total Production vendue de services',
|
'FG+FH=FI'=>'Total Production vendue de services',
|
||||||
'FJ+FK=FL'=>'Total Chiffe d\'Affaires France+Export',
|
'FJ+FK=FL'=>'Total Chiffe d\'Affaires France+Export',
|
||||||
'FA+FD+FG=FJ'=>'Total C.A. France',
|
'FA+FD+FG=FJ'=>'Total C.A. France',
|
||||||
'FB+FE+FH=FK'=>'Total C.A. Export',
|
'FB+FE+FH=FK'=>'Total C.A. Export',
|
||||||
'FC+FF+FI=FL'=>'Total C.A. Total (Vtes+Biens+Services)',
|
'FC+FF+FI=FL'=>'Total C.A. Total (Vtes+Biens+Services)',
|
||||||
'FL+FM+FN+FO+FP+FQ=FR'=>'Total I : Produits d\'Exploitation',
|
'FL+FM+FN+FO+FP+FQ=FR'=>'Total I : Produits d\'Exploitation',
|
||||||
'FS+FT+FU+FV+FW+FX+FY+FZ+GA+GB+GC+GD+GE=GF'=>'Total II :Charges d\'Exploitation',
|
'FS+FT+FU+FV+FW+FX+FY+FZ+GA+GB+GC+GD+GE=GF'=>'Total II :Charges d\'Exploitation',
|
||||||
'FR-GF=GG'=>'1 - Résultat d\'Exploitation',
|
'FR-GF=GG'=>'1 - Résultat d\'Exploitation',
|
||||||
'GJ+GK+GL+GM+GN+GO=GP'=>'Total V : Produits Financiers',
|
'GJ+GK+GL+GM+GN+GO=GP'=>'Total V : Produits Financiers',
|
||||||
'GQ+GR+GS+GT=GU'=>'Total VI : Charges Financières',
|
'GQ+GR+GS+GT=GU'=>'Total VI : Charges Financières',
|
||||||
'GP-GU=GV'=>'2 - Résultat Financier',
|
'GP-GU=GV'=>'2 - Résultat Financier',
|
||||||
'GG+GH-GI+GV=GW'=>'3 - R.C.A.I.',
|
'GG+GH-GI+GV=GW'=>'3 - R.C.A.I.',
|
||||||
'HA+HB+HC=HD'=>'Total VII : Produits Exceptionnels',
|
'HA+HB+HC=HD'=>'Total VII : Produits Exceptionnels',
|
||||||
'HE+HF+HG=HH'=>'Total VIII : Charges Exceptionnels',
|
'HE+HF+HG=HH'=>'Total VIII : Charges Exceptionnels',
|
||||||
'HD-HH=HI'=>'4 - Résultat Exceptionnel',
|
'HD-HH=HI'=>'4 - Résultat Exceptionnel',
|
||||||
'FR+GH+GP+HD=HL'=>'CDR : Total des Produits',
|
'FR+GH+GP+HD=HL'=>'CDR : Total des Produits',
|
||||||
'GF+GI+GU+HH+HJ+HK=HM'=>'CDR : Total des Charges',
|
'GF+GI+GU+HH+HJ+HK=HM'=>'CDR : Total des Charges',
|
||||||
'HL-HM=HN'=>'5 - Résultat de l\'exercice',
|
'HL-HM=HN'=>'5 - Résultat de l\'exercice',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
public $LibCodeCtrl = array(
|
public $LibCodeCtrl = array(
|
||||||
'_0' => '-',
|
'_0' => '-',
|
||||||
'_1' => 'Corrigé',
|
'_1' => 'Corrigé',
|
||||||
'_3' => 'Capital',
|
'_3' => 'Capital',
|
||||||
'_5' => 'Calculs', // Anciennement 2 mais maintenant >=5 correspond à une erreur grave
|
'_5' => 'Calculs', // Anciennement 2 mais maintenant >=5 correspond à une erreur grave
|
||||||
'_7' => 'Effectif',
|
'_7' => 'Effectif',
|
||||||
'_9' => 'Unité',
|
'_9' => 'Unité',
|
||||||
);
|
);
|
||||||
|
|
||||||
public $LibCodeSaisie = array(
|
public $LibCodeSaisie = array(
|
||||||
// Code Saisie Bilans par Infogreffe
|
// Code Saisie Bilans par Infogreffe
|
||||||
'_00' => 'Bilan saisi sans anomalie',
|
'_00' => 'Bilan saisi sans anomalie',
|
||||||
'_01' => 'Bilan saisi avec des incohérences comptables à la source du document (issues du remettant)',
|
'_01' => 'Bilan saisi avec des incohérences comptables à la source du document (issues du remettant)',
|
||||||
'_02' => 'Bilan avec Actif, Passif ou Compte de Résultat nul',
|
'_02' => 'Bilan avec Actif, Passif ou Compte de Résultat nul',
|
||||||
'_03' => 'Bilan incomplet (des pages manquent)',
|
'_03' => 'Bilan incomplet (des pages manquent)',
|
||||||
'_04' => 'Bilan complet non détaillé (seuls les totaux et sous totaux sont renseignés)',
|
'_04' => 'Bilan complet non détaillé (seuls les totaux et sous totaux sont renseignés)',
|
||||||
'_05' => 'Bilan reçu en double exemplaire',
|
'_05' => 'Bilan reçu en double exemplaire',
|
||||||
'_06' => 'Bilan intermédiaire - Situation provisoire',
|
'_06' => 'Bilan intermédiaire - Situation provisoire',
|
||||||
'_07' => 'Bilan illisible',
|
'_07' => 'Bilan illisible',
|
||||||
'_A7' => 'Bilan illisible, présentant un cadre gris très foncés (dans lesquels sont inscrits en général les totaux)',
|
'_A7' => 'Bilan illisible, présentant un cadre gris très foncés (dans lesquels sont inscrits en général les totaux)',
|
||||||
'_B7' => 'Bilan manuscrits',
|
'_B7' => 'Bilan manuscrits',
|
||||||
'_C7' => 'Bilan illisible, présentant des caractères trop gras',
|
'_C7' => 'Bilan illisible, présentant des caractères trop gras',
|
||||||
'_D7' => 'Bilan scanné en biais ou qui présentent des pages rognées',
|
'_D7' => 'Bilan scanné en biais ou qui présentent des pages rognées',
|
||||||
'_E7' => 'Bilan numérisés trop clairement (comme une imprimante dont la cartouche est presque vide)',
|
'_E7' => 'Bilan numérisés trop clairement (comme une imprimante dont la cartouche est presque vide)',
|
||||||
'_F7' => 'Bilan illisible',
|
'_F7' => 'Bilan illisible',
|
||||||
'_08' => 'Bilan consolidé',
|
'_08' => 'Bilan consolidé',
|
||||||
'_09' => 'Déclaration d\'impôts',
|
'_09' => 'Déclaration d\'impôts',
|
||||||
'_10' => 'Document autre que bilan',
|
'_10' => 'Document autre que bilan',
|
||||||
'_11' => 'Bilan de clôture de liquidation',
|
'_11' => 'Bilan de clôture de liquidation',
|
||||||
'_12' => 'Bilan de Société financière',
|
'_12' => 'Bilan de Société financière',
|
||||||
'_13' => 'Bilan de Société d\'assurance',
|
'_13' => 'Bilan de Société d\'assurance',
|
||||||
'_14' => 'Bilan de Société immobilière',
|
'_14' => 'Bilan de Société immobilière',
|
||||||
'_15' => 'Bilan de Société étrangère',
|
'_15' => 'Bilan de Société étrangère',
|
||||||
// Codes saisie de Bilans spécifique às S&D
|
// Codes saisie de Bilans spécifique às S&D
|
||||||
'_70' => 'Document relatif à une autre société',
|
'_70' => 'Document relatif à une autre société',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,10 +8,10 @@ class Metier_Partenaires_MCadastre
|
|||||||
protected $siren = null;
|
protected $siren = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database
|
* PDO Connection with Doctrine
|
||||||
* @var Metier_Util_Db
|
* @var \Doctrine\DBAL\Connection
|
||||||
*/
|
*/
|
||||||
protected $iDb;
|
protected $conn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Droits des locaux
|
* Droits des locaux
|
||||||
@ -160,19 +160,22 @@ class Metier_Partenaires_MCadastre
|
|||||||
'VI' => 'Vignes',
|
'VI' => 'Vignes',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cadastre
|
* Cadastre
|
||||||
* @param string $siren
|
* @param \Doctrine\DBAL\Connection $conn
|
||||||
* @param Metier_Util_Db $db
|
*/
|
||||||
*/
|
public function __construct($conn = null)
|
||||||
public function __construct($siren = null, $db = null)
|
|
||||||
{
|
{
|
||||||
$this->siren = $siren;
|
$this->conn = Zend_Registry::get('doctrine');
|
||||||
if ( $db === null ) {
|
}
|
||||||
$this->iDb = new Metier_Util_Db();
|
|
||||||
} else {
|
/**
|
||||||
$this->iDb = $db;
|
* Identifiant
|
||||||
}
|
* @param string $companyId
|
||||||
|
*/
|
||||||
|
public function setId($companyId)
|
||||||
|
{
|
||||||
|
$this->siren = $companyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -230,15 +233,14 @@ class Metier_Partenaires_MCadastre
|
|||||||
$siren = $this->siren;
|
$siren = $this->siren;
|
||||||
}
|
}
|
||||||
|
|
||||||
$results = $this->iDb->select(
|
$sql = "SELECT e.INTCIF, e.DNUPER, e.CCOGRM, e.DDENPM, e.DSIPMO, e.DFORME, e.DSIREN, e.DLIGN3, e.DLIGN4, e.DLIGN5, e.DLIGN6, e.CCODEP, e.CCOCOM AS companyCCOCOM,
|
||||||
'sdv1.cad_perloc l, sdv1.cad_permor e',
|
l.CCODRO, l.CCOCOM, l.CCOPRF, l.CCOSEC, l.DNUPLA, l.DNUBAT, l.DESC, l.DNIV, l.DPOR, l.CCONLC, l.CCOAFF0, l.DSUPOD0, l.CCOAFF1, l.DSUPOD1, l.CCOAFF2, l.DSUPOD2, l.CCOAFF3, l.DSUPOD3, l.CCOAFF4, l.DSUPOD4, l.CCOAFF5, l.DSUPOD5, l.CCOAFF6, l.DSUPOD6, l.CCOAFF7, l.DSUPOD7, l.CCOAFF8, l.DSUPOD8, l.CCOAFF9, l.DSUPOD9, l.CCODEP, l.DLICOM, l.CCORIV, l.CNAVOI, l.DLIVOI, l.DNUVOI, l.DLTNUV
|
||||||
'e.INTCIF, e.DNUPER, e.CCOGRM, e.DDENPM, e.DSIPMO, e.DFORME, e.DSIREN, e.DLIGN3, e.DLIGN4, e.DLIGN5, e.DLIGN6, e.CCODEP, e.CCOCOM AS companyCCOCOM,
|
FROM sdv1.cad_perloc l, sdv1.cad_permor e WHERE e.DSIREN='$siren' AND e.INTCIF=l.INTCIF AND e.DNUPER=l.DNUPER";
|
||||||
l.CCODRO, l.CCOCOM, l.CCOPRF, l.CCOSEC, l.DNUPLA, l.DNUBAT, l.DESC, l.DNIV, l.DPOR, l.CCONLC, l.CCOAFF0, l.DSUPOD0, l.CCOAFF1, l.DSUPOD1, l.CCOAFF2, l.DSUPOD2, l.CCOAFF3, l.DSUPOD3, l.CCOAFF4, l.DSUPOD4, l.CCOAFF5, l.DSUPOD5, l.CCOAFF6, l.DSUPOD6, l.CCOAFF7, l.DSUPOD7, l.CCOAFF8, l.DSUPOD8, l.CCOAFF9, l.DSUPOD9, l.CCODEP, l.DLICOM, l.CCORIV, l.CNAVOI, l.DLIVOI, l.DNUVOI, l.DLTNUV',
|
$stmt = $this->conn->executeQuery($sql);
|
||||||
"e.DSIREN='$siren' AND e.INTCIF=l.INTCIF AND e.DNUPER=l.DNUPER", false, MYSQL_ASSOC);
|
|
||||||
|
|
||||||
$locaux = array();
|
$locaux = array();
|
||||||
if (count($results) > 0) {
|
if ($stmt->rowCount() > 0) {
|
||||||
foreach ($results as $i => $loc) {
|
while($loc = $stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||||
$format = array(
|
$format = array(
|
||||||
'idCentre' => $loc['INTCIF'],
|
'idCentre' => $loc['INTCIF'],
|
||||||
'idPmMajic' => $loc['DNUPER'],
|
'idPmMajic' => $loc['DNUPER'],
|
||||||
@ -306,15 +308,15 @@ class Metier_Partenaires_MCadastre
|
|||||||
$siren = $this->siren;
|
$siren = $this->siren;
|
||||||
};
|
};
|
||||||
|
|
||||||
$results = $this->iDb->select(
|
$sql = "SELECT e.INTCIF, e.DNUPER, e.CCOGRM, e.DDENPM, e.DSIPMO, e.DFORME, e.DSIREN, e.DLIGN3, e.DLIGN4, e.DLIGN5, e.DLIGN6, e.CCODEP, e.CCOCOM AS companyCCOCOM,
|
||||||
'sdv1.cad_perpar p, sdv1.cad_permor e',
|
p.CCODRO, p.CCOCOM, p.CCOPRF, p.CCOSEC, p.DNUPLA, p.DCNPAR, p.DSGRPF0, p.DCNSUF0, p.DSGRPF1, p.DCNSUF1, p.DSGRPF2, p.DCNSUF2, p.DSGRPF3, p.DCNSUF3, p.DSGRPF4, p.DCNSUF4, p.DSGRPF5, p.DCNSUF5, p.DSGRPF6, p.DCNSUF6, p.DSGRPF7, p.DCNSUF7, p.DSGRPF8, p.DCNSUF8, p.DSGRPF9, p.DCNSUF9, p.CCODEP, p.DLICOM, p.CCORIV, p.CNAVOI, p.DLIVOI, p.DNUVOI, p.DLTNUV
|
||||||
'e.INTCIF, e.DNUPER, e.CCOGRM, e.DDENPM, e.DSIPMO, e.DFORME, e.DSIREN, e.DLIGN3, e.DLIGN4, e.DLIGN5, e.DLIGN6, e.CCODEP, e.CCOCOM AS companyCCOCOM,
|
FROM sdv1.cad_perpar p, sdv1.cad_permor e
|
||||||
p.CCODRO, p.CCOCOM, p.CCOPRF, p.CCOSEC, p.DNUPLA, p.DCNPAR, p.DSGRPF0, p.DCNSUF0, p.DSGRPF1, p.DCNSUF1, p.DSGRPF2, p.DCNSUF2, p.DSGRPF3, p.DCNSUF3, p.DSGRPF4, p.DCNSUF4, p.DSGRPF5, p.DCNSUF5, p.DSGRPF6, p.DCNSUF6, p.DSGRPF7, p.DCNSUF7, p.DSGRPF8, p.DCNSUF8, p.DSGRPF9, p.DCNSUF9, p.CCODEP, p.DLICOM, p.CCORIV, p.CNAVOI, p.DLIVOI, p.DNUVOI, p.DLTNUV',
|
WHERE e.DSIREN='$siren' AND e.INTCIF=p.INTCIF AND e.DNUPER=p.DNUPER";
|
||||||
"e.DSIREN='$siren' AND e.INTCIF=p.INTCIF AND e.DNUPER=p.DNUPER", false, MYSQL_ASSOC);
|
$stmt = $this->conn->executeQuery($sql);
|
||||||
|
|
||||||
$parcelles = array();
|
$parcelles = array();
|
||||||
if (count($results) > 0) {
|
if ($stmt->rowCount() > 0) {
|
||||||
foreach ($results as $i => $loc) {
|
while($loc = $stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||||
$format = array(
|
$format = array(
|
||||||
'idCentre' => $loc['INTCIF'],
|
'idCentre' => $loc['INTCIF'],
|
||||||
'idPmMajic' => $loc['DNUPER'],
|
'idPmMajic' => $loc['DNUPER'],
|
||||||
@ -368,6 +370,41 @@ class Metier_Partenaires_MCadastre
|
|||||||
return $parcelles;
|
return $parcelles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nombre d'éléments et surface total
|
||||||
|
* @param string $types (local, parcelle)
|
||||||
|
* @param string $droit (P:Propriétaire, L:Locataire)
|
||||||
|
* @return mixed
|
||||||
|
* false | [itemTotal, surfaceTotal]
|
||||||
|
*/
|
||||||
|
public function getSurfaceTotal($type = 'local', $droit = 'P')
|
||||||
|
{
|
||||||
|
if ($type == 'local') {
|
||||||
|
$droitSql = " AND l.CCODRO='P'";
|
||||||
|
if ($droit != 'P') {
|
||||||
|
$droitSql = " AND l.CCODRO!='P'";
|
||||||
|
}
|
||||||
|
$sql = "SELECT count(*) AS itemTotal, (SUM(l.DSUPOD0) + SUM(l.DSUPOD1) + SUM(l.DSUPOD2) + SUM(l.DSUPOD3) + SUM(l.DSUPOD4) + SUM(l.DSUPOD5) + SUM(l.DSUPOD7) + SUM(l.DSUPOD8) + SUM(l.DSUPOD9)) AS surfaceTotal
|
||||||
|
FROM sdv1.cad_perloc l, sdv1.cad_permor e
|
||||||
|
WHERE e.DSIREN='".$this->siren."' AND e.INTCIF=l.INTCIF AND e.DNUPER=l.DNUPER".$droitSql;
|
||||||
|
$stmt = $this->conn->executeQuery($sql);
|
||||||
|
$results = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
elseif ($type == 'parcelle') {
|
||||||
|
$droitSql = " AND p.CCODRO='P'";
|
||||||
|
if ($droit != 'P') {
|
||||||
|
$droitSql = " AND p.CCODRO!='P'";
|
||||||
|
}
|
||||||
|
$sql = "SELECT count(*) AS itemTotal, sum(p.DCNPAR) AS surfaceTotal
|
||||||
|
FROM sdv1.cad_perpar p, sdv1.cad_permor e
|
||||||
|
WHERE e.DSIREN='".$this->siren."' AND e.INTCIF=p.INTCIF AND e.DNUPER=p.DNUPER".$droitSql;
|
||||||
|
$stmt = $this->conn->executeQuery($sql);
|
||||||
|
$results = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List des éléments du patrimoine
|
* List des éléments du patrimoine
|
||||||
* @return array
|
* @return array
|
||||||
@ -455,15 +492,11 @@ class Metier_Partenaires_MCadastre
|
|||||||
"WHERE e.DSIREN='$this->siren' AND e.INTCIF=p.INTCIF AND e.DNUPER=p.DNUPER";
|
"WHERE e.DSIREN='$this->siren' AND e.INTCIF=p.INTCIF AND e.DNUPER=p.DNUPER";
|
||||||
|
|
||||||
$sql = "SELECT * FROM ( ($locauxSql) UNION ALL ($parcellesSql) ) results";
|
$sql = "SELECT * FROM ( ($locauxSql) UNION ALL ($parcellesSql) ) results";
|
||||||
|
$stmt = $this->conn->executeQuery($sql);
|
||||||
$db = Zend_Db_Table::getDefaultAdapter();
|
|
||||||
|
|
||||||
//$results = $this->iDb->query($sql, true);
|
|
||||||
$results = $db->fetchAll($sql, null, Zend_Db::FETCH_ASSOC);
|
|
||||||
|
|
||||||
$list = array();
|
$list = array();
|
||||||
if (count($results) > 0) {
|
if ($stmt->rowCount() > 0) {
|
||||||
foreach ($results as $result) {
|
while ($result = $stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||||
// Libellé role
|
// Libellé role
|
||||||
$result['roleLib'] = self::$codeDroit[trim($result['role'])];
|
$result['roleLib'] = self::$codeDroit[trim($result['role'])];
|
||||||
$list[] = $result;
|
$list[] = $result;
|
||||||
|
@ -514,7 +514,7 @@ class Metier_Partenaires_MMap
|
|||||||
'alt'=>$this->altitude,
|
'alt'=>$this->altitude,
|
||||||
'precis'=>$this->precision,
|
'precis'=>$this->precision,
|
||||||
'source'=>$this->geocodeur,
|
'source'=>$this->geocodeur,
|
||||||
'dateInsert'=>DATETIME,
|
'dateInsert'=>date('YmdHis'),
|
||||||
);
|
);
|
||||||
/** Insertion de l'adresse que si elle est possible
|
/** Insertion de l'adresse que si elle est possible
|
||||||
**/
|
**/
|
||||||
|
@ -36,9 +36,24 @@ class Metier_Rnvp_Adresse
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Récupération de l'adresse normalisé
|
* PDO Connection with Doctrine
|
||||||
|
* @var \Doctrine\DBAL\Connection
|
||||||
*/
|
*/
|
||||||
public function __construct(){}
|
protected $conn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Récupération de l'adresse normalisé
|
||||||
|
* @param \Doctrine\DBAL\Connection $conn
|
||||||
|
*/
|
||||||
|
public function __construct($conn = null)
|
||||||
|
{
|
||||||
|
if ($conn === null) {
|
||||||
|
$this->conn = Zend_Registry::get('doctrine');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->conn = $conn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -46,7 +61,7 @@ class Metier_Rnvp_Adresse
|
|||||||
*/
|
*/
|
||||||
public function setCompanyId($companyId)
|
public function setCompanyId($companyId)
|
||||||
{
|
{
|
||||||
$this->source = substr($companyId,0,3);
|
$this->source = substr($companyId,0,3);
|
||||||
$this->sourceId = substr($companyId,3,20);
|
$this->sourceId = substr($companyId,3,20);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,17 +74,21 @@ class Metier_Rnvp_Adresse
|
|||||||
public function setCompanyIdProxy($companyId)
|
public function setCompanyIdProxy($companyId)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$etabM = new Application_Model_JoEtablissements();
|
$sql = "SELECT LPAD(source,3,0) AS source AND LPAD(source_id,20,0) AS source_id
|
||||||
$sql = $etabM->select(true)->columns(array('LPAD(source,3,0) AS source', 'LPAD(source_id,20,0) AS sourceId'))
|
FROM jo.etablissements WHERE siren=:siren AND nic=:nic";
|
||||||
->where('siren=?', substr($companyId,0,9))
|
$stmt = $this->conn->prepare($sql);
|
||||||
->where('nic=?', substr($companyId,9,5));
|
$stmt->bindValue('siren', substr($companyId,0,9));
|
||||||
$etabResult = $etabM->fetchRow($sql);
|
$stmt->bindValue('nic', substr($companyId,9,5));
|
||||||
if ($etabResult === null) {
|
$stmt->execute();
|
||||||
|
if ($stmt->rowCount() == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$this->source = $etabResult->source;
|
else {
|
||||||
$this->sourceId = $etabResult->source_id;
|
$etabResult = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
} catch (Zend_Db_Exception $e) {
|
$this->source = $etabResult->source;
|
||||||
|
$this->sourceId = $etabResult->source_id;
|
||||||
|
}
|
||||||
|
} catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
throw new Exception($e->getMessage(), 'ERR');
|
throw new Exception($e->getMessage(), 'ERR');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,17 +100,19 @@ class Metier_Rnvp_Adresse
|
|||||||
*/
|
*/
|
||||||
public function format()
|
public function format()
|
||||||
{
|
{
|
||||||
try
|
try {
|
||||||
{
|
$qb = $this->conn->createQueryBuilder();
|
||||||
$rnvpM = new Application_Model_VillesRnvpSources();
|
$qb->select($this->columns)
|
||||||
$sql = $rnvpM->select(true)->columns($this->columns)
|
->from('villes.rnvpSources')
|
||||||
->where('source=?', $this->source)
|
->where('source = :source')->setParameter('source', $this->source)
|
||||||
->where('source_id=?', $this->sourceId);
|
->andWhere('source_id = :sourceId')->setParameter('sourceId', $this->sourceId);
|
||||||
$rnvpResult = $rnvpM->fetchRow($sql);
|
$stmt = $qb->execute();
|
||||||
if ($rnvpResult === null) {
|
if ($stmt->rowCount() == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$rnvpResult = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
|
||||||
$rnvp = new stdClass();
|
$rnvp = new stdClass();
|
||||||
$rnvp->L1 = $rnvpResult->L1rnvp;
|
$rnvp->L1 = $rnvpResult->L1rnvp;
|
||||||
$rnvp->L2 = $rnvpResult->L2rnvp;
|
$rnvp->L2 = $rnvpResult->L2rnvp;
|
||||||
@ -118,24 +139,24 @@ class Metier_Rnvp_Adresse
|
|||||||
$quality = new Metier_Rnvp_Quality();
|
$quality = new Metier_Rnvp_Quality();
|
||||||
$rnvp->QualityLabel = $quality->getLabel($rnvp->QualityCode);
|
$rnvp->QualityLabel = $quality->getLabel($rnvp->QualityCode);
|
||||||
|
|
||||||
$rnvp->GeoInseeCommune = $rnvpResult->Insee;
|
$rnvp->GeoInseeCommune = $rnvpResult->Insee;
|
||||||
$rnvp->GeoHexavia = $rnvpResult->IdHexavia;
|
$rnvp->GeoHexavia = $rnvpResult->IdHexavia;
|
||||||
$rnvp->GeoHexapost = $rnvpResult->IdHexaposte;
|
$rnvp->GeoHexapost = $rnvpResult->IdHexaposte;
|
||||||
$rnvp->GeoHexacle = $rnvpResult->HexaCle;
|
$rnvp->GeoHexacle = $rnvpResult->HexaCle;
|
||||||
$rnvp->GeoDepartement = $rnvpResult->NumDept;
|
$rnvp->GeoDepartement = $rnvpResult->NumDept;
|
||||||
$rnvp->GeoRivoliCode = $rnvpResult->Iris_Rivoli;
|
$rnvp->GeoRivoliCode = $rnvpResult->Iris_Rivoli;
|
||||||
$rnvp->GeoIlot = $rnvpResult->Iris_Ilot99;
|
$rnvp->GeoIlot = $rnvpResult->Iris_Ilot99;
|
||||||
$rnvp->GeoIris = $rnvpResult->Iris_CodeIris;
|
$rnvp->GeoIris = $rnvpResult->Iris_CodeIris;
|
||||||
$rnvp->GeoCanton = $rnvpResult->Iris_Canton;
|
$rnvp->GeoCanton = $rnvpResult->Iris_Canton;
|
||||||
$rnvp->CedexaMatricule = $rnvpResult->Cdx_Matricule;
|
$rnvp->CedexaMatricule = $rnvpResult->Cdx_Matricule;
|
||||||
$rnvp->CedexaGeoL5 = $rnvpResult->Cdx_V5Geo;
|
$rnvp->CedexaGeoL5 = $rnvpResult->Cdx_V5Geo;
|
||||||
$rnvp->CedexaGeoL6 = $rnvpResult->Cdx_V6Geo;
|
$rnvp->CedexaGeoL6 = $rnvpResult->Cdx_V6Geo;
|
||||||
$rnvp->CedexaCdxL5 = $rnvpResult->Cdx_V5Cdx;
|
$rnvp->CedexaCdxL5 = $rnvpResult->Cdx_V5Cdx;
|
||||||
$rnvp->CedexaCdxL6 = $rnvpResult->Cdx_V6Cdx;
|
$rnvp->CedexaCdxL6 = $rnvpResult->Cdx_V6Cdx;
|
||||||
$rnvp->DateInsert = $rnvpResult->dateInsert;
|
$rnvp->DateInsert = $rnvpResult->dateInsert;
|
||||||
$rnvp->DateUpdate = $rnvpResult->dateUpdate;
|
$rnvp->DateUpdate = $rnvpResult->dateUpdate;
|
||||||
|
}
|
||||||
} catch (Zend_Db_Exception $e) {
|
catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
throw new Exception($e->getMessage(), 'ERR');
|
throw new Exception($e->getMessage(), 'ERR');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -9,20 +9,26 @@ define('INDISCORE_DEBUG', false);
|
|||||||
*/
|
*/
|
||||||
function getIndiscoreHisto($siren)
|
function getIndiscoreHisto($siren)
|
||||||
{
|
{
|
||||||
if (intval($siren) < 1000) return false;
|
if (intval($siren) < 1000) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$query="SELECT siren, actif, procol, naf, indiScore, indiScore20, encours, indiScoreDate, dateBilan, sourceModif, scoreSolv, scoreDir, scoreConf, scoreZ, scoreCH, scoreAfdcc1, scoreAfdcc2, scoreAfdcc2note, scoreAltman, scoreAltmanCote, scoreCCF, cs, csMoisMaj, csMoisFin, adresseDom, situFi, infoNote, noteStruct, noteFin, tendance, nbModifs, dateUpdate
|
$query = "SELECT siren, actif, procol, naf, indiScore, indiScore20, encours, indiScoreDate,
|
||||||
FROM jo.scores_surveillance
|
dateBilan, sourceModif, scoreSolv, scoreDir, scoreConf, scoreZ, scoreCH, scoreAfdcc1,
|
||||||
WHERE siren=$siren
|
scoreAfdcc2, scoreAfdcc2note, scoreAltman, scoreAltmanCote, scoreCCF, cs, csMoisMaj,
|
||||||
UNION SELECT siren, actif, procol, naf, indiScore, indiScore20, encours, indiScoreDate, dateBilan, sourceModif, scoreSolv, scoreDir, scoreConf, scoreZ, scoreCH, scoreAfdcc1, scoreAfdcc2, scoreAfdcc2note, scoreAltman, scoreAltmanCote, scoreCCF, cs, csMoisMaj, csMoisFin, adresseDom, situFi, infoNote, noteStruct, noteFin, tendance, nbModifs, dateUpdate
|
csMoisFin, adresseDom, situFi, infoNote, noteStruct, noteFin, tendance, nbModifs, dateUpdate
|
||||||
FROM historiques.scores_surveillance
|
FROM jo.scores_surveillance WHERE siren=$siren UNION SELECT siren, actif, procol, naf,
|
||||||
WHERE siren=$siren
|
indiScore, indiScore20, encours, indiScoreDate, dateBilan, sourceModif, scoreSolv,
|
||||||
GROUP BY indiScoreDate
|
scoreDir, scoreConf, scoreZ, scoreCH, scoreAfdcc1, scoreAfdcc2, scoreAfdcc2note, scoreAltman,
|
||||||
ORDER BY indiScoreDate DESC";
|
scoreAltmanCote, scoreCCF, cs, csMoisMaj, csMoisFin, adresseDom, situFi, infoNote,
|
||||||
|
noteStruct, noteFin, tendance, nbModifs, dateUpdate
|
||||||
|
FROM historiques.scores_surveillance WHERE siren=$siren
|
||||||
|
GROUP BY indiScoreDate
|
||||||
|
ORDER BY indiScoreDate DESC";
|
||||||
$iDb = new Metier_Util_Db();
|
$iDb = new Metier_Util_Db();
|
||||||
$ret = $iDb->query($query);
|
$ret = $iDb->query($query);
|
||||||
$tabRet = array();
|
$tabRet = array();
|
||||||
while( $ret = $iDb->fetch(MYSQL_ASSOC) ) {
|
while($ret = $iDb->fetch(MYSQL_ASSOC)) {
|
||||||
$tabRet[] = array(
|
$tabRet[] = array(
|
||||||
'siren' => $ret['siren'],
|
'siren' => $ret['siren'],
|
||||||
'actif' => $ret['actif'],
|
'actif' => $ret['actif'],
|
||||||
@ -68,11 +74,16 @@ function getIndiscoreHisto($siren)
|
|||||||
*/
|
*/
|
||||||
function getIndiscoreCache($siren)
|
function getIndiscoreCache($siren)
|
||||||
{
|
{
|
||||||
if ($siren<1000) return false;
|
if ($siren < 1000) {
|
||||||
$query="SELECT siren, actif, procol, naf, indiScore, indiScore20, encours, indiScoreDate, dateBilan, sourceModif, scoreSolv, scoreDir, scoreConf, scoreZ, scoreCH, scoreAfdcc1, scoreAfdcc2, scoreAfdcc2note, scoreAltman, scoreAltmanCote, scoreCCF, cs, csMoisMaj, csMoisFin, adresseDom, situFi, infoNote, noteStruct, noteFin, tendance, nbModifs, dateUpdate
|
return false;
|
||||||
FROM jo.scores_surveillance
|
}
|
||||||
WHERE siren=$siren
|
$query = "SELECT siren, actif, procol, naf, indiScore, indiScore20, encours, indiScoreDate,
|
||||||
ORDER BY indiScoreDate DESC";
|
dateBilan, sourceModif, scoreSolv, scoreDir, scoreConf, scoreZ, scoreCH, scoreAfdcc1,
|
||||||
|
scoreAfdcc2, scoreAfdcc2note, scoreAltman, scoreAltmanCote, scoreCCF, cs, csMoisMaj,
|
||||||
|
csMoisFin, adresseDom, situFi, infoNote, noteStruct, noteFin, tendance, nbModifs, dateUpdate
|
||||||
|
FROM jo.scores_surveillance
|
||||||
|
WHERE siren=$siren
|
||||||
|
ORDER BY indiScoreDate DESC";
|
||||||
$iDb = new Metier_Util_Db();
|
$iDb = new Metier_Util_Db();
|
||||||
$ret = $iDb->query($query);
|
$ret = $iDb->query($query);
|
||||||
$tabRet = array();
|
$tabRet = array();
|
||||||
@ -123,12 +134,15 @@ function getIndiscoreCache($siren)
|
|||||||
*/
|
*/
|
||||||
function getScoreSecteur($naf5)
|
function getScoreSecteur($naf5)
|
||||||
{
|
{
|
||||||
if (len($naf)<>5) return false;
|
if (len($naf) != 5) {
|
||||||
$tabTmp=$iDb->select( 'jo.scores_surveillance',
|
return false;
|
||||||
'naf, AVG(indiScore) AS score100moy, AVG(indiScore20) AS score20moy, AVG(encours) AS encoursMoy, MAX(indiScoreDate) AS lastScore, COUNT(siren) AS nbSiren',
|
}
|
||||||
"naf='$naf5' AND actif=1", false, MYSQL_ASSOC);
|
$tabTmp = $iDb->select('jo.scores_surveillance',
|
||||||
if ( count($tabTmp)>0 ) {
|
'naf, AVG(indiScore) AS score100moy, AVG(indiScore20) AS score20moy,
|
||||||
$tabTmp=$tabTmp[0];
|
AVG(encours) AS encoursMoy, MAX(indiScoreDate) AS lastScore, COUNT(siren) AS nbSiren',
|
||||||
|
"naf='$naf5' AND actif=1", false, MYSQL_ASSOC);
|
||||||
|
if (count($tabTmp) > 0) {
|
||||||
|
$tabTmp = $tabTmp[0];
|
||||||
return array(
|
return array(
|
||||||
'naf' => $tabTmp['naf'],
|
'naf' => $tabTmp['naf'],
|
||||||
'score100moy' => $tabTmp['score100moy'],
|
'score100moy' => $tabTmp['score100moy'],
|
||||||
@ -167,7 +181,7 @@ function getTxTva($date)
|
|||||||
function getTxRendement($annee)
|
function getTxRendement($annee)
|
||||||
{
|
{
|
||||||
$tabTxRendObli = include __DIR__ . '/Data/RendObli.php';
|
$tabTxRendObli = include __DIR__ . '/Data/RendObli.php';
|
||||||
if ( isset($tabTxRendObli[$annee]) ) {
|
if (isset($tabTxRendObli[$annee])) {
|
||||||
return $tabTxRendObli[$annee];
|
return $tabTxRendObli[$annee];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -189,14 +203,18 @@ function number_format2($nombre, $decimales, $sepDec, $sepMil, $unite, $signe)
|
|||||||
if ($signe == '+') {
|
if ($signe == '+') {
|
||||||
if ($nombre > 0) {
|
if ($nombre > 0) {
|
||||||
return '+ '.number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
return '+ '.number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
} elseif ($nombre<0) {
|
}
|
||||||
|
elseif ($nombre < 0) {
|
||||||
return '- '.number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
return '- '.number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
return number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
}
|
}
|
||||||
} elseif ($signe=='!') {
|
}
|
||||||
|
elseif ($signe == '!') {
|
||||||
return number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
return number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return number_format($nombre,$decimales,$sepDec,$sepMil).' '.$unite;
|
return number_format($nombre,$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -292,27 +310,31 @@ function formatValeur($variable, $longeur=0, $fonction='')
|
|||||||
if ( isset($tabVariables[$nomVar]) ) {
|
if ( isset($tabVariables[$nomVar]) ) {
|
||||||
if ($longeur>0) {
|
if ($longeur>0) {
|
||||||
return $variable;
|
return $variable;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// Tableau ZEMET
|
// Tableau ZEMET
|
||||||
if ($nomVar=='ZEMET') {
|
if ($nomVar == 'ZEMET') {
|
||||||
global $RPET, $DateNotice80;
|
global $RPET, $DateNotice80;
|
||||||
if ( substr($DateNotice80,0,4)>=2010 ) {
|
if ( substr($DateNotice80,0,4) >= 2010 ) {
|
||||||
$tableZemet = 'ZEMET2010';
|
$tableZemet = 'ZEMET2010';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$tableZemet = 'ZEMET1994';
|
$tableZemet = 'ZEMET1994';
|
||||||
}
|
}
|
||||||
// Cette variable a un libellé associé
|
// Cette variable a un libellé associé
|
||||||
if (isset($tabVariables[$tableZemet][$RPET.$ZEMET]['art'])) {
|
if (isset($tabVariables[$tableZemet][$RPET.$ZEMET]['art'])) {
|
||||||
return $tabVariables[$tableZemet][$RPET.$ZEMET]['art'];
|
return $tabVariables[$tableZemet][$RPET.$ZEMET]['art'];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return $tabVariables[$tableZemet][$RPET.$ZEMET]['lib'];
|
return $tabVariables[$tableZemet][$RPET.$ZEMET]['lib'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cette variable a un libellé associé
|
// Cette variable a un libellé associé
|
||||||
$strTmp=eval("return $valeur;");
|
$strTmp=eval("return $valeur;");
|
||||||
if (isset($tabVariables[$nomVar][$strTmp]['lib'])){
|
if (isset($tabVariables[$nomVar][$strTmp]['lib'])) {
|
||||||
return $tabVariables[$nomVar][$strTmp]['lib'];
|
return $tabVariables[$nomVar][$strTmp]['lib'];
|
||||||
} elseif (isset($tabVariables[$nomVar]['0'.$strTmp]['lib'])){
|
}
|
||||||
|
elseif (isset($tabVariables[$nomVar]['0'.$strTmp]['lib'])) {
|
||||||
return $tabVariables[$nomVar]['0'.$strTmp]['lib'];
|
return $tabVariables[$nomVar]['0'.$strTmp]['lib'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -346,24 +368,31 @@ function formatValeur($variable, $longeur=0, $fonction='')
|
|||||||
// --- Formattage variable [...]_EU
|
// --- Formattage variable [...]_EU
|
||||||
elseif (preg_match('/_EU$/', $nomVar)) {
|
elseif (preg_match('/_EU$/', $nomVar)) {
|
||||||
$strTmp=eval("return $valeur;");
|
$strTmp=eval("return $valeur;");
|
||||||
if ($strTmp>=0 && $strTmp<10 || $strTmp>-10 && $strTmp<=0)
|
if ($strTmp>=0 && $strTmp<10 || $strTmp>-10 && $strTmp<=0) {
|
||||||
return number_format($strTmp,2,',',' ').' €';
|
return number_format($strTmp,2,',',' ').' €';
|
||||||
elseif ($strTmp>=10 && $strTmp<5000 || $strTmp>-5000 && $strTmp<=10)
|
}
|
||||||
return number_format($strTmp,0,',',' ').' €';
|
elseif ($strTmp>=10 && $strTmp<5000 || $strTmp>-5000 && $strTmp<=10) {
|
||||||
elseif ($strTmp<=-10000000 || $strTmp>=10000000)
|
return number_format($strTmp,0,',',' ').' €';
|
||||||
return number_format($strTmp/1000000,0,',',' ').' M€';
|
}
|
||||||
else
|
elseif ($strTmp<=-10000000 || $strTmp>=10000000) {
|
||||||
return number_format($strTmp/1000,0,',',' ').' K€';
|
return number_format($strTmp/1000000,0,',',' ').' M€';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return number_format($strTmp/1000,0,',',' ').' K€';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]_POURC
|
// --- Formattage variable [...]_POURC
|
||||||
elseif (preg_match('/_POURC$/', $nomVar)) {
|
elseif (preg_match('/_POURC$/', $nomVar)) {
|
||||||
$strTmp=eval("return $valeur;");
|
$strTmp=eval("return $valeur;");
|
||||||
if ($strTmp>=10 || $strTmp<=-10)
|
if ($strTmp>=10 || $strTmp<=-10) {
|
||||||
return number_format($strTmp,0,',',' ').' %';
|
return number_format($strTmp,0,',',' ').' %';
|
||||||
elseif ($strTmp>=1 || $strTmp<=-1)
|
}
|
||||||
return number_format($strTmp,1,',',' ').' %';
|
elseif ($strTmp>=1 || $strTmp<=-1) {
|
||||||
else
|
return number_format($strTmp,1,',',' ').' %';
|
||||||
return number_format($strTmp,3,',',' ').' %';
|
}
|
||||||
|
else {
|
||||||
|
return number_format($strTmp,3,',',' ').' %';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]CAPITAL
|
// --- Formattage variable [...]CAPITAL
|
||||||
elseif (preg_match('/CAPITAL$/', $nomVar)) {
|
elseif (preg_match('/CAPITAL$/', $nomVar)) {
|
||||||
@ -391,51 +420,85 @@ function formatValeur($variable, $longeur=0, $fonction='')
|
|||||||
}
|
}
|
||||||
// --- Formattage variable [...]DIMMAT
|
// --- Formattage variable [...]DIMMAT
|
||||||
elseif (preg_match('/DIMMAT$/', $nomVar)) {
|
elseif (preg_match('/DIMMAT$/', $nomVar)) {
|
||||||
return preg_replace('/00\//','01/', Metier_Util_Date::dateT('Ymd','d/m/Y', substr(str_replace('-','',$DIMMAT),0,8)));
|
return preg_replace('/00\//','01/',
|
||||||
|
Metier_Util_Date::dateT('Ymd','d/m/Y', substr(str_replace('-','',$DIMMAT),0,8)));
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]DCREN
|
// --- Formattage variable [...]DCREN
|
||||||
elseif (preg_match('/DCREN$/',$nomVar)) {
|
elseif (preg_match('/DCREN$/',$nomVar)) {
|
||||||
return preg_replace('/00\//','01/', Metier_Util_Date::dateT('Ymd','d/m/Y', substr(str_replace('-','',$DCREN),0,8)));
|
return preg_replace('/00\//','01/',
|
||||||
|
Metier_Util_Date::dateT('Ymd','d/m/Y', substr(str_replace('-','',$DCREN),0,8)));
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]MARCHEVOL
|
// --- Formattage variable [...]MARCHEVOL
|
||||||
elseif (preg_match('/MARCHEVOL$/', $nomVar)) {
|
elseif (preg_match('/MARCHEVOL$/', $nomVar)) {
|
||||||
if (abs($MARCHEVOL)>=5) return round($MARCHEVOL).' %';
|
if (abs($MARCHEVOL)>=5) {
|
||||||
else return number_format($MARCHEVOL,3,',',' ').' %';
|
return round($MARCHEVOL).' %';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
number_format($MARCHEVOL,3,',',' ').' %';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]MARCHEPART
|
// --- Formattage variable [...]MARCHEPART
|
||||||
elseif (preg_match('/MARCHEPART$/', $nomVar)) {
|
elseif (preg_match('/MARCHEPART$/', $nomVar)) {
|
||||||
if (abs($MARCHEPART)>=5) return round($MARCHEPART).' %';
|
if (abs($MARCHEPART)>=5) {
|
||||||
else return number_format($MARCHEPART,3,',',' ').' %';
|
return round($MARCHEPART).' %';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return number_format($MARCHEPART,3,',',' ').' %';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]MARCHEPARTp
|
// --- Formattage variable [...]MARCHEPARTp
|
||||||
elseif (preg_match('/MARCHEPARTp$/', $nomVar)) {
|
elseif (preg_match('/MARCHEPARTp$/', $nomVar)) {
|
||||||
if (abs($MARCHEPARTp)>=5) return round($MARCHEPARTp).' %';
|
if (abs($MARCHEPARTp)>=5) {
|
||||||
else return number_format($MARCHEPARTp,3,',',' ').' %';
|
return round($MARCHEPARTp).' %';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return number_format($MARCHEPARTp,3,',',' ').' %';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]MARCHEPARTEVOL
|
// --- Formattage variable [...]MARCHEPARTEVOL
|
||||||
elseif (preg_match('/MARCHEPARTEVOL$/', $nomVar)) {
|
elseif (preg_match('/MARCHEPARTEVOL$/', $nomVar)) {
|
||||||
if (abs($MARCHEPARTEVOL)>=5) return round($MARCHEPARTEVOL).' %';
|
if (abs($MARCHEPARTEVOL)>=5) {
|
||||||
else return number_format($MARCHEPARTEVOL,3,',',' ').' %';
|
return round($MARCHEPARTEVOL).' %';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return number_format($MARCHEPARTEVOL,3,',',' ').' %';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]MARCHE
|
// --- Formattage variable [...]MARCHE
|
||||||
elseif (preg_match('/MARCHE$/', $nomVar)) {
|
elseif (preg_match('/MARCHE$/', $nomVar)) {
|
||||||
if ($MARCHE<10000) return number_format($MARCHE,0,',',' ').' €';
|
if ($MARCHE<10000) {
|
||||||
elseif ($MARCHE<1000000) return number_format($MARCHE/1000,0,',',' ').' K€';
|
return number_format($MARCHE,0,',',' ').' €';
|
||||||
elseif ($MARCHE<1000000000) return number_format($MARCHE/1000000,0,',',' ').' M€';
|
}
|
||||||
else return number_format($MARCHE/1000000000,0,',',' ')." milliards d'€";
|
elseif ($MARCHE<1000000) {
|
||||||
}
|
return number_format($MARCHE/1000,0,',',' ').' K€';
|
||||||
// --- Formattage variable [...]MARCHE
|
}
|
||||||
elseif (preg_match('/MARCHEp$/', $nomVar)) {
|
elseif ($MARCHE<1000000000) {
|
||||||
if ($MARCHEp<10000) return number_format($MARCHEp,0,',',' ').' €';
|
return number_format($MARCHE/1000000,0,',',' ').' M€';
|
||||||
elseif ($MARCHEp<1000000) return number_format($MARCHEp/1000,0,',',' ').' K€';
|
}
|
||||||
elseif ($MARCHEp<1000000000)return number_format($MARCHEp/1000000,0,',',' ').' M€';
|
else {
|
||||||
else return number_format($MARCHEp/1000000000,0,',',' ')." milliards d'€";
|
return number_format($MARCHE/1000000000,0,',',' ')." milliards d'€";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]MARCHEp
|
// --- Formattage variable [...]MARCHEp
|
||||||
|
elseif (preg_match('/MARCHEp$/', $nomVar)) {
|
||||||
|
if ($MARCHEp<10000) {
|
||||||
|
return number_format($MARCHEp,0,',',' ').' €';
|
||||||
|
}
|
||||||
|
elseif ($MARCHEp<1000000) {
|
||||||
|
return number_format($MARCHEp/1000,0,',',' ').' K€';
|
||||||
|
}
|
||||||
|
elseif ($MARCHEp<1000000000) {
|
||||||
|
return number_format($MARCHEp/1000000,0,',',' ').' M€';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return number_format($MARCHEp/1000000000,0,',',' ')." milliards d'€";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// --- Formattage variable CA_Y[*]
|
||||||
elseif (preg_match('/^CA_Y\[(.*)\]/U', $nomVar, $matches2)) {
|
elseif (preg_match('/^CA_Y\[(.*)\]/U', $nomVar, $matches2)) {
|
||||||
return number_format($CA_Y[$matches2[1]]/1000,0,',',' ').' K€';
|
return number_format($CA_Y[$matches2[1]]/1000,0,',',' ').' K€';
|
||||||
}
|
}
|
||||||
// --- Formattage variable CA_Y[*]
|
// --- Formattage variable RCAI_Y[*]
|
||||||
elseif (preg_match('/^RCAI_Y\[(.*)\]/U', $nomVar, $matches2)) {
|
elseif (preg_match('/^RCAI_Y\[(.*)\]/U', $nomVar, $matches2)) {
|
||||||
return number_format($RCAI_Y[$matches2[1]]/1000,0,',',' ').' K€';
|
return number_format($RCAI_Y[$matches2[1]]/1000,0,',',' ').' K€';
|
||||||
}
|
}
|
||||||
@ -482,8 +545,12 @@ function formatValeur($variable, $longeur=0, $fonction='')
|
|||||||
}
|
}
|
||||||
// --- Formattage variable SCOREDEFTAUX
|
// --- Formattage variable SCOREDEFTAUX
|
||||||
elseif (preg_match('/^SCOREDEFTAUX$/', $nomVar)) {
|
elseif (preg_match('/^SCOREDEFTAUX$/', $nomVar)) {
|
||||||
if ($SCOREDEFTAUX>=5) return round($SCOREDEFTAUX).' %';
|
if ($SCOREDEFTAUX>=5) {
|
||||||
else return number_format($SCOREDEFTAUX,3,',',' ').' %';
|
return round($SCOREDEFTAUX).' %';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return number_format($SCOREDEFTAUX,3,',',' ').' %';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable BILANANNEE
|
// --- Formattage variable BILANANNEE
|
||||||
elseif (preg_match('/BILANANNEE$/', $nomVar)) {
|
elseif (preg_match('/BILANANNEE$/', $nomVar)) {
|
||||||
@ -509,15 +576,22 @@ function format($matches)
|
|||||||
|
|
||||||
// --- Moyenne
|
// --- Moyenne
|
||||||
if (preg_match("/\{MOY\(R\[(\d+)\],(\d+)\)/Ui", $strRetour, $matches2)) {
|
if (preg_match("/\{MOY\(R\[(\d+)\],(\d+)\)/Ui", $strRetour, $matches2)) {
|
||||||
$tmpRatioId=$matches2[1]*1;
|
$tmpRatioId = $matches2[1]*1;
|
||||||
$tmpAnnees =$matches2[2]*1;
|
$tmpAnnees = $matches2[2]*1;
|
||||||
|
$valeur = $R[$tmpRatioId];
|
||||||
$valeur=$R[$tmpRatioId];
|
|
||||||
for($iMoy=0; $iMoy<$tmpAnnees; $iMoy++) {
|
for($iMoy=0; $iMoy<$tmpAnnees; $iMoy++) {
|
||||||
if ($iMoy==1) $valeur+=$Rp[$tmpRatioId];
|
if ($iMoy==1) {
|
||||||
elseif ($iMoy==2) $valeur+=$Rp2[$tmpRatioId];
|
$valeur+= $Rp[$tmpRatioId];
|
||||||
elseif ($iMoy==3) $valeur+=$Rp3[$tmpRatioId];
|
}
|
||||||
elseif ($iMoy==4) $valeur+=$Rp4[$tmpRatioId];
|
elseif ($iMoy==2) {
|
||||||
|
$valeur+= $Rp2[$tmpRatioId];
|
||||||
|
}
|
||||||
|
elseif ($iMoy==3) {
|
||||||
|
$valeur+= $Rp3[$tmpRatioId];
|
||||||
|
}
|
||||||
|
elseif ($iMoy==4) {
|
||||||
|
$valeur+= $Rp4[$tmpRatioId];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return formatRatio('', $valeur/$tmpAnnees, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']));
|
return formatRatio('', $valeur/$tmpAnnees, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']));
|
||||||
}
|
}
|
||||||
@ -527,53 +601,77 @@ function format($matches)
|
|||||||
}
|
}
|
||||||
// --- Ratios
|
// --- Ratios
|
||||||
elseif (preg_match('/\$\{(\+|!|)(Rp4|Rp3|Rp2|Rp|Rs|Rsp|Rap|Ra|Rdiff|Revolp2|Revolp|Revol|R|regR)\[(\d+)\]\}/Ui', $strRetour, $matches2)) {
|
elseif (preg_match('/\$\{(\+|!|)(Rp4|Rp3|Rp2|Rp|Rs|Rsp|Rap|Ra|Rdiff|Revolp2|Revolp|Revol|R|regR)\[(\d+)\]\}/Ui', $strRetour, $matches2)) {
|
||||||
$tmpRatio=$matches2[2];
|
$tmpRatio = $matches2[2];
|
||||||
$tmpRatioId=$matches2[3]*1;
|
$tmpRatioId = $matches2[3]*1;
|
||||||
if ($matches2[1]=='+') $forceSigne='+';
|
$unite = strtoupper($tabFormulesRatios[$tmpRatioId]['unite']);
|
||||||
elseif ($matches2[1]=='!') $forceSigne='!';
|
if ($matches2[1]=='+') {
|
||||||
else $forceSigne='';
|
$forceSigne='+';
|
||||||
if ($tmpRatio=='R')
|
}
|
||||||
return formatRatio($R, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
elseif ($matches2[1]=='!') {
|
||||||
elseif ($tmpRatio=='Rp')
|
$forceSigne='!';
|
||||||
return formatRatio($Rp, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
}
|
||||||
elseif ($tmpRatio=='Rp2')
|
else {
|
||||||
return formatRatio($Rp2, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
$forceSigne='';
|
||||||
elseif ($tmpRatio=='Rp3')
|
}
|
||||||
return formatRatio($Rp3, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
if ($tmpRatio=='R') {
|
||||||
elseif ($tmpRatio=='Rp4')
|
return formatRatio($R, $tmpRatioId, $unite, $forceSigne);
|
||||||
return formatRatio($Rp4, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
}
|
||||||
elseif ($tmpRatio=='Ra')
|
elseif ($tmpRatio=='Rp') {
|
||||||
return formatRatio($Ra, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
return formatRatio($Rp, $tmpRatioId, $unite, $forceSigne);
|
||||||
elseif ($tmpRatio=='Rap')
|
}
|
||||||
return formatRatio($Rap, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
elseif ($tmpRatio=='Rp2') {
|
||||||
elseif ($tmpRatio=='Rs')
|
return formatRatio($Rp2, $tmpRatioId, $unite, $forceSigne);
|
||||||
return formatRatio($Rs, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
}
|
||||||
elseif ($tmpRatio=='Rsp')
|
elseif ($tmpRatio=='Rp3') {
|
||||||
return formatRatio($Rsp, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
return formatRatio($Rp3, $tmpRatioId, $unite, $forceSigne);
|
||||||
elseif ($tmpRatio=='Rsp2')
|
}
|
||||||
return formatRatio($Rsp2, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
elseif ($tmpRatio=='Rp4') {
|
||||||
elseif ($tmpRatio=='Rsp3')
|
return formatRatio($Rp4, $tmpRatioId, $unite, $forceSigne);
|
||||||
return formatRatio($Rsp3, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
}
|
||||||
elseif ($tmpRatio=='Rsp4')
|
elseif ($tmpRatio=='Ra') {
|
||||||
return formatRatio($Rsp4, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
return formatRatio($Ra, $tmpRatioId, $unite, $forceSigne);
|
||||||
elseif ($tmpRatio=='Revol')
|
}
|
||||||
return formatRatio($Revol, $tmpRatioId, '%', $forceSigne);
|
elseif ($tmpRatio=='Rap') {
|
||||||
elseif ($tmpRatio=='Rdiff')
|
return formatRatio($Rap, $tmpRatioId, $unite, $forceSigne);
|
||||||
return formatRatio($Rdiff, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
}
|
||||||
elseif ($tmpRatio=='Revolp')
|
elseif ($tmpRatio=='Rs') {
|
||||||
return formatRatio($Revolp, $tmpRatioId, '%', $forceSigne);
|
return formatRatio($Rs, $tmpRatioId, $unite, $forceSigne);
|
||||||
elseif ($tmpRatio=='Revolp2')
|
}
|
||||||
return formatRatio($Revolp2, $tmpRatioId, '%', $forceSigne);
|
elseif ($tmpRatio=='Rsp') {
|
||||||
elseif ($tmpRatio=='Revolp3')
|
return formatRatio($Rsp, $tmpRatioId, $unite, $forceSigne);
|
||||||
return formatRatio($Revolp3, $tmpRatioId, '%', $forceSigne);
|
}
|
||||||
elseif ($tmpRatio=='regR')
|
elseif ($tmpRatio=='Rsp2') {
|
||||||
return formatRatio($regR, $tmpRatioId, strtoupper($tabFormulesRatios[$tmpRatioId]['unite']), $forceSigne);
|
return formatRatio($Rsp2, $tmpRatioId, $unite, $forceSigne);
|
||||||
|
}
|
||||||
|
elseif ($tmpRatio=='Rsp3') {
|
||||||
|
return formatRatio($Rsp3, $tmpRatioId, $unite, $forceSigne);
|
||||||
|
}
|
||||||
|
elseif ($tmpRatio=='Rsp4') {
|
||||||
|
return formatRatio($Rsp4, $tmpRatioId, $unite, $forceSigne);
|
||||||
|
}
|
||||||
|
elseif ($tmpRatio=='Revol') {
|
||||||
|
return formatRatio($Revol, $tmpRatioId, '%', $forceSigne);
|
||||||
|
}
|
||||||
|
elseif ($tmpRatio=='Rdiff') {
|
||||||
|
return formatRatio($Rdiff, $tmpRatioId, $unite, $forceSigne);
|
||||||
|
}
|
||||||
|
elseif ($tmpRatio=='Revolp') {
|
||||||
|
return formatRatio($Revolp, $tmpRatioId, '%', $forceSigne);
|
||||||
|
}
|
||||||
|
elseif ($tmpRatio=='Revolp2') {
|
||||||
|
return formatRatio($Revolp2, $tmpRatioId, '%', $forceSigne);
|
||||||
|
}
|
||||||
|
elseif ($tmpRatio=='Revolp3') {
|
||||||
|
return formatRatio($Revolp3, $tmpRatioId, '%', $forceSigne);
|
||||||
|
}
|
||||||
|
elseif ($tmpRatio=='regR') {
|
||||||
|
return formatRatio($regR, $tmpRatioId, $unite, $forceSigne);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Valeur
|
// --- Valeur
|
||||||
elseif (preg_match('/\$\{(.*)\((\d+)\)\}/Ui', $strRetour, $matches2)) {
|
elseif (preg_match('/\$\{(.*)\((\d+)\)\}/Ui', $strRetour, $matches2)) {
|
||||||
$tmpVar=$matches2[1];
|
$tmpVar = $matches2[1];
|
||||||
$tmpVarLen=$matches2[2]*1;
|
$tmpVarLen = $matches2[2]*1;
|
||||||
return formatValeur('$'.$tmpVar, $tmpVarLen);
|
return formatValeur('$'.$tmpVar, $tmpVarLen);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -687,22 +785,22 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
|
|
||||||
$tabRatiosSecteurs = $tabRatios2 = $tabRatiosEvol = array();
|
$tabRatiosSecteurs = $tabRatios2 = $tabRatiosEvol = array();
|
||||||
|
|
||||||
$NIC=substr($tabIdentite['SiretSiege'],-5);
|
$NIC = substr($tabIdentite['SiretSiege'],-5);
|
||||||
$SIREN=$siren;
|
$SIREN = $siren;
|
||||||
$SIRET=$tabIdentite['SiretSiege'];
|
$SIRET = $tabIdentite['SiretSiege'];
|
||||||
|
|
||||||
$ANNEE=date('Y')*1;
|
$ANNEE = date('Y')*1;
|
||||||
$ANNEEp3=$ANNEE-3;
|
$ANNEEp3 = $ANNEE-3;
|
||||||
$ANNEEp2=$ANNEE-2;
|
$ANNEEp2 = $ANNEE-2;
|
||||||
$ANNEEp=$ANNEE-1;
|
$ANNEEp = $ANNEE-1;
|
||||||
$ANNEE1=$ANNEE+1;
|
$ANNEE1 = $ANNEE+1;
|
||||||
$ANNEE2=$ANNEE+2;
|
$ANNEE2 = $ANNEE+2;
|
||||||
$ANNEE3=$ANNEE+3;
|
$ANNEE3 = $ANNEE+3;
|
||||||
$ANNEE4=$ANNEE+4;
|
$ANNEE4 = $ANNEE+4;
|
||||||
$ANNEE5=$ANNEE+5;
|
$ANNEE5 = $ANNEE+5;
|
||||||
|
|
||||||
$JOUR_DATE=date('Y-m-d');
|
$JOUR_DATE = date('Y-m-d');
|
||||||
$JOUR_HEURE=date('H:i');
|
$JOUR_HEURE = date('H:i');
|
||||||
|
|
||||||
$MAX_TEMOINS=99;
|
$MAX_TEMOINS=99;
|
||||||
|
|
||||||
@ -840,9 +938,9 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
|
|
||||||
$tendance='';
|
$tendance='';
|
||||||
$naf=$tabIdentite['NafEnt'];
|
$naf=$tabIdentite['NafEnt'];
|
||||||
$APEETAB=$tabIdentite['NafEtab'];
|
$APEETAB = $tabIdentite['NafEtab'];
|
||||||
$TRIBUNAL_ACTUEL=strtr($tabIdentite['TribunalLib'],array('TC '=>'Tribunal de Commerce de '));
|
$TRIBUNAL_ACTUEL = strtr($tabIdentite['TribunalLib'],array('TC '=>'Tribunal de Commerce de '));
|
||||||
$TRIBUNAL_CREATION=$TRIBUNAL_PROCOL='';
|
$TRIBUNAL_CREATION = $TRIBUNAL_PROCOL='';
|
||||||
|
|
||||||
$nafLib=$tabIdentite['NafEntLib'];
|
$nafLib=$tabIdentite['NafEntLib'];
|
||||||
$efftr=$tabIdentite['Effectif']*1;
|
$efftr=$tabIdentite['Effectif']*1;
|
||||||
@ -866,27 +964,27 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
// Elements provenant du Notice 80 hors identité
|
// Elements provenant du Notice 80 hors identité
|
||||||
$tabIden80=$iInsee->getInfosNotice($siren,$NIC);
|
$tabIden80=$iInsee->getInfosNotice($siren,$NIC);
|
||||||
$timer['getInfosNotice'] = microtime(true);
|
$timer['getInfosNotice'] = microtime(true);
|
||||||
$RECME=$tabIden80['insRECME'];
|
$RECME = $tabIden80['insRECME'];
|
||||||
$ZEMET=$tabIden80['insZEMET'];
|
$ZEMET = $tabIden80['insZEMET'];
|
||||||
$RPET=$tabIden80['insRPET'];
|
$RPET = $tabIden80['insRPET'];
|
||||||
$RPEN=$tabIden80['insRPEN'];
|
$RPEN = $tabIden80['insRPEN'];
|
||||||
$DateNotice80=$tabIden80['dateNotice'];
|
$DateNotice80 = $tabIden80['dateNotice'];
|
||||||
$depcomen=$tabIden80['insDEPCOMEN']*1;
|
$depcomen = $tabIden80['insDEPCOMEN']*1;
|
||||||
$TU=$tabIden80['insTU'];
|
$TU = $tabIden80['insTU'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Différences INSEE/RNCS
|
* Différences INSEE/RNCS
|
||||||
*/
|
*/
|
||||||
$iRncs = new Metier_Partenaires_MRncs($iDb);
|
$iRncs = new Metier_Partenaires_MRncs($iDb);
|
||||||
$tabIdentiteRncs=$iRncs->getInfosEntrep($siren);
|
$tabIdentiteRncs=$iRncs->getInfosEntrep($siren);
|
||||||
$ACTIFRNCS=$tabIdentiteRncs['actif'];
|
$ACTIFRNCS = $tabIdentiteRncs['actif'];
|
||||||
$ACTIFINSEE=$tabIdentite['Actif'];
|
$ACTIFINSEE = $tabIdentite['Actif'];
|
||||||
|
|
||||||
$APEENT=$APEINSEE=$naf;
|
$APEENT = $APEINSEE=$naf;
|
||||||
$APERNCS=$tabIdentiteRncs['nafEnt'];
|
$APERNCS = $tabIdentiteRncs['nafEnt'];
|
||||||
if (strlen($APEENT)==5) $APE5=$APEENT;
|
if (strlen($APEENT)==5) $APE5 = $APEENT;
|
||||||
elseif (strlen($APEENT)==4) $APE4=$APEENT;
|
elseif (strlen($APEENT)==4) $APE4 = $APEENT;
|
||||||
else $APE5=$APE4='';
|
else $APE5 = $APE4='';
|
||||||
|
|
||||||
$DIMMAT=$tabIdentiteRncs['dateImma'];
|
$DIMMAT=$tabIdentiteRncs['dateImma'];
|
||||||
$DIMMAT_AA=substr($tabIdentiteRncs['dateImma'],0,4);
|
$DIMMAT_AA=substr($tabIdentiteRncs['dateImma'],0,4);
|
||||||
@ -908,34 +1006,34 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
if ($tabIdentite['Source']*1<>2) $PRESENTINSEE=false;
|
if ($tabIdentite['Source']*1<>2) $PRESENTINSEE=false;
|
||||||
else $PRESENTINSEE=true;
|
else $PRESENTINSEE=true;
|
||||||
|
|
||||||
$NOMEN=trim(strtr($tabIdentite['Nom'],array('*'=>' ','/'=>' ')));
|
$NOMEN = trim(strtr($tabIdentite['Nom'],array('*'=>' ','/'=>' ')));
|
||||||
$ENSEIGNE=$tabIdentite['Enseigne'];
|
$ENSEIGNE = $tabIdentite['Enseigne'];
|
||||||
$ENTREP_ALT=$tabIdentite['GeoAlt']; // Altitude de l'établissement
|
$ENTREP_ALT = $tabIdentite['GeoAlt']; // Altitude de l'établissement
|
||||||
$ACTIVNAT=$tabIdentite['NatureActivite'];
|
$ACTIVNAT = $tabIdentite['NatureActivite'];
|
||||||
$AUXILT=$tabIdentite['Auxiliaire'];
|
$AUXILT = $tabIdentite['Auxiliaire'];
|
||||||
$ORIGINE=$tabIdentite['OrigineCreation'];
|
$ORIGINE = $tabIdentite['OrigineCreation'];
|
||||||
$ACTISURF=$tabIdentite['ACTISURF'];
|
$ACTISURF = $tabIdentite['ACTISURF'];
|
||||||
$EXPLEN=$tabIdentite['EXPLEN'];
|
$EXPLEN = $tabIdentite['EXPLEN'];
|
||||||
$EXPLET=$tabIdentite['EXPLET'];
|
$EXPLET = $tabIdentite['EXPLET'];
|
||||||
$LIEUACT=$tabIdentite['LIEUACT'];
|
$LIEUACT = $tabIdentite['LIEUACT'];
|
||||||
$MODEN=$tabIdentite['MODEN'];
|
$MODEN = $tabIdentite['MODEN'];
|
||||||
$MONOACT=$tabIdentite['MONOACT'];
|
$MONOACT = $tabIdentite['MONOACT'];
|
||||||
$MONOREG=$tabIdentite['MONOREG'];
|
$MONOREG = $tabIdentite['MONOREG'];
|
||||||
$PRODPART=$tabIdentite['PRODPART'];
|
$PRODPART = $tabIdentite['PRODPART'];
|
||||||
|
|
||||||
// Saisonnalité de l'activité
|
// Saisonnalité de l'activité
|
||||||
if ($tabIdentite['Saisonnalite']==1) $SAISONAT='S';
|
if ($tabIdentite['Saisonnalite']==1) $SAISONAT='S';
|
||||||
else $SAISONAT='P';
|
else $SAISONAT='P';
|
||||||
$CAPITAL=$tabIdentite['Capital'];
|
$CAPITAL=$tabIdentite['Capital'];
|
||||||
$CAPITAL_NBACTION=$tabIdentite['CapitalNbActions'];
|
$CAPITAL_NBACTION = $tabIdentite['CapitalNbActions'];
|
||||||
$CAPITAL_MTACTION=$tabIdentite['CapitalMtActions'];
|
$CAPITAL_MTACTION = $tabIdentite['CapitalMtActions'];
|
||||||
if ($CAPITAL>0) {
|
if ($CAPITAL>0) {
|
||||||
switch ($tabIdentite['CapitalType']) {
|
switch ($tabIdentite['CapitalType']) {
|
||||||
case 'V': $CAPITAL_TYPE='variable'; break;
|
case 'V': $CAPITAL_TYPE = 'variable'; break;
|
||||||
case 'S': $CAPITAL_TYPE='fixe'; break;
|
case 'S': $CAPITAL_TYPE = 'fixe'; break;
|
||||||
default: $CAPITAL_TYPE=''; break;
|
default: $CAPITAL_TYPE = ''; break;
|
||||||
}
|
}
|
||||||
} else $CAPITAL_TYPE='';
|
} else $CAPITAL_TYPE = '';
|
||||||
|
|
||||||
$TCAEXP=$tabIdentite['TrancheCAexp'];
|
$TCAEXP=$tabIdentite['TrancheCAexp'];
|
||||||
|
|
||||||
@ -1106,11 +1204,11 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
if ($tabBilan[$i]['CONSOLIDE']!='C') $i2++;
|
if ($tabBilan[$i]['CONSOLIDE']!='C') $i2++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$R = $tabRatiosNew[0];
|
$R = $tabRatiosNew[0];
|
||||||
$Rp = $tabRatiosNew[1]; // Ratios précédents N-1
|
$Rp = $tabRatiosNew[1]; // Ratios précédents N-1
|
||||||
$Rp2= $tabRatiosNew[2]; // Ratios précédents N-2
|
$Rp2 = $tabRatiosNew[2]; // Ratios précédents N-2
|
||||||
$Rp3= $tabRatiosNew[3]; // Ratios précédents N-3
|
$Rp3 = $tabRatiosNew[3]; // Ratios précédents N-3
|
||||||
$Rp4= $tabRatiosNew[4]; // Ratios précédents N-4
|
$Rp4 = $tabRatiosNew[4]; // Ratios précédents N-4
|
||||||
|
|
||||||
$Rdiff = $tabRatiosDiff[0];
|
$Rdiff = $tabRatiosDiff[0];
|
||||||
|
|
||||||
@ -1251,31 +1349,35 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
"insSIREN=$siren AND insEVE IN ('400','410','420','425','MPF','MNP') ORDER BY insDATEVE DESC",
|
"insSIREN=$siren AND insEVE IN ('400','410','420','425','MPF','MNP') ORDER BY insDATEVE DESC",
|
||||||
INDISCORE_DEBUG, MYSQL_ASSOC);
|
INDISCORE_DEBUG, MYSQL_ASSOC);
|
||||||
if (count($tabTmp)>0) {
|
if (count($tabTmp)>0) {
|
||||||
$tabModif=$tabTmp[0];
|
$tabModif = $tabTmp[0];
|
||||||
$ETATINSEE_MMAA=substr($tabModif['insDATEVE'],0,7);
|
$ETATINSEE_MMAA = substr($tabModif['insDATEVE'],0,7);
|
||||||
switch(''.$tabModif['insEVE']) {
|
switch(''.$tabModif['insEVE']) {
|
||||||
// Suppression d'un double
|
// Suppression d'un double
|
||||||
case '400':
|
case '400':
|
||||||
$ACTIFINSEE=false;
|
$ACTIFINSEE = false;
|
||||||
$ETATINSEE='SUPD';
|
$ETATINSEE = 'SUPD';
|
||||||
break;
|
break;
|
||||||
// Cessation juridique de l'entreprise
|
// Cessation juridique de l'entreprise
|
||||||
case '410':
|
case '410':
|
||||||
if (!$ACTIFINSEE) $ETATINSEE='JURF';
|
if (!$ACTIFINSEE) {
|
||||||
|
$ETATINSEE = 'JURF';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
// Absence d'activité de l'entreprise (cessation économique de l.entreprise)
|
// Absence d'activité de l'entreprise (cessation économique de l.entreprise)
|
||||||
case '420':
|
case '420':
|
||||||
// Absence d'activité d'une entreprise suite à une mise à jour au répertoire
|
// Absence d'activité d'une entreprise suite à une mise à jour au répertoire
|
||||||
case '425':
|
case '425':
|
||||||
if (!$ACTIFINSEE) $ETATINSEE='ECOF';
|
if (!$ACTIFINSEE) {
|
||||||
|
$ETATINSEE='ECOF';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
// Présumé Fermé
|
// Présumé Fermé
|
||||||
case 'MPF':
|
case 'MPF':
|
||||||
$ETATINSEE='PFER';
|
$ETATINSEE = 'PFER';
|
||||||
break;
|
break;
|
||||||
// NPAI
|
// NPAI
|
||||||
case 'MNP':
|
case 'MNP':
|
||||||
$ETATINSEE='NPAI';
|
$ETATINSEE = 'NPAI';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2033,7 +2135,8 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
$RJMERE=$RJFILLE=false;
|
$RJMERE=$RJFILLE=false;
|
||||||
$SITUACT=$NICMERE=$SIRENMERE=$SIRETMERE=$NOMMERE='';
|
$SITUACT=$NICMERE=$SIRENMERE=$SIRETMERE=$NOMMERE='';
|
||||||
|
|
||||||
$lienM = new Metier_Liens_Base($siren, 'siren');
|
$lienM = new Metier_Liens_Base();
|
||||||
|
$lienM->setId($siren, 'siren');
|
||||||
|
|
||||||
//Actionnaire
|
//Actionnaire
|
||||||
$tabA = $lienM->getActionnaires(null, true);
|
$tabA = $lienM->getActionnaires(null, true);
|
||||||
@ -2732,13 +2835,13 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
if ($tabTmp[0]['scoreConf'] !== null) {
|
if ($tabTmp[0]['scoreConf'] !== null) {
|
||||||
$SCORECONF = $tabTmp[0]['scoreConf'];
|
$SCORECONF = $tabTmp[0]['scoreConf'];
|
||||||
}
|
}
|
||||||
if ($SCORECONF>$ENQUETEMAXI) {
|
if ($SCORECONF > $ENQUETEMAXI) {
|
||||||
$SCORECONF = $ENQUETEMAXI;
|
$SCORECONF = $ENQUETEMAXI;
|
||||||
}
|
}
|
||||||
if ($tabTmp[0]['scoreDir'] !== null) {
|
if ($tabTmp[0]['scoreDir'] !== null) {
|
||||||
$SCOREDIRI = $tabTmp[0]['scoreDir'];
|
$SCOREDIRI = $tabTmp[0]['scoreDir'];
|
||||||
}
|
}
|
||||||
if ($SCOREDIRI>$ENQUETEMAXI) {
|
if ($SCOREDIRI > $ENQUETEMAXI) {
|
||||||
$SCOREDIRI = $ENQUETEMAXI;
|
$SCOREDIRI = $ENQUETEMAXI;
|
||||||
}
|
}
|
||||||
if ($tabTmp[0]['scoreSolv'] !== null) {
|
if ($tabTmp[0]['scoreSolv'] !== null) {
|
||||||
@ -2756,57 +2859,94 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- Commentaire Dirigeance
|
// --- Commentaire Dirigeance
|
||||||
if ($SCOREDIRI>=70) {
|
if ($SCOREDIRI >= 70) {
|
||||||
$analyseDir="L'étude de la dirigeance ne relève aucun problème.";
|
$analyseDir = "L'étude de la dirigeance ne relève aucun problème.";
|
||||||
} elseif ($SCOREDIRI>=40) {
|
} elseif ($SCOREDIRI >= 40) {
|
||||||
$analyseDir="L'étude de la dirigeance retient notre attention.";
|
$analyseDir = "L'étude de la dirigeance retient notre attention.";
|
||||||
} elseif ($SCOREDIRI>0) {
|
} elseif ($SCOREDIRI > 0) {
|
||||||
$analyseDir="L'étude de la dirigeance attire toute notre attention.";
|
$analyseDir = "L'étude de la dirigeance attire toute notre attention.";
|
||||||
} else {
|
} else {
|
||||||
$analyseDir="L'étude de la dirigeance révèle des anomalies.";
|
$analyseDir = "L'étude de la dirigeance révèle des anomalies.";
|
||||||
$SCOREDIRI=0;
|
$SCOREDIRI = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Commentaire Conformité
|
// --- Commentaire Conformité
|
||||||
if ($tabIdentite['SituationJuridique']=='P') {
|
if ($tabIdentite['SituationJuridique'] == 'P') {
|
||||||
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
||||||
$analyseConf = "L'entreprise est en procédure collective";
|
$analyseConf = "L'entreprise est en procédure collective";
|
||||||
} elseif ($tabIdentite['SituationJuridique']=='CL') {
|
}
|
||||||
|
elseif ($tabIdentite['SituationJuridique'] == 'CL') {
|
||||||
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
||||||
$analyseConf = "Cloture après la procédure";
|
$analyseConf = "Cloture après la procédure";
|
||||||
} elseif ($tabIdentite['SituationJuridique']=='D') {
|
}
|
||||||
|
elseif ($tabIdentite['SituationJuridique'] == 'D') {
|
||||||
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
||||||
$analyseConf = "L'entreprise est dissoute";
|
$analyseConf = "L'entreprise est dissoute";
|
||||||
} elseif ($tabIdentite['Actif']==0) {
|
}
|
||||||
|
elseif ($tabIdentite['SituationJuridique'] == 'A') {
|
||||||
|
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
||||||
|
$analyseConf = "L'entreprise est absorbée";
|
||||||
|
}
|
||||||
|
elseif ($tabIdentite['SituationJuridique'] == 'RR' && $FJUR1 != 1) {
|
||||||
|
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
||||||
|
$analyseConf = "L'entreprise est radiée";
|
||||||
|
}
|
||||||
|
elseif ($tabIdentite['Actif'] == 0) {
|
||||||
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
||||||
$analyseConf = "L'entreprise n'est pas en activité";
|
$analyseConf = "L'entreprise n'est pas en activité";
|
||||||
} elseif ($SCORECONF>=70) {
|
}
|
||||||
|
elseif ($SCORECONF >= 70) {
|
||||||
$analyseConf = "L'analyse de la conformité est correcte.";
|
$analyseConf = "L'analyse de la conformité est correcte.";
|
||||||
} elseif ($SCORECONF>=40) {
|
}
|
||||||
|
elseif ($SCORECONF >= 40) {
|
||||||
$analyseConf = "L'analyse de la conformité est acceptable.";
|
$analyseConf = "L'analyse de la conformité est acceptable.";
|
||||||
} elseif ($SCORECONF>0) {
|
}
|
||||||
|
elseif ($SCORECONF > 0) {
|
||||||
$analyseConf = "L'analyse de la conformité est sensible.";
|
$analyseConf = "L'analyse de la conformité est sensible.";
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$analyseConf = "L'analyse de la conformité est très sensible.";
|
$analyseConf = "L'analyse de la conformité est très sensible.";
|
||||||
$SCORECONF = 0;
|
$SCORECONF = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Commentaire Solvabilité
|
// --- Commentaire Solvabilité
|
||||||
if ($noteFin>0) $noteSolv=($noteStructure+$noteFin)/2;
|
if ($noteFin > 0) {
|
||||||
else $noteSolv=($noteStructure+$noteFin)/5;
|
$noteSolv = ($noteStructure+$noteFin)/2;
|
||||||
if ($noteSolv>=15) $analyseSolv = 'Excellente';
|
}
|
||||||
elseif ($noteSolv>=12) $analyseSolv = 'Bonne';
|
else {
|
||||||
elseif ($noteSolv>=10) $analyseSolv = 'Correcte';
|
$noteSolv = ($noteStructure+$noteFin)/5;
|
||||||
elseif ($noteSolv>=8) $analyseSolv = 'Moyenne';
|
}
|
||||||
elseif ($noteSolv>=6) $analyseSolv = 'Délicate';
|
if ($noteSolv >= 15) {
|
||||||
else $analyseSolv = 'Inquiétante';
|
$analyseSolv = 'Excellente';
|
||||||
if ($noteSolvabilite>=40 && $analyseSolv=='Inquiétante') $analyseSolv = 'Correcte';
|
}
|
||||||
|
elseif ($noteSolv >= 12) {
|
||||||
|
$analyseSolv = 'Bonne';
|
||||||
|
}
|
||||||
|
elseif ($noteSolv >= 10) {
|
||||||
|
$analyseSolv = 'Correcte';
|
||||||
|
}
|
||||||
|
elseif ($noteSolv >= 8) {
|
||||||
|
$analyseSolv = 'Moyenne';
|
||||||
|
}
|
||||||
|
elseif ($noteSolv >= 6) {
|
||||||
|
$analyseSolv = 'Délicate';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$analyseSolv = 'Inquiétante';
|
||||||
|
}
|
||||||
|
if ($noteSolvabilite >= 40 && $analyseSolv == 'Inquiétante') {
|
||||||
|
$analyseSolv = 'Correcte';
|
||||||
|
}
|
||||||
|
|
||||||
// --- CA Moyen par salarié pour un secteur donné
|
// --- CA Moyen par salarié pour un secteur donné
|
||||||
$CAESTIME = $iInsee->getCAnafEffectif($naf, $EFFECTIF);
|
$CAESTIME = $iInsee->getCAnafEffectif($naf, $EFFECTIF);
|
||||||
|
|
||||||
if ($CABILAN>0) $CABIOUES=$CABILAN;
|
if ($CABILAN > 0) {
|
||||||
else $CABIOUES=$CAESTIME;
|
$CABIOUES = $CABILAN;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$CABIOUES = $CAESTIME;
|
||||||
|
}
|
||||||
|
|
||||||
// L'encours de départ est à 10% du capital
|
// L'encours de départ est à 10% du capital
|
||||||
$encoursIni=$tabIdentite['Capital']/10;
|
$encoursIni=$tabIdentite['Capital']/10;
|
||||||
@ -2831,15 +2971,15 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
if ($encoursFP > $ENCOURS) {
|
if ($encoursFP > $ENCOURS) {
|
||||||
$ENCOURS=$encoursFP;
|
$ENCOURS=$encoursFP;
|
||||||
}
|
}
|
||||||
} elseif ($encoursTR>$ENCOURS) {
|
}
|
||||||
|
elseif ($encoursTR>$ENCOURS) {
|
||||||
$ENCOURS=$encoursTR;
|
$ENCOURS=$encoursTR;
|
||||||
}
|
}
|
||||||
} elseif (isset($tabBil[0])) {
|
}
|
||||||
|
elseif (isset($tabBil[0])) {
|
||||||
// SI BILAN : L'encours théorique de base est plafonnée au CA/36
|
// SI BILAN : L'encours théorique de base est plafonnée au CA/36
|
||||||
if ($tabBil[0]['CA']>0) $ENCOURS=(($tabBil[0]['CA'])/36);
|
if ($tabBil[0]['CA']>0) $ENCOURS=(($tabBil[0]['CA'])/36);
|
||||||
if ($encoursCS>$ENCOURS) $ENCOURS=$encoursCS;
|
if ($encoursCS>$ENCOURS) $ENCOURS=$encoursCS;
|
||||||
/** @todo Gérer les encours pour les sociétés avec CA ridicule et FP énormes **/
|
|
||||||
|
|
||||||
// Plafond à 25% des fonds propres ou à 1000 euros si FP<0
|
// Plafond à 25% des fonds propres ou à 1000 euros si FP<0
|
||||||
if ($tabBil[0]['FondsPr']>0) $plafond=$tabBil[0]['FondsPr']/4;
|
if ($tabBil[0]['FondsPr']>0) $plafond=$tabBil[0]['FondsPr']/4;
|
||||||
elseif ($R[63]>0) $plafond=$R[63]/12;
|
elseif ($R[63]>0) $plafond=$R[63]/12;
|
||||||
@ -2911,7 +3051,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
elseif ($noteSolvabilite >= 55) {
|
elseif ($noteSolvabilite >= 55) {
|
||||||
$plafond = 2000;
|
$plafond = 2000;
|
||||||
}
|
}
|
||||||
if ( $DELAIPAY > $DELAIPAYp && $DELAIPAYp > 0 && $DELAIPAY <= 90 ) {
|
if ($DELAIPAY > $DELAIPAYp && $DELAIPAYp > 0 && $DELAIPAY <= 90) {
|
||||||
$plafond = $plafond/2;
|
$plafond = $plafond/2;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -3013,8 +3153,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
}
|
}
|
||||||
if ($tendance=='') $tendance='Stable';
|
if ($tendance=='') $tendance='Stable';
|
||||||
|
|
||||||
/** Avis à 3 ans
|
/** Avis à 3 ans **/
|
||||||
**/
|
|
||||||
if ($noteSolvabilite>=50) {
|
if ($noteSolvabilite>=50) {
|
||||||
if ($valeurCCF>2160) $AVIS3ANS=true;
|
if ($valeurCCF>2160) $AVIS3ANS=true;
|
||||||
elseif($valeurCCF>0 && $valeurCCF<2160) $AVIS3ANS=false;
|
elseif($valeurCCF>0 && $valeurCCF<2160) $AVIS3ANS=false;
|
||||||
@ -3180,7 +3319,6 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
$RISQUEACT_NB = count($tabTmp);
|
$RISQUEACT_NB = count($tabTmp);
|
||||||
$RISQUEACT = array();
|
$RISQUEACT = array();
|
||||||
if ($RISQUEACT_NB > 0) {
|
if ($RISQUEACT_NB > 0) {
|
||||||
file_put_contents('test.log', print_r($tabTmp,1));
|
|
||||||
foreach ($tabTmp as $iTmp => $tabArret) {
|
foreach ($tabTmp as $iTmp => $tabArret) {
|
||||||
// Libellé risque lié à la l'activité de l'un des etablissements
|
// Libellé risque lié à la l'activité de l'un des etablissements
|
||||||
// "l'entreprise à au moins l'un de ses établissements figurant au registre francais des émissions polluantes"
|
// "l'entreprise à au moins l'un de ses établissements figurant au registre francais des émissions polluantes"
|
||||||
@ -3189,8 +3327,8 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
}
|
}
|
||||||
$RISQUEACT = array_unique($RISQUEACT);
|
$RISQUEACT = array_unique($RISQUEACT);
|
||||||
$RISQUEACT = implode(', ', $RISQUEACT);
|
$RISQUEACT = implode(', ', $RISQUEACT);
|
||||||
}*/
|
}
|
||||||
$timer['risquesPollu']=microtime(true);
|
$timer['risquesPollu']=microtime(true);*/
|
||||||
|
|
||||||
/** Bassin hydro : Le ou les libellés des bassins hydrographiques concernés
|
/** Bassin hydro : Le ou les libellés des bassins hydrographiques concernés
|
||||||
**/
|
**/
|
||||||
@ -3412,38 +3550,32 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
$CADTER_NB_NONPROP=0; // nombre de postes TERRAINS à l'adresse dont elle n'est pas propriétaire
|
$CADTER_NB_NONPROP=0; // nombre de postes TERRAINS à l'adresse dont elle n'est pas propriétaire
|
||||||
$CADBAT_SURF_TOT=0; // Surface totale des batiments du SIREN
|
$CADBAT_SURF_TOT=0; // Surface totale des batiments du SIREN
|
||||||
$CADTER_SURF_TOT=0; // Surface totale des terrains du SIREN
|
$CADTER_SURF_TOT=0; // Surface totale des terrains du SIREN
|
||||||
/**
|
$iCadastre = new Metier_Partenaires_MCadastre();
|
||||||
@todo
|
$iCadastre->setId($siren);
|
||||||
$CADBAT_SURF_CUM=0; // Cumul Surfaces des batiments à l'addresse
|
|
||||||
$CADTER_SURF_CUM=0; // Cumul Surfaces des terrains à l'addresse
|
|
||||||
*/
|
|
||||||
// Locaux
|
// Locaux
|
||||||
$iCadastre = new Metier_Partenaires_MCadastre($siren, $iDb);
|
$batimentP = $iCadastre->getSurfaceTotal('local');
|
||||||
$tabTmp = $iCadastre->getLocaux();
|
if (count($batimentP) > 0) {
|
||||||
if(count($tabTmp) > 0) {
|
$CADBAT_NB_PROP = $batimentP['itemTotal'];
|
||||||
foreach ($tabTmp as $iTmp => $cad) {
|
$CADBAT_SURF_TOT+= $batimentP['surfaceTotal'];
|
||||||
$CADBAT_NB_TOT++;
|
}
|
||||||
if ($cad['localDroit'] == 'P'){
|
$batimentL = $iCadastre->getSurfaceTotal('local', 'L');
|
||||||
$CADBAT_NB_PROP++;
|
if (count($batiment) > 0) {
|
||||||
}
|
$CADBAT_NB_NONPROP = $batimentL['itemTotal'];
|
||||||
else {
|
$CADBAT_SURF_TOT+= $batimentL['surfaceTotal'];
|
||||||
$CADBAT_NB_NONPROP++;
|
}
|
||||||
}
|
$CADBAT_NB_TOT = $CADBAT_NB_PROP + $CADBAT_NB_NONPROP;
|
||||||
$CADBAT_SURF_TOT+= $cad['localSurface'];
|
// Parcelles
|
||||||
}
|
$terrainP = $iCadastre->getSurfaceTotal('parcelle');
|
||||||
}
|
if (count($terrainP) > 0) {
|
||||||
// Parcelles
|
$CADTER_NB_PROP = $batimentP['itemTotal'];
|
||||||
$tabTmp = $iCadastre->getParcelles();
|
$CADTER_SURF_TOT+= $batimentP['surfaceTotal'];
|
||||||
foreach ($tabTmp as $iTmp => $cad) {
|
}
|
||||||
$CADTER_NB_TOT++;
|
$terrainL = $iCadastre->getSurfaceTotal('parcelle', 'L');
|
||||||
if ($cad['parcelDroit'] == 'P') {
|
if (count($terrainL) > 0) {
|
||||||
$CADTER_NB_PROP++;
|
$CADTER_NB_NONPROP = $batimentL['itemTotal'];
|
||||||
}
|
$CADTER_SURF_TOT+= $batimentL['surfaceTotal'];
|
||||||
else {
|
}
|
||||||
$CADTER_NB_NONPROP++;
|
$CADTER_NB_TOT = $CADTER_NB_PROP + $CADTER_NB_NONPROP;
|
||||||
}
|
|
||||||
$CADTER_SURF_TOT+= $cad['parcelSurface'];
|
|
||||||
}
|
|
||||||
$timer['cadastre'] = microtime(true);
|
$timer['cadastre'] = microtime(true);
|
||||||
|
|
||||||
/** RPS : Entreprise avec négociations ou accord sur les RPS ? **/
|
/** RPS : Entreprise avec négociations ou accord sur les RPS ? **/
|
||||||
@ -3511,10 +3643,12 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
$ANNONCEPC_NUM=$tabTmp[0]['numPC'];
|
$ANNONCEPC_NUM=$tabTmp[0]['numPC'];
|
||||||
|
|
||||||
/** Activite réglementée **/
|
/** Activite réglementée **/
|
||||||
$ACTIVREG='';
|
$ACTIVREG = '';
|
||||||
$tabTmp=$iInsee->getActivite($siren, $nic);
|
// Libellé de l'activité règlementé
|
||||||
if ($tabTmp)
|
$tabTmp = $iInsee->getActivite($siren, $nic);
|
||||||
$ACTIVREG=$tabTmp['libActivite']; // Libellé de l'activité règlementé
|
if ($tabTmp) {
|
||||||
|
$ACTIVREG = $tabTmp['libActivite'];
|
||||||
|
}
|
||||||
|
|
||||||
$NBSUIVICLI=0; // Nombre de clients suivants cette entreprise
|
$NBSUIVICLI=0; // Nombre de clients suivants cette entreprise
|
||||||
$NBSOCSEC=0; // Nombre de siren composants les ratios secteurs
|
$NBSOCSEC=0; // Nombre de siren composants les ratios secteurs
|
||||||
@ -3912,8 +4046,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- Scores identique au précedent, simple mise à jour
|
// --- Scores identique au précedent, simple mise à jour
|
||||||
if ($indiScore==$indiScorePre && $ENCOURS==$encoursPre && $dateScore<>0 )
|
if ($indiScore==$indiScorePre && $ENCOURS==$encoursPre && $dateScore<>0 ) {
|
||||||
{
|
|
||||||
$tabUpdate2 = array('sourceModif'=>$sourceModif, 'nbModifs'=>$nbModifs);
|
$tabUpdate2 = array('sourceModif'=>$sourceModif, 'nbModifs'=>$nbModifs);
|
||||||
if (!$iDb->update('jo.scores_surveillance', $tabUpdate2, "siren=$siren", false, 0, true)) {
|
if (!$iDb->update('jo.scores_surveillance', $tabUpdate2, "siren=$siren", false, 0, true)) {
|
||||||
Metier_Util_Log::write('W', 'Erreur lors de la MAJ du score en surveillance pour '. $tabIdentite['Nom'], __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
Metier_Util_Log::write('W', 'Erreur lors de la MAJ du score en surveillance pour '. $tabIdentite['Nom'], __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||||
|
@ -1094,31 +1094,35 @@ class Metier_Scores_MSolvabilite
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return Ambigous <number, multitype:number >
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getPtActivite()
|
public function getPtActivite()
|
||||||
{
|
{
|
||||||
if (strlen($this->naf)==4)
|
if (strlen($this->naf) == 4) {
|
||||||
if (isset($this->tabPtNaf[$this->naf]))
|
if (isset($this->tabPtNaf[$this->naf])) {
|
||||||
$nbPoints=$this->tabPtNaf[$this->naf];
|
$nbPoints = $this->tabPtNaf[$this->naf];
|
||||||
else
|
}
|
||||||
$nbPoints=5;
|
else {
|
||||||
elseif (strlen($this->naf)==5) {
|
$nbPoints = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (strlen($this->naf) == 5) {
|
||||||
$iCotation = new Metier_Scores_ICotation(array(), true, $this->iDb);
|
$iCotation = new Metier_Scores_ICotation(array(), true, $this->iDb);
|
||||||
//print_r($iCotation->tabNaf21);
|
|
||||||
//die();
|
|
||||||
if (isset($iCotation->tabNaf21[$this->naf])) {
|
if (isset($iCotation->tabNaf21[$this->naf])) {
|
||||||
$naf4=$iCotation->tabNaf21[$this->naf];
|
$naf4 = $iCotation->tabNaf21[$this->naf];
|
||||||
if (isset($this->tabPtNaf[$naf4]))
|
if (isset($this->tabPtNaf[$naf4])) {
|
||||||
$nbPoints=$this->tabPtNaf[$naf4];
|
$nbPoints = $this->tabPtNaf[$naf4];
|
||||||
else
|
}
|
||||||
$nbPoints=5;
|
else {
|
||||||
|
$nbPoints = 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$nbPoints=5;
|
$nbPoints = 5;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$nbPoints = 5;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
$nbPoints=5;
|
|
||||||
|
|
||||||
return $nbPoints;
|
return $nbPoints;
|
||||||
}
|
}
|
||||||
|
@ -173,14 +173,20 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
*/
|
*/
|
||||||
public function getIndiscoreCache($siren)
|
public function getIndiscoreCache($siren)
|
||||||
{
|
{
|
||||||
if ($siren<1000) return false;
|
if ($siren < 1000) {
|
||||||
$query="SELECT siren, actif, procol, naf, indiScore, indiScore20, encours, indiScoreDate, dateBilan, sourceModif, scoreSolv, scoreDir, scoreConf, scoreZ, scoreCH, scoreAfdcc1, scoreAfdcc2, scoreAfdcc2note, scoreAltman, scoreAltmanCote, scoreCCF, cs, csMoisMaj, csMoisFin, adresseDom, situFi, infoNote, noteStruct, noteFin, tendance, nbModifs, dateUpdate
|
return false;
|
||||||
FROM jo.scores_surveillance
|
}
|
||||||
WHERE siren=$siren
|
$query = "SELECT siren, actif, procol, naf, indiScore, indiScore20, encours, indiScoreDate,
|
||||||
ORDER BY indiScoreDate DESC";
|
dateBilan, sourceModif, scoreSolv, scoreDir, scoreConf, scoreZ, scoreCH, scoreAfdcc1,
|
||||||
$ret = $this->db->query($query);
|
scoreAfdcc2, scoreAfdcc2note, scoreAltman, scoreAltmanCote, scoreCCF, cs, csMoisMaj,
|
||||||
|
csMoisFin, adresseDom, situFi, infoNote, noteStruct, noteFin, tendance, nbModifs, dateUpdate
|
||||||
|
FROM jo.scores_surveillance
|
||||||
|
WHERE siren=$siren
|
||||||
|
ORDER BY indiScoreDate DESC";
|
||||||
|
$iDb = new Metier_Util_Db();
|
||||||
|
$ret = $iDb->query($query);
|
||||||
$tabRet = array();
|
$tabRet = array();
|
||||||
while( $ret = $this->db->fetch(MYSQL_ASSOC) ) {
|
while( $ret = $iDb->fetch(MYSQL_ASSOC) ) {
|
||||||
$tabRet[] = array (
|
$tabRet[] = array (
|
||||||
'siren' => $ret['siren'],
|
'siren' => $ret['siren'],
|
||||||
'actif' => $ret['actif'],
|
'actif' => $ret['actif'],
|
||||||
@ -227,12 +233,15 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
*/
|
*/
|
||||||
public function getScoreSecteur($naf5)
|
public function getScoreSecteur($naf5)
|
||||||
{
|
{
|
||||||
if (len($naf)<>5) return false;
|
if (len($naf) != 5) {
|
||||||
$tabTmp=$iDb->select('jo.scores_surveillance',
|
return false;
|
||||||
'naf, AVG(indiScore) AS score100moy, AVG(indiScore20) AS score20moy, AVG(encours) AS encoursMoy, MAX(indiScoreDate) AS lastScore, COUNT(siren) AS nbSiren',
|
}
|
||||||
|
$tabTmp = $iDb->select('jo.scores_surveillance',
|
||||||
|
'naf, AVG(indiScore) AS score100moy, AVG(indiScore20) AS score20moy,
|
||||||
|
AVG(encours) AS encoursMoy, MAX(indiScoreDate) AS lastScore, COUNT(siren) AS nbSiren',
|
||||||
"naf='$naf5' AND actif=1", false, MYSQL_ASSOC);
|
"naf='$naf5' AND actif=1", false, MYSQL_ASSOC);
|
||||||
if ( count($tabTmp)>0 ) {
|
if (count($tabTmp) > 0) {
|
||||||
$tabTmp=$tabTmp[0];
|
$tabTmp = $tabTmp[0];
|
||||||
return array(
|
return array(
|
||||||
'naf' => $tabTmp['naf'],
|
'naf' => $tabTmp['naf'],
|
||||||
'score100moy' => $tabTmp['score100moy'],
|
'score100moy' => $tabTmp['score100moy'],
|
||||||
@ -293,14 +302,18 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
if ($signe == '+') {
|
if ($signe == '+') {
|
||||||
if ($nombre > 0) {
|
if ($nombre > 0) {
|
||||||
return '+ '.number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
return '+ '.number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
} elseif ($nombre<0) {
|
}
|
||||||
|
elseif ($nombre < 0) {
|
||||||
return '- '.number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
return '- '.number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
return number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
}
|
}
|
||||||
} elseif ($signe=='!') {
|
}
|
||||||
|
elseif ($signe == '!') {
|
||||||
return number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
return number_format(abs($nombre),$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return number_format($nombre,$decimales,$sepDec,$sepMil).' '.$unite;
|
return number_format($nombre,$decimales,$sepDec,$sepMil).' '.$unite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -393,25 +406,29 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
if ( isset($this->tabVariables[$varLabel]) ) {
|
if ( isset($this->tabVariables[$varLabel]) ) {
|
||||||
if ($longeur > 0) {
|
if ($longeur > 0) {
|
||||||
return $var;
|
return $var;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// Tableau ZEMET
|
// Tableau ZEMET
|
||||||
if ($varLabel == 'ZEMET') {
|
if ($varLabel == 'ZEMET') {
|
||||||
if (substr($this->DateNotice80,0,4) >= 2010) {
|
if (substr($this->DateNotice80,0,4) >= 2010) {
|
||||||
$tableZemet = 'ZEMET2010';
|
$tableZemet = 'ZEMET2010';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$tableZemet = 'ZEMET1994';
|
$tableZemet = 'ZEMET1994';
|
||||||
}
|
}
|
||||||
// Cette variable a un libellé associé
|
// Cette variable a un libellé associé
|
||||||
if (isset($this->tabVariables[$tableZemet][$this->RPET.$this->ZEMET]['art'])) {
|
if (isset($this->tabVariables[$tableZemet][$this->RPET.$this->ZEMET]['art'])) {
|
||||||
return $this->tabVariables[$tableZemet][$this->RPET.$this->ZEMET]['art'];
|
return $this->tabVariables[$tableZemet][$this->RPET.$this->ZEMET]['art'];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return $this->tabVariables[$tableZemet][$this->RPET.$this->ZEMET]['lib'];
|
return $this->tabVariables[$tableZemet][$this->RPET.$this->ZEMET]['lib'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cette variable a un libellé associé
|
// Cette variable a un libellé associé
|
||||||
if (isset($this->tabVariables[$varLabel][$this->{$varValue}]['lib'])) {
|
if (isset($this->tabVariables[$varLabel][$this->{$varValue}]['lib'])) {
|
||||||
return $this->tabVariables[$varLabel][$this->{$varValue}]['lib'];
|
return $this->tabVariables[$varLabel][$this->{$varValue}]['lib'];
|
||||||
} elseif (isset($this->tabVariables[$varLabel]['0'.$this->{$varValue}]['lib'])) {
|
}
|
||||||
|
elseif (isset($this->tabVariables[$varLabel]['0'.$this->{$varValue}]['lib'])) {
|
||||||
return $this->tabVariables[$varLabel]['0'.$this->{$varValue}]['lib'];
|
return $this->tabVariables[$varLabel]['0'.$this->{$varValue}]['lib'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -442,17 +459,19 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
elseif (preg_match('/_EU$/', $varLabel)) {
|
elseif (preg_match('/_EU$/', $varLabel)) {
|
||||||
if ($this->{$varValue}>=0 && $this->{$varValue}<10 || $this->{$varValue}>-10 && $this->{$varValue}<=0) {
|
if ($this->{$varValue}>=0 && $this->{$varValue}<10 || $this->{$varValue}>-10 && $this->{$varValue}<=0) {
|
||||||
return number_format($this->{$varValue}, 2, ',', ' ').' €';
|
return number_format($this->{$varValue}, 2, ',', ' ').' €';
|
||||||
} elseif ($this->{$varValue}>=10 && $this->{$varValue}<5000 || $this->{$varValue}>-5000 && $this->{$varValue}<=10) {
|
}
|
||||||
|
elseif ($this->{$varValue}>=10 && $this->{$varValue}<5000 || $this->{$varValue}>-5000 && $this->{$varValue}<=10) {
|
||||||
return number_format($strTmp,0,',',' ').' €';
|
return number_format($strTmp,0,',',' ').' €';
|
||||||
} elseif ($this->{$varValue}<=-10000000 || $this->{$varValue}>=10000000) {
|
}
|
||||||
|
elseif ($this->{$varValue}<=-10000000 || $this->{$varValue}>=10000000) {
|
||||||
return number_format($this->{$varValue}/1000000, 0, ',', ' ').' M€';
|
return number_format($this->{$varValue}/1000000, 0, ',', ' ').' M€';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return number_format($this->{$varValue}/1000, 0, ',', ' ').' K€';
|
return number_format($this->{$varValue}/1000, 0, ',', ' ').' K€';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]_POURC
|
// --- Formattage variable [...]_POURC
|
||||||
elseif (preg_match('/_POURC$/', $varLabel)) {
|
elseif (preg_match('/_POURC$/', $varLabel)) {
|
||||||
$strTmp = eval("return $varValue;");
|
|
||||||
if ($this->{$varValue}>=10 || $this->{$varValue}<=-10)
|
if ($this->{$varValue}>=10 || $this->{$varValue}<=-10)
|
||||||
return number_format($this->{$varValue}, 0, ',', ' ').' %';
|
return number_format($this->{$varValue}, 0, ',', ' ').' %';
|
||||||
elseif ($this->{$varValue}>=1 || $this->{$varValue}<=-1)
|
elseif ($this->{$varValue}>=1 || $this->{$varValue}<=-1)
|
||||||
@ -495,16 +514,20 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
Metier_Util_Date::dateT('Ymd','d/m/Y', substr(str_replace('-','',$this->DCREN),0,8)));
|
Metier_Util_Date::dateT('Ymd','d/m/Y', substr(str_replace('-','',$this->DCREN),0,8)));
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]MARCHEVOL
|
// --- Formattage variable [...]MARCHEVOL
|
||||||
elseif (preg_match('/MARCHEVOL$/', $varLabel))
|
elseif (preg_match('/MARCHEVOL$/', $varLabel)) {
|
||||||
{
|
if (abs($MARCHEVOL)>=5) {
|
||||||
if (abs($MARCHEVOL)>=5) return round($MARCHEVOL).' %';
|
return round($MARCHEVOL).' %';
|
||||||
else return number_format($MARCHEVOL,3,',',' ').' %';
|
}
|
||||||
|
else {
|
||||||
|
return number_format($MARCHEVOL,3,',',' ').' %';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// --- Formattage variable [...]MARCHEPART
|
// --- Formattage variable [...]MARCHEPART
|
||||||
elseif (preg_match('/MARCHEPART$/', $varLabel)) {
|
elseif (preg_match('/MARCHEPART$/', $varLabel)) {
|
||||||
if (abs($this->MARCHEPART)>=5) {
|
if (abs($this->MARCHEPART)>=5) {
|
||||||
return round($this->MARCHEPART).' %';
|
return round($this->MARCHEPART).' %';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return number_format($this->MARCHEPART,3,',',' ').' %';
|
return number_format($this->MARCHEPART,3,',',' ').' %';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -512,7 +535,8 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
elseif (preg_match('/MARCHEPARTp$/', $varLabel)) {
|
elseif (preg_match('/MARCHEPARTp$/', $varLabel)) {
|
||||||
if (abs($this->MARCHEPARTp)>=5) {
|
if (abs($this->MARCHEPARTp)>=5) {
|
||||||
return round($this->MARCHEPARTp).' %';
|
return round($this->MARCHEPARTp).' %';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return number_format($this->MARCHEPARTp,3,',',' ').' %';
|
return number_format($this->MARCHEPARTp,3,',',' ').' %';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -520,7 +544,8 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
elseif (preg_match('/MARCHEPARTEVOL$/', $varLabel)) {
|
elseif (preg_match('/MARCHEPARTEVOL$/', $varLabel)) {
|
||||||
if (abs($this->MARCHEPARTEVOL) >= 5) {
|
if (abs($this->MARCHEPARTEVOL) >= 5) {
|
||||||
return round($this->MARCHEPARTEVOL).' %';
|
return round($this->MARCHEPARTEVOL).' %';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return number_format($this->MARCHEPARTEVOL,3,',',' ').' %';
|
return number_format($this->MARCHEPARTEVOL,3,',',' ').' %';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -528,11 +553,14 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
elseif (preg_match('/MARCHE$/', $varLabel)) {
|
elseif (preg_match('/MARCHE$/', $varLabel)) {
|
||||||
if ($this->MARCHE < 10000) {
|
if ($this->MARCHE < 10000) {
|
||||||
return number_format($MARCHE,0, ',', ' ').' €';
|
return number_format($MARCHE,0, ',', ' ').' €';
|
||||||
} elseif ($this->MARCHE < 1000000) {
|
}
|
||||||
|
elseif ($this->MARCHE < 1000000) {
|
||||||
return number_format($this->MARCHE / 1000, 0, ',', ' ').' K€';
|
return number_format($this->MARCHE / 1000, 0, ',', ' ').' K€';
|
||||||
} elseif ($this->MARCHE < 1000000000) {
|
}
|
||||||
|
elseif ($this->MARCHE < 1000000000) {
|
||||||
return number_format($this->MARCHE / 1000000, 0, ',', ' ').' M€';
|
return number_format($this->MARCHE / 1000000, 0, ',', ' ').' M€';
|
||||||
}else {
|
}
|
||||||
|
else {
|
||||||
return number_format($this->MARCHE / 1000000000, 0, ',', ' ')." milliards d'€";
|
return number_format($this->MARCHE / 1000000000, 0, ',', ' ')." milliards d'€";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -540,11 +568,14 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
elseif (preg_match('/MARCHEp$/', $varLabel)) {
|
elseif (preg_match('/MARCHEp$/', $varLabel)) {
|
||||||
if ($this->MARCHEp < 10000) {
|
if ($this->MARCHEp < 10000) {
|
||||||
return number_format($MARCHEp,0, ',', ' ').' €';
|
return number_format($MARCHEp,0, ',', ' ').' €';
|
||||||
} elseif ($this->MARCHEp < 1000000) {
|
}
|
||||||
|
elseif ($this->MARCHEp < 1000000) {
|
||||||
return number_format($this->MARCHEp / 1000, 0, ',', ' ').' K€';
|
return number_format($this->MARCHEp / 1000, 0, ',', ' ').' K€';
|
||||||
} elseif ($this->MARCHEp < 1000000000) {
|
}
|
||||||
|
elseif ($this->MARCHEp < 1000000000) {
|
||||||
return number_format($this->MARCHEp / 1000000, 0, ',', ' ').' M€';
|
return number_format($this->MARCHEp / 1000000, 0, ',', ' ').' M€';
|
||||||
}else {
|
}
|
||||||
|
else {
|
||||||
return number_format($this->MARCHEp / 1000000000, 0, ',', ' ')." milliards d'€";
|
return number_format($this->MARCHEp / 1000000000, 0, ',', ' ')." milliards d'€";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -558,7 +589,6 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
}
|
}
|
||||||
// --- Formattage variable [...]_MT || [...]_TAUX
|
// --- Formattage variable [...]_MT || [...]_TAUX
|
||||||
elseif (preg_match('/(_COEF|_TAUX)$/', $varLabel)) {
|
elseif (preg_match('/(_COEF|_TAUX)$/', $varLabel)) {
|
||||||
$strTmp=eval("return $varValue;");
|
|
||||||
return number_format($this->{$varValue}, 2, ',', '').' %';
|
return number_format($this->{$varValue}, 2, ',', '').' %';
|
||||||
}
|
}
|
||||||
// --- Formattage variable SIREN
|
// --- Formattage variable SIREN
|
||||||
@ -630,10 +660,18 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
$tmpAnnees = $matches2[2]*1;
|
$tmpAnnees = $matches2[2]*1;
|
||||||
$valeur = $this->R[$tmpRatioId];
|
$valeur = $this->R[$tmpRatioId];
|
||||||
for($iMoy=0; $iMoy<$tmpAnnees; $iMoy++) {
|
for($iMoy=0; $iMoy<$tmpAnnees; $iMoy++) {
|
||||||
if ($iMoy==1) $valeur+= $this->Rp[$tmpRatioId];
|
if ($iMoy==1) {
|
||||||
elseif ($iMoy==2) $valeur+= $this->Rp2[$tmpRatioId];
|
$valeur+= $this->Rp[$tmpRatioId];
|
||||||
elseif ($iMoy==3) $valeur+= $this->Rp3[$tmpRatioId];
|
}
|
||||||
elseif ($iMoy==4) $valeur+= $this->Rp4[$tmpRatioId];
|
elseif ($iMoy==2) {
|
||||||
|
$valeur+= $this->Rp2[$tmpRatioId];
|
||||||
|
}
|
||||||
|
elseif ($iMoy==3) {
|
||||||
|
$valeur+= $this->Rp3[$tmpRatioId];
|
||||||
|
}
|
||||||
|
elseif ($iMoy==4) {
|
||||||
|
$valeur+= $this->Rp4[$tmpRatioId];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return formatRatio('', $valeur/$tmpAnnees, strtoupper($this->tabFormulesRatios[$tmpRatioId]['unite']));
|
return formatRatio('', $valeur/$tmpAnnees, strtoupper($this->tabFormulesRatios[$tmpRatioId]['unite']));
|
||||||
}
|
}
|
||||||
@ -648,46 +686,65 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
$unite = strtoupper($this->tabFormulesRatios[$tmpRatioId]['unite']);
|
$unite = strtoupper($this->tabFormulesRatios[$tmpRatioId]['unite']);
|
||||||
if ($matches2[1]=='+') {
|
if ($matches2[1]=='+') {
|
||||||
$forceSigne='+';
|
$forceSigne='+';
|
||||||
} elseif ($matches2[1]=='!') {
|
}
|
||||||
|
elseif ($matches2[1]=='!') {
|
||||||
$forceSigne='!';
|
$forceSigne='!';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$forceSigne='';
|
$forceSigne='';
|
||||||
}
|
}
|
||||||
if ($tmpRatio=='R') {
|
if ($tmpRatio=='R') {
|
||||||
return formatRatio($this->R, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->R, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rp') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rp') {
|
||||||
return formatRatio($this->Rp, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rp, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rp2') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rp2') {
|
||||||
return formatRatio($this->Rp2, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rp2, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rp3') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rp3') {
|
||||||
return formatRatio($this->Rp3, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rp3, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rp4') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rp4') {
|
||||||
return formatRatio($this->Rp4, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rp4, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Ra') {
|
}
|
||||||
|
elseif ($tmpRatio=='Ra') {
|
||||||
return formatRatio($this->Ra, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Ra, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rap') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rap') {
|
||||||
return formatRatio($this->Rap, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rap, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rs') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rs') {
|
||||||
return formatRatio($this->Rs, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rs, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rsp') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rsp') {
|
||||||
return formatRatio($this->Rsp, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rsp, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rsp2') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rsp2') {
|
||||||
return formatRatio($this->Rsp2, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rsp2, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rsp3') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rsp3') {
|
||||||
return formatRatio($this->Rsp3, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rsp3, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rsp4') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rsp4') {
|
||||||
return formatRatio($this->Rsp4, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rsp4, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Revol') {
|
}
|
||||||
|
elseif ($tmpRatio=='Revol') {
|
||||||
return formatRatio($this->Revol, $tmpRatioId, '%', $forceSigne);
|
return formatRatio($this->Revol, $tmpRatioId, '%', $forceSigne);
|
||||||
} elseif ($tmpRatio=='Rdiff') {
|
}
|
||||||
|
elseif ($tmpRatio=='Rdiff') {
|
||||||
return formatRatio($this->Rdiff, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->Rdiff, $tmpRatioId, $unite, $forceSigne);
|
||||||
} elseif ($tmpRatio=='Revolp') {
|
}
|
||||||
|
elseif ($tmpRatio=='Revolp') {
|
||||||
return formatRatio($this->Revolp, $tmpRatioId, '%', $forceSigne);
|
return formatRatio($this->Revolp, $tmpRatioId, '%', $forceSigne);
|
||||||
} elseif ($tmpRatio=='Revolp2') {
|
}
|
||||||
|
elseif ($tmpRatio=='Revolp2') {
|
||||||
return formatRatio($this->Revolp2, $tmpRatioId, '%', $forceSigne);
|
return formatRatio($this->Revolp2, $tmpRatioId, '%', $forceSigne);
|
||||||
} elseif ($tmpRatio=='Revolp3') {
|
}
|
||||||
|
elseif ($tmpRatio=='Revolp3') {
|
||||||
return formatRatio($this->Revolp3, $tmpRatioId, '%', $forceSigne);
|
return formatRatio($this->Revolp3, $tmpRatioId, '%', $forceSigne);
|
||||||
} elseif ($tmpRatio=='regR') {
|
}
|
||||||
|
elseif ($tmpRatio=='regR') {
|
||||||
return formatRatio($this->regR, $tmpRatioId, $unite, $forceSigne);
|
return formatRatio($this->regR, $tmpRatioId, $unite, $forceSigne);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -787,15 +844,15 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
$this->SIREN = $siren;
|
$this->SIREN = $siren;
|
||||||
$this->SIRET = $tabIdentite['SiretSiege'];
|
$this->SIRET = $tabIdentite['SiretSiege'];
|
||||||
|
|
||||||
$this->ANNEE = date('Y')*1;
|
$this->ANNEE = date('Y')*1;
|
||||||
$this->ANNEEp3 = $this->ANNEE-3;
|
$this->ANNEEp3 = $this->ANNEE-3;
|
||||||
$this->ANNEEp2 = $this->ANNEE-2;
|
$this->ANNEEp2 = $this->ANNEE-2;
|
||||||
$this->ANNEEp = $this->ANNEE-1;
|
$this->ANNEEp = $this->ANNEE-1;
|
||||||
$this->ANNEE1 = $this->ANNEE+1;
|
$this->ANNEE1 = $this->ANNEE+1;
|
||||||
$this->ANNEE2 = $this->ANNEE+2;
|
$this->ANNEE2 = $this->ANNEE+2;
|
||||||
$this->ANNEE3 = $this->ANNEE+3;
|
$this->ANNEE3 = $this->ANNEE+3;
|
||||||
$this->ANNEE4 = $this->ANNEE+4;
|
$this->ANNEE4 = $this->ANNEE+4;
|
||||||
$this->ANNEE5 = $this->ANNEE+5;
|
$this->ANNEE5 = $this->ANNEE+5;
|
||||||
|
|
||||||
$this->JOUR_DATE = date('Y-m-d');
|
$this->JOUR_DATE = date('Y-m-d');
|
||||||
$this->JOUR_HEURE = date('H:i');
|
$this->JOUR_HEURE = date('H:i');
|
||||||
@ -1235,7 +1292,7 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
// Cessation juridique de l'entreprise
|
// Cessation juridique de l'entreprise
|
||||||
case '410':
|
case '410':
|
||||||
if (!$this->ACTIFINSEE) {
|
if (!$this->ACTIFINSEE) {
|
||||||
$this->ETATINSEE='JURF';
|
$this->ETATINSEE = 'JURF';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// Absence d'activité de l'entreprise (cessation économique de l.entreprise)
|
// Absence d'activité de l'entreprise (cessation économique de l.entreprise)
|
||||||
@ -1243,7 +1300,7 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
// Absence d'activité d'une entreprise suite à une mise à jour au répertoire
|
// Absence d'activité d'une entreprise suite à une mise à jour au répertoire
|
||||||
case '425':
|
case '425':
|
||||||
if (!$this->ACTIFINSEE) {
|
if (!$this->ACTIFINSEE) {
|
||||||
$this->ETATINSEE='ECOF';
|
$this->ETATINSEE = 'ECOF';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// Présumé Fermé
|
// Présumé Fermé
|
||||||
@ -2012,7 +2069,8 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
$this->RJMERE=$this->RJFILLE=false;
|
$this->RJMERE=$this->RJFILLE=false;
|
||||||
$this->SITUACT=$this->NICMERE=$this->SIRENMERE=$this->SIRETMERE=$this->NOMMERE='';
|
$this->SITUACT=$this->NICMERE=$this->SIRENMERE=$this->SIRETMERE=$this->NOMMERE='';
|
||||||
|
|
||||||
$lienM = new Metier_Liens_Base($siren, 'siren');
|
$lienM = new Metier_Liens_Base();
|
||||||
|
$lienM->setId($siren, 'siren');
|
||||||
|
|
||||||
// Actionnaire
|
// Actionnaire
|
||||||
$tabA = $lienM->getActionnaires(null, true);
|
$tabA = $lienM->getActionnaires(null, true);
|
||||||
@ -2386,7 +2444,7 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
$this->DIR2_TYPE='PP';
|
$this->DIR2_TYPE='PP';
|
||||||
}
|
}
|
||||||
|
|
||||||
$activeRechercheDir = false;
|
$activeRechercheDir = true;
|
||||||
if ($activeRechercheDir){
|
if ($activeRechercheDir){
|
||||||
$tabDir = $iInsee->rechercheDir($dir['Nom'], $dir['Prenom'], '', $dir['NaissDate'], '', 0, 200, 200);
|
$tabDir = $iInsee->rechercheDir($dir['Nom'], $dir['Prenom'], '', $dir['NaissDate'], '', 0, 200, 200);
|
||||||
$tabDir = $tabDir['reponses'];
|
$tabDir = $tabDir['reponses'];
|
||||||
@ -2695,7 +2753,7 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
$this->ENQUETE='';
|
$this->ENQUETE='';
|
||||||
if ($this->companyEvenDateStop === null) {
|
if ($this->companyEvenDateStop === null) {
|
||||||
$tabTmp = $this->db->select('jo.scores_cutoff',
|
$tabTmp = $this->db->select('jo.scores_cutoff',
|
||||||
'encours, scoreSolv, scoreDir, scoreConf, DATE(dateInsert)*1 AS dateInsert, DATE(dateUpdate)*1 AS dateUpdate',
|
'encours, scoreSolv, scoreDir, scoreConf, paiement, DATE(dateInsert)*1 AS dateInsert, DATE(dateUpdate)*1 AS dateUpdate',
|
||||||
"siren=$siren", $this->debug, MYSQL_ASSOC);
|
"siren=$siren", $this->debug, MYSQL_ASSOC);
|
||||||
$timer['scores_cutoff'] = microtime(true);
|
$timer['scores_cutoff'] = microtime(true);
|
||||||
if (count($tabTmp) > 0) {
|
if (count($tabTmp) > 0) {
|
||||||
@ -2706,6 +2764,8 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
}
|
}
|
||||||
// Si pas plus vieux que 6 mois
|
// Si pas plus vieux que 6 mois
|
||||||
if (Metier_Util_Date::nbMoisEntre($dateMaj, date('Ymd')) <= $this->ENQUETELIM) {
|
if (Metier_Util_Date::nbMoisEntre($dateMaj, date('Ymd')) <= $this->ENQUETELIM) {
|
||||||
|
$tabLibCS = $iFacto->getLibInfoCS($tabTmp[0]['paiement']);
|
||||||
|
$libInfoPaiement = $tabLibCS['LibCS'];
|
||||||
$encoursForce=$tabTmp[0]['encours'];
|
$encoursForce=$tabTmp[0]['encours'];
|
||||||
if ($tabTmp[0]['scoreConf'] !== null) {
|
if ($tabTmp[0]['scoreConf'] !== null) {
|
||||||
$this->SCORECONF = $tabTmp[0]['scoreConf'];
|
$this->SCORECONF = $tabTmp[0]['scoreConf'];
|
||||||
@ -2723,7 +2783,7 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
$this->ENQUETE = $noteSolvabilite = $tabTmp[0]['scoreSolv'];
|
$this->ENQUETE = $noteSolvabilite = $tabTmp[0]['scoreSolv'];
|
||||||
}
|
}
|
||||||
if ($this->ENQUETE > $this->ENQUETEMAXI) {
|
if ($this->ENQUETE > $this->ENQUETEMAXI) {
|
||||||
$this->ENQUETE=$this->ENQUETEMAXI;
|
$this->ENQUETE = $this->ENQUETEMAXI;
|
||||||
}
|
}
|
||||||
// Permet de supprimer la prise en compte de la procol
|
// Permet de supprimer la prise en compte de la procol
|
||||||
if ($this->ENQUETE > 0) {
|
if ($this->ENQUETE > 0) {
|
||||||
@ -2735,57 +2795,94 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- Commentaire Dirigeance
|
// --- Commentaire Dirigeance
|
||||||
if ($this->SCOREDIRI>=70) {
|
if ($this->SCOREDIRI >= 70) {
|
||||||
$analyseDir="L'étude de la dirigeance ne relève aucun problème.";
|
$analyseDir = "L'étude de la dirigeance ne relève aucun problème.";
|
||||||
} elseif ($this->SCOREDIRI>=40) {
|
} elseif ($this->SCOREDIRI >= 40) {
|
||||||
$analyseDir="L'étude de la dirigeance retient notre attention.";
|
$analyseDir = "L'étude de la dirigeance retient notre attention.";
|
||||||
} elseif ($this->SCOREDIRI>0) {
|
} elseif ($this->SCOREDIRI > 0) {
|
||||||
$analyseDir="L'étude de la dirigeance attire toute notre attention.";
|
$analyseDir = "L'étude de la dirigeance attire toute notre attention.";
|
||||||
} else {
|
} else {
|
||||||
$analyseDir="L'étude de la dirigeance révèle des anomalies.";
|
$analyseDir = "L'étude de la dirigeance révèle des anomalies.";
|
||||||
$this->SCOREDIRI=0;
|
$this->SCOREDIRI = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Commentaire Conformité
|
// --- Commentaire Conformité
|
||||||
if ($tabIdentite['SituationJuridique']=='P') {
|
if ($tabIdentite['SituationJuridique'] == 'P') {
|
||||||
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
||||||
$analyseConf = "L'entreprise est en procédure collective";
|
$analyseConf = "L'entreprise est en procédure collective";
|
||||||
} elseif ($tabIdentite['SituationJuridique']=='CL') {
|
}
|
||||||
$noteSolvabilite = $SCORECONF = $SCOREDIRI = 0;
|
elseif ($tabIdentite['SituationJuridique'] == 'CL') {
|
||||||
$analyseConf = "Cloture après la procédure";
|
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
||||||
} elseif ($tabIdentite['SituationJuridique']=='D') {
|
$analyseConf = "Cloture après la procédure";
|
||||||
|
}
|
||||||
|
elseif ($tabIdentite['SituationJuridique'] == 'D') {
|
||||||
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
||||||
$analyseConf = "L'entreprise est dissoute";
|
$analyseConf = "L'entreprise est dissoute";
|
||||||
} elseif ($tabIdentite['Actif']==0) {
|
}
|
||||||
|
elseif ($tabIdentite['SituationJuridique'] == 'A') {
|
||||||
|
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
||||||
|
$analyseConf = "L'entreprise est absorbée";
|
||||||
|
}
|
||||||
|
elseif ($tabIdentite['SituationJuridique'] == 'RR' && $this->FJUR1 != 1) {
|
||||||
|
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
||||||
|
$analyseConf = "L'entreprise est radiée";
|
||||||
|
}
|
||||||
|
elseif ($tabIdentite['Actif'] == 0) {
|
||||||
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
$noteSolvabilite = $this->SCORECONF = $this->SCOREDIRI = 0;
|
||||||
$analyseConf = "L'entreprise n'est pas en activité";
|
$analyseConf = "L'entreprise n'est pas en activité";
|
||||||
} elseif ($this->SCORECONF>=70) {
|
}
|
||||||
|
elseif ($this->SCORECONF >= 70) {
|
||||||
$analyseConf = "L'analyse de la conformité est correcte.";
|
$analyseConf = "L'analyse de la conformité est correcte.";
|
||||||
} elseif ($this->SCORECONF>=40) {
|
}
|
||||||
|
elseif ($this->SCORECONF >= 40) {
|
||||||
$analyseConf = "L'analyse de la conformité est acceptable.";
|
$analyseConf = "L'analyse de la conformité est acceptable.";
|
||||||
} elseif ($this->SCORECONF>0) {
|
}
|
||||||
|
elseif ($this->SCORECONF > 0) {
|
||||||
$analyseConf = "L'analyse de la conformité est sensible.";
|
$analyseConf = "L'analyse de la conformité est sensible.";
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$analyseConf = "L'analyse de la conformité est très sensible.";
|
$analyseConf = "L'analyse de la conformité est très sensible.";
|
||||||
$this->SCORECONF = 0;
|
$this->SCORECONF = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Commentaire Solvabilité
|
// --- Commentaire Solvabilité
|
||||||
if ($noteFin>0) $noteSolv=($noteStructure+$noteFin)/2;
|
if ($noteFin > 0) {
|
||||||
else $noteSolv=($noteStructure+$noteFin)/5;
|
$noteSolv = ($noteStructure+$noteFin)/2;
|
||||||
if ($noteSolv>=15) $analyseSolv = 'Excellente';
|
}
|
||||||
elseif ($noteSolv>=12) $analyseSolv = 'Bonne';
|
else {
|
||||||
elseif ($noteSolv>=10) $analyseSolv = 'Correcte';
|
$noteSolv = ($noteStructure+$noteFin)/5;
|
||||||
elseif ($noteSolv>=8) $analyseSolv = 'Moyenne';
|
}
|
||||||
elseif ($noteSolv>=6) $analyseSolv = 'Délicate';
|
if ($noteSolv >= 15) {
|
||||||
else $analyseSolv = 'Inquiétante';
|
$analyseSolv = 'Excellente';
|
||||||
if ($noteSolvabilite>=40 && $analyseSolv=='Inquiétante') $analyseSolv = 'Correcte';
|
}
|
||||||
|
elseif ($noteSolv >= 12) {
|
||||||
|
$analyseSolv = 'Bonne';
|
||||||
|
}
|
||||||
|
elseif ($noteSolv >= 10) {
|
||||||
|
$analyseSolv = 'Correcte';
|
||||||
|
}
|
||||||
|
elseif ($noteSolv >= 8) {
|
||||||
|
$analyseSolv = 'Moyenne';
|
||||||
|
}
|
||||||
|
elseif ($noteSolv >= 6) {
|
||||||
|
$analyseSolv = 'Délicate';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$analyseSolv = 'Inquiétante';
|
||||||
|
}
|
||||||
|
if ($noteSolvabilite >= 40 && $analyseSolv == 'Inquiétante') {
|
||||||
|
$analyseSolv = 'Correcte';
|
||||||
|
}
|
||||||
|
|
||||||
// --- CA Moyen par salarié pour un secteur donné
|
// --- CA Moyen par salarié pour un secteur donné
|
||||||
$this->CAESTIME = $iInsee->getCAnafEffectif($naf, $this->EFFECTIF);
|
$this->CAESTIME = $iInsee->getCAnafEffectif($naf, $this->EFFECTIF);
|
||||||
|
|
||||||
if ($this->CABILAN>0) $this->CABIOUES=$this->CABILAN;
|
if ($this->CABILAN > 0) {
|
||||||
else $this->CABIOUES=$this->CAESTIME;
|
$this->CABIOUES = $this->CABILAN;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->CABIOUES = $this->CAESTIME;
|
||||||
|
}
|
||||||
|
|
||||||
// L'encours de départ est à 10% du capital
|
// L'encours de départ est à 10% du capital
|
||||||
$encoursIni = $tabIdentite['Capital']/10;
|
$encoursIni = $tabIdentite['Capital']/10;
|
||||||
@ -2804,13 +2901,18 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
if ($noteSolvabilite>=40) {
|
if ($noteSolvabilite>=40) {
|
||||||
if ($this->HOLDING) {
|
if ($this->HOLDING) {
|
||||||
// Cas des Holding
|
// Cas des Holding
|
||||||
$this->ENCOURS=$tabIdentite['Capital']/12;
|
$this->ENCOURS = $tabIdentite['Capital'] / 12;
|
||||||
if (@$tabBil[0]['FondsPr']>0) {
|
if (@$tabBil[0]['FondsPr']>0) {
|
||||||
$encoursFP=(($tabBil[0]['FondsPr'])/72);
|
$encoursFP = $tabBil[0]['FondsPr'] / 72 ;
|
||||||
if ($encoursFP>$this->ENCOURS) $this->ENCOURS=$encoursFP;
|
if ($encoursFP > $this->ENCOURS) {
|
||||||
} elseif ($encoursTR>$this->ENCOURS) $this->ENCOURS=$encoursTR;
|
$this->ENCOURS=$encoursFP;
|
||||||
|
}
|
||||||
} elseif (isset($tabBil[0])) {
|
}
|
||||||
|
elseif ($encoursTR > $this->ENCOURS) {
|
||||||
|
$this->ENCOURS=$encoursTR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (isset($tabBil[0])) {
|
||||||
// SI BILAN : L'encours théorique de base est plafonnée au CA/36
|
// SI BILAN : L'encours théorique de base est plafonnée au CA/36
|
||||||
if ($tabBil[0]['CA']>0) $this->ENCOURS=(($tabBil[0]['CA'])/36);
|
if ($tabBil[0]['CA']>0) $this->ENCOURS=(($tabBil[0]['CA'])/36);
|
||||||
if ($encoursCS>$this->ENCOURS) $this->ENCOURS=$encoursCS;
|
if ($encoursCS>$this->ENCOURS) $this->ENCOURS=$encoursCS;
|
||||||
@ -2872,9 +2974,8 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
case 15:
|
case 15:
|
||||||
case 16:
|
case 16:
|
||||||
case 19:
|
case 19:
|
||||||
if ($this->ENCOURS == 0 && $this->ENCOURS <= 2000 && !$this->IMPAYE &&
|
if ($this->ENCOURS >= 0 && $this->ENCOURS <= 2000 && !$this->IMPAYE && !$this->PRIVILEGES && !$this->RISQUEGROUPE &&
|
||||||
!$this->PRIVILEGES && !$this->RISQUEGROUPE && !$this->DEFAUT &&
|
!$this->DEFAUT && !$this->LCASSUR && $this->CSFACTO != 50 && !$this->RISQUEIMPAYE) {
|
||||||
!$this->LCASSUR && $this->CSFACTO != 50 && !$this->RISQUEIMPAYE) {
|
|
||||||
$this->ENCOURS = $this->CAESTIME/36;
|
$this->ENCOURS = $this->CAESTIME/36;
|
||||||
if ($noteSolvabilite >= 50 && $this->AGE >= 120) {
|
if ($noteSolvabilite >= 50 && $this->AGE >= 120) {
|
||||||
$plafond = 7000;
|
$plafond = 7000;
|
||||||
@ -3152,13 +3253,15 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
'e.codecommune, e.nom, e.codesiret, e.idetab, r.idrejet, r.coderejet, r.libellerejet, r.codeouvragedepollution, r.codeentitehydro, r.nomstep, r.nommilieu',
|
'e.codecommune, e.nom, e.codesiret, e.idetab, r.idrejet, r.coderejet, r.libellerejet, r.codeouvragedepollution, r.codeentitehydro, r.nomstep, r.nommilieu',
|
||||||
"e.codesiret BETWEEN $sirenDeb AND $sirenFin AND e.idetab=r.idetab GROUP BY e.codesiret, r.libellerejet LIMIT 0,50", $this->debug, MYSQL_ASSOC);
|
"e.codesiret BETWEEN $sirenDeb AND $sirenFin AND e.idetab=r.idetab GROUP BY e.codesiret, r.libellerejet LIMIT 0,50", $this->debug, MYSQL_ASSOC);
|
||||||
// Nombre d'établissements concernés: neutraliser si >= 10
|
// Nombre d'établissements concernés: neutraliser si >= 10
|
||||||
$this->RISQUEACT_NB=count($tabTmp);
|
$this->RISQUEACT_NB = count($tabTmp);
|
||||||
$this->RISQUEACT=array();
|
$this->RISQUEACT = array();
|
||||||
foreach ($tabTmp as $iTmp=>$tabArret) {
|
if ($RISQUEACT_NB > 0) {
|
||||||
$this->RISQUEACT[]=$tabArret['libellerejet']; // Libellé risque lié à la l'activité de l'un des etablissements "l'entreprise à au moins l'un de ses établissements figurant au registre francais des émissions polluantes" (AIR, EAU ou et SOL)
|
foreach ($tabTmp as $iTmp=>$tabArret) {
|
||||||
|
$this->RISQUEACT[]=$tabArret['libellerejet']; // Libellé risque lié à la l'activité de l'un des etablissements "l'entreprise à au moins l'un de ses établissements figurant au registre francais des émissions polluantes" (AIR, EAU ou et SOL)
|
||||||
|
}
|
||||||
|
$this->RISQUEACT = array_unique($this->RISQUEACT);
|
||||||
|
$this->RISQUEACT = implode(', ', $this->RISQUEACT);
|
||||||
}
|
}
|
||||||
$this->RISQUEACT=array_unique($this->RISQUEACT);
|
|
||||||
$this->RISQUEACT=implode(', ', $this->RISQUEACT);
|
|
||||||
$timer['risquesPollu']=microtime(true);
|
$timer['risquesPollu']=microtime(true);
|
||||||
|
|
||||||
/** Bassin hydro : Le ou les libellés des bassins hydrographiques concernés
|
/** Bassin hydro : Le ou les libellés des bassins hydrographiques concernés
|
||||||
@ -3380,38 +3483,31 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
|||||||
$this->CADTER_NB_NONPROP=0; // nombre de postes TERRAINS à l'adresse dont elle n'est pas propriétaire
|
$this->CADTER_NB_NONPROP=0; // nombre de postes TERRAINS à l'adresse dont elle n'est pas propriétaire
|
||||||
$this->CADBAT_SURF_TOT=0; // Surface totale des batiments du SIREN
|
$this->CADBAT_SURF_TOT=0; // Surface totale des batiments du SIREN
|
||||||
$this->CADTER_SURF_TOT=0; // Surface totale des terrains du SIREN
|
$this->CADTER_SURF_TOT=0; // Surface totale des terrains du SIREN
|
||||||
/**
|
$iCadastre = new Metier_Partenaires_MCadastre($siren, $this-db);
|
||||||
@todo
|
|
||||||
$CADBAT_SURF_CUM=0; // Cumul Surfaces des batiments à l'addresse
|
|
||||||
$CADTER_SURF_CUM=0; // Cumul Surfaces des terrains à l'addresse
|
|
||||||
*/
|
|
||||||
// Locaux
|
// Locaux
|
||||||
$iCadastre = new Metier_Partenaires_MCadastre($siren, $this->db);
|
$batimentP = $iCadastre->getSurfaceTotal('local');
|
||||||
$tabTmp = $iCadastre->getLocaux();
|
if (count($batimentP) > 0) {
|
||||||
if(count($tabTmp) > 0) {
|
$this->CADBAT_NB_PROP = $batimentP['itemTotal'];
|
||||||
foreach ($tabTmp as $iTmp => $cad) {
|
$this->CADBAT_SURF_TOT+= $batimentP['surfaceTotal'];
|
||||||
$this->CADBAT_NB_TOT++;
|
|
||||||
if ($cad['localDroit'] == 'P'){
|
|
||||||
$this->CADBAT_NB_PROP++;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$this->CADBAT_NB_NONPROP++;
|
|
||||||
}
|
|
||||||
$this->CADBAT_SURF_TOT+= $cad['localSurface'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
$batimentL = $iCadastre->getSurfaceTotal('local', 'L');
|
||||||
|
if (count($batiment) > 0) {
|
||||||
|
$this->CADBAT_NB_NONPROP = $batimentL['itemTotal'];
|
||||||
|
$this->CADBAT_SURF_TOT+= $batimentL['surfaceTotal'];
|
||||||
|
}
|
||||||
|
$this->CADBAT_NB_TOT = $this->CADBAT_NB_PROP + $this->CADBAT_NB_NONPROP;
|
||||||
// Parcelles
|
// Parcelles
|
||||||
$tabTmp = $iCadastre->getParcelles();
|
$terrainP = $iCadastre->getSurfaceTotal('parcelle');
|
||||||
foreach ($tabTmp as $iTmp => $cad) {
|
if (count($terrainP) > 0) {
|
||||||
$this->CADTER_NB_TOT++;
|
$this->CADTER_NB_PROP = $batimentP['itemTotal'];
|
||||||
if ($cad['parcelDroit'] == 'P') {
|
$this->CADTER_SURF_TOT+= $batimentP['surfaceTotal'];
|
||||||
$this->CADTER_NB_PROP++;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$this->CADTER_NB_NONPROP++;
|
|
||||||
}
|
|
||||||
$this->CADTER_SURF_TOT+= $cad['parcelSurface'];
|
|
||||||
}
|
}
|
||||||
|
$terrainL = $iCadastre->getSurfaceTotal('parcelle', 'L');
|
||||||
|
if (count($terrainL) > 0) {
|
||||||
|
$this->CADTER_NB_NONPROP = $batimentL['itemTotal'];
|
||||||
|
$this->CADTER_SURF_TOT+= $batimentL['surfaceTotal'];
|
||||||
|
}
|
||||||
|
$this->CADTER_NB_TOT = $this->CADTER_NB_PROP + $this->CADTER_NB_NONPROP;
|
||||||
$timer['cadastre'] = microtime(true);
|
$timer['cadastre'] = microtime(true);
|
||||||
|
|
||||||
/** RPS : Entreprise avec négociations ou accord sur les RPS ? **/
|
/** RPS : Entreprise avec négociations ou accord sur les RPS ? **/
|
||||||
|
@ -630,13 +630,13 @@ class Metier_Sfr_Scoring
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Entreprise coté au CAC
|
//Entreprise coté au CAC
|
||||||
/*$this->ValIsCAC = 0;
|
$this->ValIsCAC = 0;
|
||||||
$liensM = new Metier_Liens_Base($siren, 'siren');
|
$liensM = new Metier_Liens_Base();
|
||||||
if ( $lienM->isInGroupeCAC40() ) {
|
$liensM->setId($siren, 'siren');
|
||||||
|
if ($liensM->isInGroupeCAC40()) {
|
||||||
$this->ValIsCAC = 1;
|
$this->ValIsCAC = 1;
|
||||||
}
|
}
|
||||||
if ($this->debug) file_put_contents('sfr.log', "CAC40 = ".$this->ValIsCAC."\n", FILE_APPEND);
|
if ($this->debug) file_put_contents('sfr.log', "CAC40 = ".$this->ValIsCAC."\n", FILE_APPEND);
|
||||||
*/
|
|
||||||
|
|
||||||
//Si Indiscore = null alors calcul
|
//Si Indiscore = null alors calcul
|
||||||
if ( $this->ValIndiscore === null ) {
|
if ( $this->ValIndiscore === null ) {
|
||||||
|
@ -38,8 +38,8 @@ return array(
|
|||||||
'ANGOUG' => array('nom'=>"TGI ANGOULEME", 'siret'=>"17330111000073", 'dep'=>"16"),
|
'ANGOUG' => array('nom'=>"TGI ANGOULEME", 'siret'=>"17330111000073", 'dep'=>"16"),
|
||||||
'ANNECA' => array('nom'=>"PREFECTURE D'ANNECY", 'siret'=>"17740001700014", 'dep'=>"74"),
|
'ANNECA' => array('nom'=>"PREFECTURE D'ANNECY", 'siret'=>"17740001700014", 'dep'=>"74"),
|
||||||
'ANNECG' => array('nom'=>"TGIcc ANNECY", 'siret'=>"17730111600063", 'dep'=>"74"),
|
'ANNECG' => array('nom'=>"TGIcc ANNECY", 'siret'=>"17730111600063", 'dep'=>"74"),
|
||||||
'ANNONC' => array('nom'=>"TC ANNONAY", 'siret'=>"17300111600024", 'dep'=>"71"),
|
'ANNONC' => array('nom'=>"TC ANNONAY", 'siret'=>"17300111600024", 'dep'=>"07"),
|
||||||
'ANTIBC' => array('nom'=>"TC ANTIBES", 'siret'=>"17130111200669", 'dep'=>"66"),
|
'ANTIBC' => array('nom'=>"TC ANTIBES", 'siret'=>"17130111200669", 'dep'=>"06"),
|
||||||
'ANTONB' => array('nom'=>"SOUS PREFECTURE D'ANTONY", 'siret'=>"17920001900059", 'dep'=>"92"),
|
'ANTONB' => array('nom'=>"SOUS PREFECTURE D'ANTONY", 'siret'=>"17920001900059", 'dep'=>"92"),
|
||||||
'APTB' => array('nom'=>"SOUS PREFECTURE D'APT", 'siret'=>"17840001600030", 'dep'=>"84"),
|
'APTB' => array('nom'=>"SOUS PREFECTURE D'APT", 'siret'=>"17840001600030", 'dep'=>"84"),
|
||||||
'ARGELB' => array('nom'=>"SOUS PREFECTURE D'ARGELES GAZOST", 'siret'=>"17650001500035", 'dep'=>"65"),
|
'ARGELB' => array('nom'=>"SOUS PREFECTURE D'ARGELES GAZOST", 'siret'=>"17650001500035", 'dep'=>"65"),
|
||||||
@ -52,7 +52,7 @@ return array(
|
|||||||
'ARRASA' => array('nom'=>"PREFECTURE D'ARRAS", 'siret'=>"17620001200019", 'dep'=>"62"),
|
'ARRASA' => array('nom'=>"PREFECTURE D'ARRAS", 'siret'=>"17620001200019", 'dep'=>"62"),
|
||||||
'ARRASC' => array('nom'=>"TC ARRAS", 'siret'=>"17590111500543", 'dep'=>"62"),
|
'ARRASC' => array('nom'=>"TC ARRAS", 'siret'=>"17590111500543", 'dep'=>"62"),
|
||||||
'ARRASG' => array('nom'=>"TGI ARRAS", 'siret'=>"17590111500535", 'dep'=>"62"),
|
'ARRASG' => array('nom'=>"TGI ARRAS", 'siret'=>"17590111500535", 'dep'=>"62"),
|
||||||
'AUBENC' => array('nom'=>"TC AUBENAS", 'siret'=>"17300111600032", 'dep'=>"72"),
|
'AUBENC' => array('nom'=>"TC AUBENAS", 'siret'=>"17300111600032", 'dep'=>"07"),
|
||||||
'AUBUSB' => array('nom'=>"SOUS PREFECTURE D'AUBUSSON", 'siret'=>"17230001400021", 'dep'=>"23"),
|
'AUBUSB' => array('nom'=>"SOUS PREFECTURE D'AUBUSSON", 'siret'=>"17230001400021", 'dep'=>"23"),
|
||||||
'AUCHA' => array('nom'=>"PREFECTURE D'AUCH", 'siret'=>"17320001500019", 'dep'=>"32"),
|
'AUCHA' => array('nom'=>"PREFECTURE D'AUCH", 'siret'=>"17320001500019", 'dep'=>"32"),
|
||||||
'AUCHC' => array('nom'=>"TC AUCH", 'siret'=>"17470111000101", 'dep'=>"32"),
|
'AUCHC' => array('nom'=>"TC AUCH", 'siret'=>"17470111000101", 'dep'=>"32"),
|
||||||
@ -76,7 +76,7 @@ return array(
|
|||||||
'AVRAB' => array('nom'=>"SOUS PREFECTURE D'AVRANCHES", 'siret'=>"17500001700046", 'dep'=>"50"),
|
'AVRAB' => array('nom'=>"SOUS PREFECTURE D'AVRANCHES", 'siret'=>"17500001700046", 'dep'=>"50"),
|
||||||
'BAGNEB' => array('nom'=>"SOUS PREFECTURE DE BAGNERES DE BIGORRE", 'siret'=>"17650001500027", 'dep'=>"65"),
|
'BAGNEB' => array('nom'=>"SOUS PREFECTURE DE BAGNERES DE BIGORRE", 'siret'=>"17650001500027", 'dep'=>"65"),
|
||||||
'BAGNEC' => array('nom'=>"TC BAGNERES DE BIGORRE", 'siret'=>"17640111500108", 'dep'=>"65"),
|
'BAGNEC' => array('nom'=>"TC BAGNERES DE BIGORRE", 'siret'=>"17640111500108", 'dep'=>"65"),
|
||||||
'BARCEB' => array('nom'=>"SOUS PREFECTURE DE BARCELONNETTE", 'siret'=>"17040001400040", 'dep'=>"44"),
|
'BARCEB' => array('nom'=>"SOUS PREFECTURE DE BARCELONNETTE", 'siret'=>"17040001400040", 'dep'=>"04"),
|
||||||
'BARLDA' => array('nom'=>"PREFECTURE DE BAR LE DUC", 'siret'=>"17550001600019", 'dep'=>"55"),
|
'BARLDA' => array('nom'=>"PREFECTURE DE BAR LE DUC", 'siret'=>"17550001600019", 'dep'=>"55"),
|
||||||
'BARLDC' => array('nom'=>"TC BAR LE DUC", 'siret'=>"17540111600462", 'dep'=>"55"),
|
'BARLDC' => array('nom'=>"TC BAR LE DUC", 'siret'=>"17540111600462", 'dep'=>"55"),
|
||||||
'BARLDG' => array('nom'=>"TGI BAR LE DUC", 'siret'=>"17540111600298", 'dep'=>"55"),
|
'BARLDG' => array('nom'=>"TGI BAR LE DUC", 'siret'=>"17540111600298", 'dep'=>"55"),
|
||||||
@ -101,8 +101,8 @@ return array(
|
|||||||
'BELFOC' => array('nom'=>"TC BELFORT", 'siret'=>"17250111600484", 'dep'=>"90"),
|
'BELFOC' => array('nom'=>"TC BELFORT", 'siret'=>"17250111600484", 'dep'=>"90"),
|
||||||
'BELFOG' => array('nom'=>"TGI BELFORT", 'siret'=>"17250111600146", 'dep'=>"90"),
|
'BELFOG' => array('nom'=>"TGI BELFORT", 'siret'=>"17250111600146", 'dep'=>"90"),
|
||||||
'BELLAB' => array('nom'=>"SOUS PREFECTURE DE BELLAC", 'siret'=>"17870001900023", 'dep'=>"87"),
|
'BELLAB' => array('nom'=>"SOUS PREFECTURE DE BELLAC", 'siret'=>"17870001900023", 'dep'=>"87"),
|
||||||
'BELLEB' => array('nom'=>"SOUS PREFECTURE DE BELLEY", 'siret'=>"17010001000025", 'dep'=>"13"),
|
'BELLEB' => array('nom'=>"SOUS PREFECTURE DE BELLEY", 'siret'=>"17010001000025", 'dep'=>"01"),
|
||||||
'BELLEG' => array('nom'=>"TGIcc BELLEY", 'siret'=>"17690111400023", 'dep'=>"13"),
|
'BELLEG' => array('nom'=>"TGIcc BELLEY", 'siret'=>"17690111400023", 'dep'=>"01"),
|
||||||
'BERGEB' => array('nom'=>"SOUS PREFECTURE DE BERGERAC", 'siret'=>"17240001200081", 'dep'=>"24"),
|
'BERGEB' => array('nom'=>"SOUS PREFECTURE DE BERGERAC", 'siret'=>"17240001200081", 'dep'=>"24"),
|
||||||
'BERGEC' => array('nom'=>"TC BERGERAC", 'siret'=>"17330111000230", 'dep'=>"24"),
|
'BERGEC' => array('nom'=>"TC BERGERAC", 'siret'=>"17330111000230", 'dep'=>"24"),
|
||||||
'BERGEG' => array('nom'=>"TGI BERGERAC", 'siret'=>"17330111000214", 'dep'=>"24"),
|
'BERGEG' => array('nom'=>"TGI BERGERAC", 'siret'=>"17330111000214", 'dep'=>"24"),
|
||||||
@ -138,9 +138,9 @@ return array(
|
|||||||
'BOULOB' => array('nom'=>"SOUS PREFECTURE DE BOULOGNE SUR MER", 'siret'=>"17620001200035", 'dep'=>"62"),
|
'BOULOB' => array('nom'=>"SOUS PREFECTURE DE BOULOGNE SUR MER", 'siret'=>"17620001200035", 'dep'=>"62"),
|
||||||
'BOULOC' => array('nom'=>"TC BOULOGNE SUR MER", 'siret'=>"17590111500758", 'dep'=>"62"),
|
'BOULOC' => array('nom'=>"TC BOULOGNE SUR MER", 'siret'=>"17590111500758", 'dep'=>"62"),
|
||||||
'BOULOG' => array('nom'=>"TGI BOULOGNE SUR MER", 'siret'=>"17590111500097", 'dep'=>"62"),
|
'BOULOG' => array('nom'=>"TGI BOULOGNE SUR MER", 'siret'=>"17590111500097", 'dep'=>"62"),
|
||||||
'BOURGA' => array('nom'=>"PREFECTURE DE BOURG EN BRESSE", 'siret'=>"17010001000017", 'dep'=>"10"),
|
'BOURGA' => array('nom'=>"PREFECTURE DE BOURG EN BRESSE", 'siret'=>"17010001000017", 'dep'=>"01"),
|
||||||
'BOURGC' => array('nom'=>"TC BOURG EN BRESSE", 'siret'=>"17690111400445", 'dep'=>"10"),
|
'BOURGC' => array('nom'=>"TC BOURG EN BRESSE", 'siret'=>"17690111400445", 'dep'=>"01"),
|
||||||
'BOURGG' => array('nom'=>"TGI BOURG EN BRESSE", 'siret'=>"17690111400080", 'dep'=>"10"),
|
'BOURGG' => array('nom'=>"TGI BOURG EN BRESSE", 'siret'=>"17690111400080", 'dep'=>"01"),
|
||||||
'BRESSB' => array('nom'=>"SOUS PREFECTURE DE BRESSUIRE", 'siret'=>"17790001600060", 'dep'=>"79"),
|
'BRESSB' => array('nom'=>"SOUS PREFECTURE DE BRESSUIRE", 'siret'=>"17790001600060", 'dep'=>"79"),
|
||||||
'BRESSG' => array('nom'=>"TGIcc BRESSUIRE", 'siret'=>"17860111800106", 'dep'=>"79"),
|
'BRESSG' => array('nom'=>"TGIcc BRESSUIRE", 'siret'=>"17860111800106", 'dep'=>"79"),
|
||||||
'BRESTB' => array('nom'=>"SOUS PREFECTURE DE BREST", 'siret'=>"17290001100054", 'dep'=>"29"),
|
'BRESTB' => array('nom'=>"SOUS PREFECTURE DE BREST", 'siret'=>"17290001100054", 'dep'=>"29"),
|
||||||
@ -149,7 +149,7 @@ return array(
|
|||||||
'BRGESA' => array('nom'=>"PREFECTURE DE BOURGES", 'siret'=>"17180001400010", 'dep'=>"18"),
|
'BRGESA' => array('nom'=>"PREFECTURE DE BOURGES", 'siret'=>"17180001400010", 'dep'=>"18"),
|
||||||
'BRGESC' => array('nom'=>"TC BOURGES", 'siret'=>"17180111100179", 'dep'=>"18"),
|
'BRGESC' => array('nom'=>"TC BOURGES", 'siret'=>"17180111100179", 'dep'=>"18"),
|
||||||
'BRGESG' => array('nom'=>"TGI BOURGES", 'siret'=>"17180111100062", 'dep'=>"18"),
|
'BRGESG' => array('nom'=>"TGI BOURGES", 'siret'=>"17180111100062", 'dep'=>"18"),
|
||||||
'BRIANB' => array('nom'=>"SOUS PREFECTURE DE BRIANCON", 'siret'=>"17050001100037", 'dep'=>"51"),
|
'BRIANB' => array('nom'=>"SOUS PREFECTURE DE BRIANCON", 'siret'=>"17050001100037", 'dep'=>"05"),
|
||||||
'BRIEYB' => array('nom'=>"SOUS PREFECTURE DE BRIEY", 'siret'=>"17540001900055", 'dep'=>"54"),
|
'BRIEYB' => array('nom'=>"SOUS PREFECTURE DE BRIEY", 'siret'=>"17540001900055", 'dep'=>"54"),
|
||||||
'BRIEYC' => array('nom'=>"TC BRIEY", 'siret'=>"17540111600041", 'dep'=>"54"),
|
'BRIEYC' => array('nom'=>"TC BRIEY", 'siret'=>"17540111600041", 'dep'=>"54"),
|
||||||
'BRIEYG' => array('nom'=>"TGI BRIEY", 'siret'=>"17540111600058", 'dep'=>"54"),
|
'BRIEYG' => array('nom'=>"TGI BRIEY", 'siret'=>"17540111600058", 'dep'=>"54"),
|
||||||
@ -172,14 +172,14 @@ return array(
|
|||||||
'CAMBRB' => array('nom'=>"SOUS PREFECTURE DE CAMBRAI", 'siret'=>"17590001800052", 'dep'=>"59"),
|
'CAMBRB' => array('nom'=>"SOUS PREFECTURE DE CAMBRAI", 'siret'=>"17590001800052", 'dep'=>"59"),
|
||||||
'CAMBRC' => array('nom'=>"TC CAMBRAI", 'siret'=>"17590111500923", 'dep'=>"59"),
|
'CAMBRC' => array('nom'=>"TC CAMBRAI", 'siret'=>"17590111500923", 'dep'=>"59"),
|
||||||
'CAMBRG' => array('nom'=>"TGI CAMBRAI", 'siret'=>"17590111500931", 'dep'=>"59"),
|
'CAMBRG' => array('nom'=>"TGI CAMBRAI", 'siret'=>"17590111500931", 'dep'=>"59"),
|
||||||
'CANNEC' => array('nom'=>"TC CANNES", 'siret'=>"17130111200701", 'dep'=>"64"),
|
'CANNEC' => array('nom'=>"TC CANNES", 'siret'=>"17130111200701", 'dep'=>"06"),
|
||||||
'CARCAA' => array('nom'=>"PREFECTURE DE CARCASSONNE", 'siret'=>"17110001900016", 'dep'=>"11"),
|
'CARCAA' => array('nom'=>"PREFECTURE DE CARCASSONNE", 'siret'=>"17110001900016", 'dep'=>"11"),
|
||||||
'CARCAC' => array('nom'=>"TC CARCASSONNE", 'siret'=>"17340111800661", 'dep'=>"11"),
|
'CARCAC' => array('nom'=>"TC CARCASSONNE", 'siret'=>"17340111800661", 'dep'=>"11"),
|
||||||
'CARCAG' => array('nom'=>"TGI CARCASSONNE", 'siret'=>"17340111800513", 'dep'=>"11"),
|
'CARCAG' => array('nom'=>"TGI CARCASSONNE", 'siret'=>"17340111800513", 'dep'=>"11"),
|
||||||
'CARPEB' => array('nom'=>"SOUS PREFECTURE DE CARPENTRAS", 'siret'=>"17840001600055", 'dep'=>"84"),
|
'CARPEB' => array('nom'=>"SOUS PREFECTURE DE CARPENTRAS", 'siret'=>"17840001600055", 'dep'=>"84"),
|
||||||
'CARPEG' => array('nom'=>"TGIcc CARPENTRAS", 'siret'=>"17300111600206", 'dep'=>"84"),
|
'CARPEG' => array('nom'=>"TGIcc CARPENTRAS", 'siret'=>"17300111600206", 'dep'=>"84"),
|
||||||
'CASTEC' => array('nom'=>"TC CASTELNAUDARY", 'siret'=>"173401118", 'dep'=>"11"),
|
'CASTEC' => array('nom'=>"TC CASTELNAUDARY", 'siret'=>"173401118", 'dep'=>"11"),
|
||||||
'CASTEB' => array('nom'=>"SOUS PREFECTURE DE CASTELLANE", 'siret'=>"17040001400024", 'dep'=>"41"),
|
'CASTEB' => array('nom'=>"SOUS PREFECTURE DE CASTELLANE", 'siret'=>"17040001400024", 'dep'=>"04"),
|
||||||
'CASTRB' => array('nom'=>"SOUS PREFECTURE DE CASTRES", 'siret'=>"17810001200024", 'dep'=>"81"),
|
'CASTRB' => array('nom'=>"SOUS PREFECTURE DE CASTRES", 'siret'=>"17810001200024", 'dep'=>"81"),
|
||||||
'CASTRC' => array('nom'=>"TC CASTRES", 'siret'=>"17310111400069", 'dep'=>"81"),
|
'CASTRC' => array('nom'=>"TC CASTRES", 'siret'=>"17310111400069", 'dep'=>"81"),
|
||||||
'CASTRG' => array('nom'=>"TGI CASTRES", 'siret'=>"17310111400291", 'dep'=>"81"),
|
'CASTRG' => array('nom'=>"TGI CASTRES", 'siret'=>"17310111400291", 'dep'=>"81"),
|
||||||
@ -210,11 +210,11 @@ return array(
|
|||||||
'CHATIC' => array('nom'=>"TC CHATILLON SUR SEINE", 'siret'=>"17210111500340", 'dep'=>"21"),
|
'CHATIC' => array('nom'=>"TC CHATILLON SUR SEINE", 'siret'=>"17210111500340", 'dep'=>"21"),
|
||||||
'CHATEB' => array('nom'=>"SOUS PREFECTURE DE CHATEAULIN", 'siret'=>"17290001100047", 'dep'=>"29"),
|
'CHATEB' => array('nom'=>"SOUS PREFECTURE DE CHATEAULIN", 'siret'=>"17290001100047", 'dep'=>"29"),
|
||||||
'CHATSB' => array('nom'=>"SOUS PREFECTURE DE CHATEAU SALINS", 'siret'=>"17570001200081", 'dep'=>"57"),
|
'CHATSB' => array('nom'=>"SOUS PREFECTURE DE CHATEAU SALINS", 'siret'=>"17570001200081", 'dep'=>"57"),
|
||||||
'CHATTB' => array('nom'=>"SOUS PREFECTURE DE CHATEAU THIERRY", 'siret'=>"17020001800027", 'dep'=>"24"),
|
'CHATTB' => array('nom'=>"SOUS PREFECTURE DE CHATEAU THIERRY", 'siret'=>"17020001800027", 'dep'=>"02"),
|
||||||
'CHAUMA' => array('nom'=>"PREFECTURE DE CHAUMONT", 'siret'=>"17520001300019", 'dep'=>"52"),
|
'CHAUMA' => array('nom'=>"PREFECTURE DE CHAUMONT", 'siret'=>"17520001300019", 'dep'=>"52"),
|
||||||
'CHAUMC' => array('nom'=>"TC CHAUMONT", 'siret'=>"17210111500159", 'dep'=>"52"),
|
'CHAUMC' => array('nom'=>"TC CHAUMONT", 'siret'=>"17210111500159", 'dep'=>"52"),
|
||||||
'CHAUMG' => array('nom'=>"TGI CHAUMONT", 'siret'=>"17210111500142", 'dep'=>"52"),
|
'CHAUMG' => array('nom'=>"TGI CHAUMONT", 'siret'=>"17210111500142", 'dep'=>"52"),
|
||||||
'CHAUNC' => array('nom'=>"TC CHAUNY", 'siret'=>"17800111100040", 'dep'=>"23"),
|
'CHAUNC' => array('nom'=>"TC CHAUNY", 'siret'=>"17800111100040", 'dep'=>"02"),
|
||||||
'CHERBB' => array('nom'=>"SOUS PREFECTURE DE CHERBOURG", 'siret'=>"17500001700061", 'dep'=>"50"),
|
'CHERBB' => array('nom'=>"SOUS PREFECTURE DE CHERBOURG", 'siret'=>"17500001700061", 'dep'=>"50"),
|
||||||
'CHERBC' => array('nom'=>"TC CHERBOURG", 'siret'=>"17140111000118", 'dep'=>"50"),
|
'CHERBC' => array('nom'=>"TC CHERBOURG", 'siret'=>"17140111000118", 'dep'=>"50"),
|
||||||
'CHERBG' => array('nom'=>"TGI CHERBOURG", 'siret'=>"17140111000027", 'dep'=>"50"),
|
'CHERBG' => array('nom'=>"TGI CHERBOURG", 'siret'=>"17140111000027", 'dep'=>"50"),
|
||||||
@ -222,9 +222,9 @@ return array(
|
|||||||
'CHLONA' => array('nom'=>"PREFECTURE DE CHALONS SUR MARNE / EN CHAMPAGNE", 'siret'=>"17510001500015", 'dep'=>"51"),
|
'CHLONA' => array('nom'=>"PREFECTURE DE CHALONS SUR MARNE / EN CHAMPAGNE", 'siret'=>"17510001500015", 'dep'=>"51"),
|
||||||
'CHLONC' => array('nom'=>"TC CHALONS EN CHAMPAGNE", 'siret'=>"17510111200035", 'dep'=>"51"),
|
'CHLONC' => array('nom'=>"TC CHALONS EN CHAMPAGNE", 'siret'=>"17510111200035", 'dep'=>"51"),
|
||||||
'CHLONG' => array('nom'=>"TGI CHALONS EN CHAMPAGNE", 'siret'=>"17510111200068", 'dep'=>"51"),
|
'CHLONG' => array('nom'=>"TGI CHALONS EN CHAMPAGNE", 'siret'=>"17510111200068", 'dep'=>"51"),
|
||||||
'CHARLA' => array('nom'=>"PREFECTURE DE CHARLEVILLE-MEZIERES", 'siret'=>"17080001500019", 'dep'=>"80"),
|
'CHARLA' => array('nom'=>"PREFECTURE DE CHARLEVILLE-MEZIERES", 'siret'=>"17080001500019", 'dep'=>"08"),
|
||||||
'CHMEZC' => array('nom'=>"TC CHARLEVILLE MEZIERES", 'siret'=>"17510111200134", 'dep'=>"80"),
|
'CHMEZC' => array('nom'=>"TC CHARLEVILLE MEZIERES", 'siret'=>"17510111200134", 'dep'=>"08"),
|
||||||
'CHMEZG' => array('nom'=>"TGI CHARLEVILLE-MEZIERES", 'siret'=>"17510111200126", 'dep'=>"80"),
|
'CHMEZG' => array('nom'=>"TGI CHARLEVILLE-MEZIERES", 'siret'=>"17510111200126", 'dep'=>"08"),
|
||||||
'CHOLEB' => array('nom'=>"SOUS PREFECTURE DE CHOLET", 'siret'=>"17490001900020", 'dep'=>"49"),
|
'CHOLEB' => array('nom'=>"SOUS PREFECTURE DE CHOLET", 'siret'=>"17490001900020", 'dep'=>"49"),
|
||||||
'CHTLTB' => array('nom'=>"SOUS PREFECTURE DE CHATELLERAULT", 'siret'=>"17860001100039", 'dep'=>"86"),
|
'CHTLTB' => array('nom'=>"SOUS PREFECTURE DE CHATELLERAULT", 'siret'=>"17860001100039", 'dep'=>"86"),
|
||||||
'CHTLTC' => array('nom'=>"TC CHATELLERAULT", 'siret'=>"17860111800569", 'dep'=>"86"),
|
'CHTLTC' => array('nom'=>"TC CHATELLERAULT", 'siret'=>"17860111800569", 'dep'=>"86"),
|
||||||
@ -258,8 +258,8 @@ return array(
|
|||||||
'CRETEC' => array('nom'=>"TC CRETEIL", 'siret'=>"177501111", 'dep'=>"94"),
|
'CRETEC' => array('nom'=>"TC CRETEIL", 'siret'=>"177501111", 'dep'=>"94"),
|
||||||
'CRETEG' => array('nom'=>"TGI CRETEIL", 'siret'=>"17750111100641", 'dep'=>"94"),
|
'CRETEG' => array('nom'=>"TGI CRETEIL", 'siret'=>"17750111100641", 'dep'=>"94"),
|
||||||
'CREUSC' => array('nom'=>"TC LE CREUSOT", 'siret'=>"17210111500308", 'dep'=>"71"),
|
'CREUSC' => array('nom'=>"TC LE CREUSOT", 'siret'=>"17210111500308", 'dep'=>"71"),
|
||||||
'CUSSEC' => array('nom'=>"TC CUSSET", 'siret'=>"17630111700113", 'dep'=>"33"),
|
'CUSSEC' => array('nom'=>"TC CUSSET", 'siret'=>"17630111700113", 'dep'=>"03"),
|
||||||
'CUSSEG' => array('nom'=>"TGI CUSSET", 'siret'=>"17630111700063", 'dep'=>"33"),
|
'CUSSEG' => array('nom'=>"TGI CUSSET", 'siret'=>"17630111700063", 'dep'=>"03"),
|
||||||
'DAXB' => array('nom'=>"SOUS PREFECTURE DE DAX", 'siret'=>"17400001800047", 'dep'=>"40"),
|
'DAXB' => array('nom'=>"SOUS PREFECTURE DE DAX", 'siret'=>"17400001800047", 'dep'=>"40"),
|
||||||
'DAXC' => array('nom'=>"TC DAX", 'siret'=>"176401115", 'dep'=>"40"),
|
'DAXC' => array('nom'=>"TC DAX", 'siret'=>"176401115", 'dep'=>"40"),
|
||||||
'DAXG' => array('nom'=>"TGI DAX", 'siret'=>"17640111500264", 'dep'=>"40"),
|
'DAXG' => array('nom'=>"TGI DAX", 'siret'=>"17640111500264", 'dep'=>"40"),
|
||||||
@ -268,8 +268,8 @@ return array(
|
|||||||
'DIEPPB' => array('nom'=>"SOUS PREFECTURE DE DIEPPE", 'siret'=>"17760001200021", 'dep'=>"76"),
|
'DIEPPB' => array('nom'=>"SOUS PREFECTURE DE DIEPPE", 'siret'=>"17760001200021", 'dep'=>"76"),
|
||||||
'DIEPPC' => array('nom'=>"TC DIEPPE", 'siret'=>"17760111900098", 'dep'=>"76"),
|
'DIEPPC' => array('nom'=>"TC DIEPPE", 'siret'=>"17760111900098", 'dep'=>"76"),
|
||||||
'DIEPPG' => array('nom'=>"TGI DIEPPE", 'siret'=>"17760111900023", 'dep'=>"76"),
|
'DIEPPG' => array('nom'=>"TGI DIEPPE", 'siret'=>"17760111900023", 'dep'=>"76"),
|
||||||
'DIGNEA' => array('nom'=>"PREFECTURE DE DIGNE", 'siret'=>"17040001400016", 'dep'=>"40"),
|
'DIGNEA' => array('nom'=>"PREFECTURE DE DIGNE", 'siret'=>"17040001400016", 'dep'=>"04"),
|
||||||
'DIGNEG' => array('nom'=>"TGI DIGNE", 'siret'=>"17130111200297", 'dep'=>"40"),
|
'DIGNEG' => array('nom'=>"TGI DIGNE", 'siret'=>"17130111200297", 'dep'=>"04"),
|
||||||
'DIJONA' => array('nom'=>"PREFECTURE DE DIJON", 'siret'=>"17210001800016", 'dep'=>"21"),
|
'DIJONA' => array('nom'=>"PREFECTURE DE DIJON", 'siret'=>"17210001800016", 'dep'=>"21"),
|
||||||
'DIJONC' => array('nom'=>"TC DIJON", 'siret'=>"17210111500498", 'dep'=>"21"),
|
'DIJONC' => array('nom'=>"TC DIJON", 'siret'=>"17210111500498", 'dep'=>"21"),
|
||||||
'DIJONG' => array('nom'=>"TGI DIJON", 'siret'=>"17210111500480", 'dep'=>"21"),
|
'DIJONG' => array('nom'=>"TGI DIJON", 'siret'=>"17210111500480", 'dep'=>"21"),
|
||||||
@ -309,29 +309,29 @@ return array(
|
|||||||
'FIGEAB' => array('nom'=>"SOUS PREFECTURE DE FIGEAC", 'siret'=>"17460001500047", 'dep'=>"46"),
|
'FIGEAB' => array('nom'=>"SOUS PREFECTURE DE FIGEAC", 'siret'=>"17460001500047", 'dep'=>"46"),
|
||||||
'FLERSC' => array('nom'=>"TC FLERS", 'siret'=>"", 'dep'=>"61"),
|
'FLERSC' => array('nom'=>"TC FLERS", 'siret'=>"", 'dep'=>"61"),
|
||||||
'FLORAB' => array('nom'=>"SOUS PREFECTURE DE FLORAC", 'siret'=>"", 'dep'=>"48"),
|
'FLORAB' => array('nom'=>"SOUS PREFECTURE DE FLORAC", 'siret'=>"", 'dep'=>"48"),
|
||||||
'FOIXA' => array('nom'=>"PREFECTURE DE FOIX", 'siret'=>"17090001300013", 'dep'=>"90"),
|
'FOIXA' => array('nom'=>"PREFECTURE DE FOIX", 'siret'=>"17090001300013", 'dep'=>"09"),
|
||||||
'FOIXC' => array('nom'=>"TC FOIX", 'siret'=>"17310111400374", 'dep'=>"90"),
|
'FOIXC' => array('nom'=>"TC FOIX", 'siret'=>"17310111400374", 'dep'=>"09"),
|
||||||
'FOIXG' => array('nom'=>"TGI FOIX", 'siret'=>"17310111400150", 'dep'=>"90"),
|
'FOIXG' => array('nom'=>"TGI FOIX", 'siret'=>"17310111400150", 'dep'=>"09"),
|
||||||
'FONTB' => array('nom'=>"SOUS PREFECTURE DE FONTAINEBLEAU", 'siret'=>"17770001000081", 'dep'=>"77"),
|
'FONTB' => array('nom'=>"SOUS PREFECTURE DE FONTAINEBLEAU", 'siret'=>"17770001000081", 'dep'=>"77"),
|
||||||
'FONTEB' => array('nom'=>"SOUS PREFECTURE DE FONTENAY LE COMTE", 'siret'=>"17850001300036", 'dep'=>"85"),
|
'FONTEB' => array('nom'=>"SOUS PREFECTURE DE FONTENAY LE COMTE", 'siret'=>"17850001300036", 'dep'=>"85"),
|
||||||
'FONTG' => array('nom'=>"TGI FONTAINEBLEAU", 'siret'=>"17750111100922", 'dep'=>"77"),
|
'FONTG' => array('nom'=>"TGI FONTAINEBLEAU", 'siret'=>"17750111100922", 'dep'=>"77"),
|
||||||
'FORBAB' => array('nom'=>"SOUS PREFECTURE DE FORBACH", 'siret'=>"17570001200107", 'dep'=>"57"),
|
'FORBAB' => array('nom'=>"SOUS PREFECTURE DE FORBACH", 'siret'=>"17570001200107", 'dep'=>"57"),
|
||||||
'FORCAB' => array('nom'=>"SOUS PREFECTURE DE FORCALQUIER", 'siret'=>"17040001400032", 'dep'=>"43"),
|
'FORCAB' => array('nom'=>"SOUS PREFECTURE DE FORCALQUIER", 'siret'=>"17040001400032", 'dep'=>"04"),
|
||||||
'FORTFA' => array('nom'=>"PREFECTURE DE FORT DE FRANCE", 'siret'=>"17972001600015", 'dep'=>"972"),
|
'FORTFA' => array('nom'=>"PREFECTURE DE FORT DE FRANCE", 'siret'=>"17972001600015", 'dep'=>"972"),
|
||||||
'FORTFG' => array('nom'=>"TGI FORT DE FRANCE", 'siret'=>"17972111300118", 'dep'=>"972"),
|
'FORTFG' => array('nom'=>"TGI FORT DE FRANCE", 'siret'=>"17972111300118", 'dep'=>"972"),
|
||||||
'FORTFM' => array('nom'=>"TMX FORT DE FRANCE", 'siret'=>"17972111300142", 'dep'=>"972"),
|
'FORTFM' => array('nom'=>"TMX FORT DE FRANCE", 'siret'=>"17972111300142", 'dep'=>"972"),
|
||||||
'FOUGEB' => array('nom'=>"SOUS PREFECTURE DE FOUGERES", 'siret'=>"17350001800044", 'dep'=>"35"),
|
'FOUGEB' => array('nom'=>"SOUS PREFECTURE DE FOUGERES", 'siret'=>"17350001800044", 'dep'=>"35"),
|
||||||
'FREJUC' => array('nom'=>"TC FREJUS", 'siret'=>"17130111200594", 'dep'=>"83"),
|
'FREJUC' => array('nom'=>"TC FREJUS", 'siret'=>"17130111200594", 'dep'=>"83"),
|
||||||
'GAPA' => array('nom'=>"PREFECTURE DE GAP", 'siret'=>"17050001100011", 'dep'=>"50"),
|
'GAPA' => array('nom'=>"PREFECTURE DE GAP", 'siret'=>"17050001100011", 'dep'=>"05"),
|
||||||
'GAPC' => array('nom'=>"TC GAP", 'siret'=>"17380111900269", 'dep'=>"50"),
|
'GAPC' => array('nom'=>"TC GAP", 'siret'=>"17380111900269", 'dep'=>"05"),
|
||||||
'GAPG' => array('nom'=>"TGI GAP", 'siret'=>"17380111900277", 'dep'=>"50"),
|
'GAPG' => array('nom'=>"TGI GAP", 'siret'=>"17380111900277", 'dep'=>"05"),
|
||||||
'GEXB' => array('nom'=>"SOUS PREFECTURE DE GEX", 'siret'=>"17010001000033", 'dep'=>"11"),
|
'GEXB' => array('nom'=>"SOUS PREFECTURE DE GEX", 'siret'=>"17010001000033", 'dep'=>"01"),
|
||||||
'GOURDB' => array('nom'=>"SOUS PREFECTURE DE GOURDON", 'siret'=>"17460001500039", 'dep'=>"46"),
|
'GOURDB' => array('nom'=>"SOUS PREFECTURE DE GOURDON", 'siret'=>"17460001500039", 'dep'=>"46"),
|
||||||
'GOURNC' => array('nom'=>"TC GOURNAY EN BRAY", 'siret'=>"", 'dep'=>"76"),
|
'GOURNC' => array('nom'=>"TC GOURNAY EN BRAY", 'siret'=>"", 'dep'=>"76"),
|
||||||
'GRANVC' => array('nom'=>"TC GRANVILLE", 'siret'=>"", 'dep'=>"50"),
|
'GRANVC' => array('nom'=>"TC GRANVILLE", 'siret'=>"", 'dep'=>"50"),
|
||||||
'GRASSB' => array('nom'=>"SOUS PREFECTURE DE GRASSE", 'siret'=>"17060001900054", 'dep'=>"61"),
|
'GRASSB' => array('nom'=>"SOUS PREFECTURE DE GRASSE", 'siret'=>"17060001900054", 'dep'=>"06"),
|
||||||
'GRASSC' => array('nom'=>"TC GRASSE", 'siret'=>"17130111200404", 'dep'=>"61"),
|
'GRASSC' => array('nom'=>"TC GRASSE", 'siret'=>"17130111200404", 'dep'=>"06"),
|
||||||
'GRASSG' => array('nom'=>"TGI GRASSE", 'siret'=>"17130111200651", 'dep'=>"61"),
|
'GRASSG' => array('nom'=>"TGI GRASSE", 'siret'=>"17130111200651", 'dep'=>"06"),
|
||||||
'GRAYC' => array('nom'=>"TC GRAY", 'siret'=>"17250111600294", 'dep'=>"70"),
|
'GRAYC' => array('nom'=>"TC GRAY", 'siret'=>"17250111600294", 'dep'=>"70"),
|
||||||
'GRENOA' => array('nom'=>"PREFECTURE DE GRENOBLE", 'siret'=>"17380001200010", 'dep'=>"38"),
|
'GRENOA' => array('nom'=>"PREFECTURE DE GRENOBLE", 'siret'=>"17380001200010", 'dep'=>"38"),
|
||||||
'GRENOC' => array('nom'=>"TC GRENOBLE", 'siret'=>"17380111900129", 'dep'=>"38"),
|
'GRENOC' => array('nom'=>"TC GRENOBLE", 'siret'=>"17380111900129", 'dep'=>"38"),
|
||||||
@ -363,9 +363,9 @@ return array(
|
|||||||
'LANGRB' => array('nom'=>"SOUS PREFECTURE DE LANGRES", 'siret'=>"17520001300035", 'dep'=>"52"),
|
'LANGRB' => array('nom'=>"SOUS PREFECTURE DE LANGRES", 'siret'=>"17520001300035", 'dep'=>"52"),
|
||||||
'LANGRC' => array('nom'=>"TC LANGRES", 'siret'=>"", 'dep'=>"52"),
|
'LANGRC' => array('nom'=>"TC LANGRES", 'siret'=>"", 'dep'=>"52"),
|
||||||
'LANNIB' => array('nom'=>"SOUS PREFECTURE DE LANNION", 'siret'=>"17220001600043", 'dep'=>"22"),
|
'LANNIB' => array('nom'=>"SOUS PREFECTURE DE LANNION", 'siret'=>"17220001600043", 'dep'=>"22"),
|
||||||
'LAONA' => array('nom'=>"PREFECTURE DE LAON", 'siret'=>"17020001800019", 'dep'=>"20"),
|
'LAONA' => array('nom'=>"PREFECTURE DE LAON", 'siret'=>"17020001800019", 'dep'=>"02"),
|
||||||
'LAONG' => array('nom'=>"TGI LAON", 'siret'=>"17800111100248", 'dep'=>"20"),
|
'LAONG' => array('nom'=>"TGI LAON", 'siret'=>"17800111100248", 'dep'=>"02"),
|
||||||
'LARGEB' => array('nom'=>"SOUS PREFECTURE DE LARGENTIERE", 'siret'=>"17070001700032", 'dep'=>"71"),
|
'LARGEB' => array('nom'=>"SOUS PREFECTURE DE LARGENTIERE", 'siret'=>"17070001700032", 'dep'=>"07"),
|
||||||
'LATOUB' => array('nom'=>"SOUS PREFECTURE DE LA TOUR DU PIN", 'siret'=>"17380001200028", 'dep'=>"38"),
|
'LATOUB' => array('nom'=>"SOUS PREFECTURE DE LA TOUR DU PIN", 'siret'=>"17380001200028", 'dep'=>"38"),
|
||||||
'LATRIB' => array('nom'=>"SOUS PREFECTURE DE LA TRINITE", 'siret'=>"17972001600031", 'dep'=>"972"),
|
'LATRIB' => array('nom'=>"SOUS PREFECTURE DE LA TRINITE", 'siret'=>"17972001600031", 'dep'=>"972"),
|
||||||
'LAVALA' => array('nom'=>"PREFECTURE DE LAVAL", 'siret'=>"17530001100053", 'dep'=>"53"),
|
'LAVALA' => array('nom'=>"PREFECTURE DE LAVAL", 'siret'=>"17530001100053", 'dep'=>"53"),
|
||||||
@ -423,7 +423,7 @@ return array(
|
|||||||
'MAMOUA' => array('nom'=>"PREFECTURE DE MAYOTTE", 'siret'=>"13000334600017", 'dep'=>"976"),
|
'MAMOUA' => array('nom'=>"PREFECTURE DE MAYOTTE", 'siret'=>"13000334600017", 'dep'=>"976"),
|
||||||
'MAMOUP' => array('nom'=>"TPI MAMOUDZOU", 'siret'=>"130003395", 'dep'=>"976"),
|
'MAMOUP' => array('nom'=>"TPI MAMOUDZOU", 'siret'=>"130003395", 'dep'=>"976"),
|
||||||
'MAMOUS' => array('nom'=>"TSA MAMOUDZOU", 'siret'=>"13000339500014", 'dep'=>"976"),
|
'MAMOUS' => array('nom'=>"TSA MAMOUDZOU", 'siret'=>"13000339500014", 'dep'=>"976"),
|
||||||
'MANOSC' => array('nom'=>"TC MANOSQUE", 'siret'=>"17130111200255", 'dep'=>"41"),
|
'MANOSC' => array('nom'=>"TC MANOSQUE", 'siret'=>"17130111200255", 'dep'=>"04"),
|
||||||
'MANSA' => array('nom'=>"PREFECTURE DU MANS", 'siret'=>"17720001100019", 'dep'=>"72"),
|
'MANSA' => array('nom'=>"PREFECTURE DU MANS", 'siret'=>"17720001100019", 'dep'=>"72"),
|
||||||
'MANSC' => array('nom'=>"TC LE MANS", 'siret'=>"17490111600031", 'dep'=>"72"),
|
'MANSC' => array('nom'=>"TC LE MANS", 'siret'=>"17490111600031", 'dep'=>"72"),
|
||||||
'MANSG' => array('nom'=>"TGI LE MANS", 'siret'=>"17490111600049", 'dep'=>"72"),
|
'MANSG' => array('nom'=>"TGI LE MANS", 'siret'=>"17490111600049", 'dep'=>"72"),
|
||||||
@ -447,7 +447,7 @@ return array(
|
|||||||
'MENDEA' => array('nom'=>"PREFECTURE DE MENDE", 'siret'=>"17480001100010", 'dep'=>"48"),
|
'MENDEA' => array('nom'=>"PREFECTURE DE MENDE", 'siret'=>"17480001100010", 'dep'=>"48"),
|
||||||
'MENDEC' => array('nom'=>"TC MENDE", 'siret'=>"17300111600131", 'dep'=>"48"),
|
'MENDEC' => array('nom'=>"TC MENDE", 'siret'=>"17300111600131", 'dep'=>"48"),
|
||||||
'MENDEG' => array('nom'=>"TGIcc MENDE", 'siret'=>"17300111600131", 'dep'=>"48"),
|
'MENDEG' => array('nom'=>"TGIcc MENDE", 'siret'=>"17300111600131", 'dep'=>"48"),
|
||||||
'MENTOC' => array('nom'=>"TC MENTON", 'siret'=>"17130111200396", 'dep'=>"65"),
|
'MENTOC' => array('nom'=>"TC MENTON", 'siret'=>"17130111200396", 'dep'=>"06"),
|
||||||
'METZA' => array('nom'=>"PREFECTURE DE METZ", 'siret'=>"17570001200016", 'dep'=>"57"),
|
'METZA' => array('nom'=>"PREFECTURE DE METZ", 'siret'=>"17570001200016", 'dep'=>"57"),
|
||||||
'METZB' => array('nom'=>"SOUS PREFECTURE DE METZ", 'siret'=>"", 'dep'=>"57"),
|
'METZB' => array('nom'=>"SOUS PREFECTURE DE METZ", 'siret'=>"", 'dep'=>"57"),
|
||||||
'METZG' => array('nom'=>"TGIcc METZ", 'siret'=>"17570111900059", 'dep'=>"57"),
|
'METZG' => array('nom'=>"TGIcc METZ", 'siret'=>"17570111900059", 'dep'=>"57"),
|
||||||
@ -464,9 +464,9 @@ return array(
|
|||||||
'MONTEC' => array('nom'=>"TC MONTEREAU", 'siret'=>"17750111100153", 'dep'=>"77"),
|
'MONTEC' => array('nom'=>"TC MONTEREAU", 'siret'=>"17750111100153", 'dep'=>"77"),
|
||||||
'MONTIB' => array('nom'=>"SOUS PREFECTURE DE MONTDIDIER", 'siret'=>"17800001400039", 'dep'=>"80"),
|
'MONTIB' => array('nom'=>"SOUS PREFECTURE DE MONTDIDIER", 'siret'=>"17800001400039", 'dep'=>"80"),
|
||||||
'MONTIC' => array('nom'=>"TC MONTELIMAR", 'siret'=>"17380111900368", 'dep'=>"26"),
|
'MONTIC' => array('nom'=>"TC MONTELIMAR", 'siret'=>"17380111900368", 'dep'=>"26"),
|
||||||
'MONTLB' => array('nom'=>"SOUS PREFECTURE DE MONTLUCON", 'siret'=>"17030001600046", 'dep'=>"31"),
|
'MONTLB' => array('nom'=>"SOUS PREFECTURE DE MONTLUCON", 'siret'=>"17030001600046", 'dep'=>"03"),
|
||||||
'MONTLC' => array('nom'=>"TC MONTLUCON", 'siret'=>"17630111700121", 'dep'=>"31"),
|
'MONTLC' => array('nom'=>"TC MONTLUCON", 'siret'=>"17630111700121", 'dep'=>"03"),
|
||||||
'MONTLG' => array('nom'=>"TGI MONTLUCON", 'siret'=>"17630111700279", 'dep'=>"31"),
|
'MONTLG' => array('nom'=>"TGI MONTLUCON", 'siret'=>"17630111700279", 'dep'=>"03"),
|
||||||
'MONTA' => array('nom'=>"PREFECTURE DE MONT DE MARSAN", 'siret'=>"17400001800013", 'dep'=>"40"),
|
'MONTA' => array('nom'=>"PREFECTURE DE MONT DE MARSAN", 'siret'=>"17400001800013", 'dep'=>"40"),
|
||||||
'MONTMC' => array('nom'=>"TC MONT DE MARSAN", 'siret'=>"17640111500397", 'dep'=>"40"),
|
'MONTMC' => array('nom'=>"TC MONT DE MARSAN", 'siret'=>"17640111500397", 'dep'=>"40"),
|
||||||
'MONTMG' => array('nom'=>"TGI MONT DE MARSAN", 'siret'=>"17640111500256", 'dep'=>"40"),
|
'MONTMG' => array('nom'=>"TGI MONT DE MARSAN", 'siret'=>"17640111500256", 'dep'=>"40"),
|
||||||
@ -488,9 +488,9 @@ return array(
|
|||||||
'MORLAC' => array('nom'=>"TC MORLAIX", 'siret'=>"17350111500302", 'dep'=>"29"),
|
'MORLAC' => array('nom'=>"TC MORLAIX", 'siret'=>"17350111500302", 'dep'=>"29"),
|
||||||
'MORLAG' => array('nom'=>"TGI MORLAIX", 'siret'=>"17350111500492", 'dep'=>"29"),
|
'MORLAG' => array('nom'=>"TGI MORLAIX", 'siret'=>"17350111500492", 'dep'=>"29"),
|
||||||
'MORTAB' => array('nom'=>"SOUS PREFECTURE DE MORTAGNE AU PERCHE", 'siret'=>"17610001400032", 'dep'=>"61"),
|
'MORTAB' => array('nom'=>"SOUS PREFECTURE DE MORTAGNE AU PERCHE", 'siret'=>"17610001400032", 'dep'=>"61"),
|
||||||
'MOULIA' => array('nom'=>"PREFECTURE DE MOULINS", 'siret'=>"17030001600012", 'dep'=>"30"),
|
'MOULIA' => array('nom'=>"PREFECTURE DE MOULINS", 'siret'=>"17030001600012", 'dep'=>"03"),
|
||||||
'MOULIC' => array('nom'=>"TC MOULINS", 'siret'=>"17630111700139", 'dep'=>"30"),
|
'MOULIC' => array('nom'=>"TC MOULINS", 'siret'=>"17630111700139", 'dep'=>"03"),
|
||||||
'MOULIG' => array('nom'=>"TGI MOULINS", 'siret'=>"17630111700485", 'dep'=>"30"),
|
'MOULIG' => array('nom'=>"TGI MOULINS", 'siret'=>"17630111700485", 'dep'=>"03"),
|
||||||
'MULHOB' => array('nom'=>"SOUS PREFECTURE DE MULHOUSE", 'siret'=>"17680001900034", 'dep'=>"68"),
|
'MULHOB' => array('nom'=>"SOUS PREFECTURE DE MULHOUSE", 'siret'=>"17680001900034", 'dep'=>"68"),
|
||||||
'MULHOG' => array('nom'=>"TGIcc MULHOUSE", 'siret'=>"17680111600110", 'dep'=>"68"),
|
'MULHOG' => array('nom'=>"TGIcc MULHOUSE", 'siret'=>"17680111600110", 'dep'=>"68"),
|
||||||
'MULHOI' => array('nom'=>"TI MULHOUSE", 'siret'=>"17680111600102", 'dep'=>"68"),
|
'MULHOI' => array('nom'=>"TI MULHOUSE", 'siret'=>"17680111600102", 'dep'=>"68"),
|
||||||
@ -504,7 +504,7 @@ return array(
|
|||||||
'NANTRA' => array('nom'=>"PREFECTURE DE NANTERRE", 'siret'=>"17920001900018", 'dep'=>"92"),
|
'NANTRA' => array('nom'=>"PREFECTURE DE NANTERRE", 'siret'=>"17920001900018", 'dep'=>"92"),
|
||||||
'NANTRC' => array('nom'=>"TC NANTERRE", 'siret'=>"17780111500441", 'dep'=>"92"),
|
'NANTRC' => array('nom'=>"TC NANTERRE", 'siret'=>"17780111500441", 'dep'=>"92"),
|
||||||
'NANTRG' => array('nom'=>"TGI NANTERRE", 'siret'=>"17780111500151", 'dep'=>"92"),
|
'NANTRG' => array('nom'=>"TGI NANTERRE", 'siret'=>"17780111500151", 'dep'=>"92"),
|
||||||
'NANTUB' => array('nom'=>"SOUS PREFECTURE DE NANTUA", 'siret'=>"17010001000041", 'dep'=>"11"),
|
'NANTUB' => array('nom'=>"SOUS PREFECTURE DE NANTUA", 'siret'=>"17010001000041", 'dep'=>"01"),
|
||||||
'NARBOB' => array('nom'=>"SOUS PREFECTURE DE NARBONNE", 'siret'=>"17110001900024", 'dep'=>"11"),
|
'NARBOB' => array('nom'=>"SOUS PREFECTURE DE NARBONNE", 'siret'=>"17110001900024", 'dep'=>"11"),
|
||||||
'NARBOC' => array('nom'=>"TC NARBONNE", 'siret'=>"17340111800075", 'dep'=>"11"),
|
'NARBOC' => array('nom'=>"TC NARBONNE", 'siret'=>"17340111800075", 'dep'=>"11"),
|
||||||
'NARBOG' => array('nom'=>"TGI NARBONNE", 'siret'=>"17340111800083", 'dep'=>"11"),
|
'NARBOG' => array('nom'=>"TGI NARBONNE", 'siret'=>"17340111800083", 'dep'=>"11"),
|
||||||
@ -515,9 +515,9 @@ return array(
|
|||||||
'NEVERA' => array('nom'=>"PREFECTURE DE NEVERS", 'siret'=>"17580001000019", 'dep'=>"58"),
|
'NEVERA' => array('nom'=>"PREFECTURE DE NEVERS", 'siret'=>"17580001000019", 'dep'=>"58"),
|
||||||
'NEVERC' => array('nom'=>"TC NEVERS", 'siret'=>"17180111100351", 'dep'=>"58"),
|
'NEVERC' => array('nom'=>"TC NEVERS", 'siret'=>"17180111100351", 'dep'=>"58"),
|
||||||
'NEVERG' => array('nom'=>"TGI NEVERS", 'siret'=>"17180111100401", 'dep'=>"58"),
|
'NEVERG' => array('nom'=>"TGI NEVERS", 'siret'=>"17180111100401", 'dep'=>"58"),
|
||||||
'NICEA' => array('nom'=>"PREFECTURE DE NICE", 'siret'=>"17060001900013", 'dep'=>"62"),
|
'NICEA' => array('nom'=>"PREFECTURE DE NICE", 'siret'=>"17060001900013", 'dep'=>"06"),
|
||||||
'NICEC' => array('nom'=>"TC NICE", 'siret'=>"17130111200677", 'dep'=>"60"),
|
'NICEC' => array('nom'=>"TC NICE", 'siret'=>"17130111200677", 'dep'=>"06"),
|
||||||
'NICEG' => array('nom'=>"TGI NICE", 'siret'=>"17130111200289", 'dep'=>"63"),
|
'NICEG' => array('nom'=>"TGI NICE", 'siret'=>"17130111200289", 'dep'=>"06"),
|
||||||
'NIMESI' => array('nom'=>"TI NIMES", 'siret'=>"17300111600099", 'dep'=>"30"),
|
'NIMESI' => array('nom'=>"TI NIMES", 'siret'=>"17300111600099", 'dep'=>"30"),
|
||||||
'NIMESA' => array('nom'=>"PREFECTURE DE NIMES", 'siret'=>"17300001900013", 'dep'=>"30"),
|
'NIMESA' => array('nom'=>"PREFECTURE DE NIMES", 'siret'=>"17300001900013", 'dep'=>"30"),
|
||||||
'NIMESC' => array('nom'=>"TC NIMES", 'siret'=>"17300111600248", 'dep'=>"30"),
|
'NIMESC' => array('nom'=>"TC NIMES", 'siret'=>"17300111600248", 'dep'=>"30"),
|
||||||
@ -541,7 +541,7 @@ return array(
|
|||||||
'ORLEAG' => array('nom'=>"TGI ORLEANS", 'siret'=>"17450111400063", 'dep'=>"45"),
|
'ORLEAG' => array('nom'=>"TGI ORLEANS", 'siret'=>"17450111400063", 'dep'=>"45"),
|
||||||
'PAIMPC' => array('nom'=>"TC PAIMPOL", 'siret'=>"17350111500252", 'dep'=>"22"),
|
'PAIMPC' => array('nom'=>"TC PAIMPOL", 'siret'=>"17350111500252", 'dep'=>"22"),
|
||||||
'PALAIB' => array('nom'=>"SOUS PREFECTURE DE PALAISEAU", 'siret'=>"17910001100040", 'dep'=>"91"),
|
'PALAIB' => array('nom'=>"SOUS PREFECTURE DE PALAISEAU", 'siret'=>"17910001100040", 'dep'=>"91"),
|
||||||
'PAMIEB' => array('nom'=>"SOUS PREFECTURE DE PAMIERS", 'siret'=>"17090001300047", 'dep'=>"91"),
|
'PAMIEB' => array('nom'=>"SOUS PREFECTURE DE PAMIERS", 'siret'=>"17090001300047", 'dep'=>"09"),
|
||||||
'PAPEEM' => array('nom'=>"TMX PAPEETE", 'siret'=>"17987642000011", 'dep'=>"987"),
|
'PAPEEM' => array('nom'=>"TMX PAPEETE", 'siret'=>"17987642000011", 'dep'=>"987"),
|
||||||
'PAPEEP' => array('nom'=>"TPI PAPEETE", 'siret'=>"17987642000011", 'dep'=>"987"),
|
'PAPEEP' => array('nom'=>"TPI PAPEETE", 'siret'=>"17987642000011", 'dep'=>"987"),
|
||||||
'PARISA' => array('nom'=>"PREFECTURE DE PARIS", 'siret'=>"17750001400010", 'dep'=>"75"),
|
'PARISA' => array('nom'=>"PREFECTURE DE PARIS", 'siret'=>"17750001400010", 'dep'=>"75"),
|
||||||
@ -574,9 +574,9 @@ return array(
|
|||||||
'PONTOG' => array('nom'=>"TGI PONTOISE", 'siret'=>"17780111500201", 'dep'=>"95"),
|
'PONTOG' => array('nom'=>"TGI PONTOISE", 'siret'=>"17780111500201", 'dep'=>"95"),
|
||||||
'PONTRB' => array('nom'=>"SOUS PREFECTURE DE PONTARLIER", 'siret'=>"17250001900044", 'dep'=>"25"),
|
'PONTRB' => array('nom'=>"SOUS PREFECTURE DE PONTARLIER", 'siret'=>"17250001900044", 'dep'=>"25"),
|
||||||
'PRADEB' => array('nom'=>"SOUS PREFECTURE DE PRADES", 'siret'=>"17660001300039", 'dep'=>"66"),
|
'PRADEB' => array('nom'=>"SOUS PREFECTURE DE PRADES", 'siret'=>"17660001300039", 'dep'=>"66"),
|
||||||
'PRIVA' => array('nom'=>"PREFECTURE DE PRIVAS", 'siret'=>"17070001700016", 'dep'=>"70"),
|
'PRIVA' => array('nom'=>"PREFECTURE DE PRIVAS", 'siret'=>"17070001700016", 'dep'=>"07"),
|
||||||
'PRIVG' => array('nom'=>"TGI PRIVAS", 'siret'=>"17300111600057", 'dep'=>"70"),
|
'PRIVG' => array('nom'=>"TGI PRIVAS", 'siret'=>"17300111600057", 'dep'=>"07"),
|
||||||
'PRIVI' => array('nom'=>"TI PRIVAS", 'siret'=>"17300111600313", 'dep'=>"70"),
|
'PRIVI' => array('nom'=>"TI PRIVAS", 'siret'=>"17300111600313", 'dep'=>"07"),
|
||||||
'PROVIB' => array('nom'=>"SOUS PREFECTURE DE PROVINS", 'siret'=>"17770001000024", 'dep'=>"77"),
|
'PROVIB' => array('nom'=>"SOUS PREFECTURE DE PROVINS", 'siret'=>"17770001000024", 'dep'=>"77"),
|
||||||
'PROVIC' => array('nom'=>"TC PROVINS", 'siret'=>"17750111100161", 'dep'=>"77"),
|
'PROVIC' => array('nom'=>"TC PROVINS", 'siret'=>"17750111100161", 'dep'=>"77"),
|
||||||
'QUIMPA' => array('nom'=>"PREFECTURE DE QUIMPER", 'siret'=>"17290001100013", 'dep'=>"29"),
|
'QUIMPA' => array('nom'=>"PREFECTURE DE QUIMPER", 'siret'=>"17290001100013", 'dep'=>"29"),
|
||||||
@ -590,7 +590,7 @@ return array(
|
|||||||
'RENNEA' => array('nom'=>"PREFECTURE DE RENNES", 'siret'=>"17350001800010", 'dep'=>"35"),
|
'RENNEA' => array('nom'=>"PREFECTURE DE RENNES", 'siret'=>"17350001800010", 'dep'=>"35"),
|
||||||
'RENNEC' => array('nom'=>"TC RENNES", 'siret'=>"17350111500278", 'dep'=>"35"),
|
'RENNEC' => array('nom'=>"TC RENNES", 'siret'=>"17350111500278", 'dep'=>"35"),
|
||||||
'RENNEG' => array('nom'=>"TGI RENNES", 'siret'=>"17350111500161", 'dep'=>"35"),
|
'RENNEG' => array('nom'=>"TGI RENNES", 'siret'=>"17350111500161", 'dep'=>"35"),
|
||||||
'RETHEB' => array('nom'=>"SOUS PREFECTURE DE RETHEL", 'siret'=>"17080001500068", 'dep'=>"83"),
|
'RETHEB' => array('nom'=>"SOUS PREFECTURE DE RETHEL", 'siret'=>"17080001500068", 'dep'=>"08"),
|
||||||
'RIBEAB' => array('nom'=>"SOUS PREFECTURE DE RIBEAUVILLE", 'siret'=>"17680001900042", 'dep'=>"68"),
|
'RIBEAB' => array('nom'=>"SOUS PREFECTURE DE RIBEAUVILLE", 'siret'=>"17680001900042", 'dep'=>"68"),
|
||||||
'RIOMB' => array('nom'=>"SOUS PREFECTURE DE RIOM", 'siret'=>"17630001000053", 'dep'=>"63"),
|
'RIOMB' => array('nom'=>"SOUS PREFECTURE DE RIOM", 'siret'=>"17630001000053", 'dep'=>"63"),
|
||||||
'RIOMC' => array('nom'=>"TC RIOM", 'siret'=>"17630111700220", 'dep'=>"63"),
|
'RIOMC' => array('nom'=>"TC RIOM", 'siret'=>"17630111700220", 'dep'=>"63"),
|
||||||
@ -636,8 +636,8 @@ return array(
|
|||||||
'SAVERB' => array('nom'=>"SOUS PREFECTURE DE SAVERNE", 'siret'=>"17670001100099", 'dep'=>"67"),
|
'SAVERB' => array('nom'=>"SOUS PREFECTURE DE SAVERNE", 'siret'=>"17670001100099", 'dep'=>"67"),
|
||||||
'SAVERG' => array('nom'=>"TGIcc SAVERNE", 'siret'=>"17680111600417", 'dep'=>"67"),
|
'SAVERG' => array('nom'=>"TGIcc SAVERNE", 'siret'=>"17680111600417", 'dep'=>"67"),
|
||||||
'SAVERI' => array('nom'=>"TI SAVERNE", 'siret'=>"17680111600227", 'dep'=>"67"),
|
'SAVERI' => array('nom'=>"TI SAVERNE", 'siret'=>"17680111600227", 'dep'=>"67"),
|
||||||
'SEDANB' => array('nom'=>"SOUS PREFECTURE DE SEDAN", 'siret'=>"17080001500043", 'dep'=>"82"),
|
'SEDANB' => array('nom'=>"SOUS PREFECTURE DE SEDAN", 'siret'=>"17080001500043", 'dep'=>"08"),
|
||||||
'SEDANC' => array('nom'=>"TC SEDAN", 'siret'=>"17510111200084", 'dep'=>"82"),
|
'SEDANC' => array('nom'=>"TC SEDAN", 'siret'=>"17510111200084", 'dep'=>"08"),
|
||||||
'SEGREB' => array('nom'=>"SOUS PREFECTURE DE SEGRE", 'siret'=>"17490001900038", 'dep'=>"49"),
|
'SEGREB' => array('nom'=>"SOUS PREFECTURE DE SEGRE", 'siret'=>"17490001900038", 'dep'=>"49"),
|
||||||
'SELESB' => array('nom'=>"SOUS PREFECTURE DE SELESTAT", 'siret'=>"", 'dep'=>"67"),
|
'SELESB' => array('nom'=>"SOUS PREFECTURE DE SELESTAT", 'siret'=>"", 'dep'=>"67"),
|
||||||
'SENLIB' => array('nom'=>"SOUS PREFECTURE DE SENLIS", 'siret'=>"17600001600046", 'dep'=>"60"),
|
'SENLIB' => array('nom'=>"SOUS PREFECTURE DE SENLIS", 'siret'=>"17600001600046", 'dep'=>"60"),
|
||||||
@ -647,9 +647,9 @@ return array(
|
|||||||
'SENSC' => array('nom'=>"TC SENS", 'siret'=>"17750111100864", 'dep'=>"89"),
|
'SENSC' => array('nom'=>"TC SENS", 'siret'=>"17750111100864", 'dep'=>"89"),
|
||||||
'SENSG' => array('nom'=>"TGI SENS", 'siret'=>"17750111100146", 'dep'=>"89"),
|
'SENSG' => array('nom'=>"TGI SENS", 'siret'=>"17750111100146", 'dep'=>"89"),
|
||||||
'SETEC' => array('nom'=>"TC SETE", 'siret'=>"17340111800646", 'dep'=>"34"),
|
'SETEC' => array('nom'=>"TC SETE", 'siret'=>"17340111800646", 'dep'=>"34"),
|
||||||
'SOISSB' => array('nom'=>"SOUS PREFECTURE DE SOISSONS", 'siret'=>"17020001800050", 'dep'=>"22"),
|
'SOISSB' => array('nom'=>"SOUS PREFECTURE DE SOISSONS", 'siret'=>"17020001800050", 'dep'=>"02"),
|
||||||
'SOISSC' => array('nom'=>"TC SOISSONS", 'siret'=>"17800111100347", 'dep'=>"22"),
|
'SOISSC' => array('nom'=>"TC SOISSONS", 'siret'=>"17800111100347", 'dep'=>"02"),
|
||||||
'SOISSG' => array('nom'=>"TGI SOISSONS", 'siret'=>"17800111100123", 'dep'=>"22"),
|
'SOISSG' => array('nom'=>"TGI SOISSONS", 'siret'=>"17800111100123", 'dep'=>"02"),
|
||||||
'SPIEMP' => array('nom'=>"TPI SAINT PIERRE ET MIQUELON", 'siret'=>"13000269400045", 'dep'=>"975"),
|
'SPIEMP' => array('nom'=>"TPI SAINT PIERRE ET MIQUELON", 'siret'=>"13000269400045", 'dep'=>"975"),
|
||||||
'SPIEMS' => array('nom'=>"TSA SAINT PIERRE ET MIQUELON", 'siret'=>"13000269400029", 'dep'=>"975"),
|
'SPIEMS' => array('nom'=>"TSA SAINT PIERRE ET MIQUELON", 'siret'=>"13000269400029", 'dep'=>"975"),
|
||||||
'STAFFC' => array('nom'=>"TC SAINT AFRIQUE", 'siret'=>"17340111800232", 'dep'=>"12"),
|
'STAFFC' => array('nom'=>"TC SAINT AFRIQUE", 'siret'=>"17340111800232", 'dep'=>"12"),
|
||||||
@ -679,7 +679,7 @@ return array(
|
|||||||
'STGAUC' => array('nom'=>"TC SAINT GAUDENS", 'siret'=>"17310111400556", 'dep'=>"31"),
|
'STGAUC' => array('nom'=>"TC SAINT GAUDENS", 'siret'=>"17310111400556", 'dep'=>"31"),
|
||||||
'STGAUG' => array('nom'=>"TGI SAINT GAUDENS", 'siret'=>"17310111400085", 'dep'=>"31"),
|
'STGAUG' => array('nom'=>"TGI SAINT GAUDENS", 'siret'=>"17310111400085", 'dep'=>"31"),
|
||||||
'STGERB' => array('nom'=>"SOUS PREFECTURE DE ST GERMAIN EN LAYE", 'siret'=>"17780001800034", 'dep'=>"78"),
|
'STGERB' => array('nom'=>"SOUS PREFECTURE DE ST GERMAIN EN LAYE", 'siret'=>"17780001800034", 'dep'=>"78"),
|
||||||
'STGIRB' => array('nom'=>"SOUS PREFECTURE DE ST GIRONS", 'siret'=>"17090001300054", 'dep'=>"92"),
|
'STGIRB' => array('nom'=>"SOUS PREFECTURE DE ST GIRONS", 'siret'=>"17090001300054", 'dep'=>"09"),
|
||||||
'STJEAB' => array('nom'=>"SOUS PREFECTURE DE ST JEAN D'ANGELY", 'siret'=>"17170001600057", 'dep'=>"17"),
|
'STJEAB' => array('nom'=>"SOUS PREFECTURE DE ST JEAN D'ANGELY", 'siret'=>"17170001600057", 'dep'=>"17"),
|
||||||
'STJEAC' => array('nom'=>"TC SAINT JEAN D'ANGELY", 'siret'=>"", 'dep'=>"17"),
|
'STJEAC' => array('nom'=>"TC SAINT JEAN D'ANGELY", 'siret'=>"", 'dep'=>"17"),
|
||||||
'STJEMB' => array('nom'=>"SOUS PREFECTURE DE ST JEAN DE MAURIENNE", 'siret'=>"17730001900037", 'dep'=>"73"),
|
'STJEMB' => array('nom'=>"SOUS PREFECTURE DE ST JEAN DE MAURIENNE", 'siret'=>"17730001900037", 'dep'=>"73"),
|
||||||
@ -700,9 +700,9 @@ return array(
|
|||||||
'STPIEB' => array('nom'=>"SOUS PREFECTURE DE ST PIERRE DE LA REUNION", 'siret'=>"17974001400040", 'dep'=>"974"),
|
'STPIEB' => array('nom'=>"SOUS PREFECTURE DE ST PIERRE DE LA REUNION", 'siret'=>"17974001400040", 'dep'=>"974"),
|
||||||
'STPIEG' => array('nom'=>"TGIcc SAINT PIERRE", 'siret'=>"17974111100035", 'dep'=>"974"),
|
'STPIEG' => array('nom'=>"TGIcc SAINT PIERRE", 'siret'=>"17974111100035", 'dep'=>"974"),
|
||||||
'STPIMA' => array('nom'=>"PREFECTURE DE ST PIERRE ET MIQUELON", 'siret'=>"17975663000010", 'dep'=>"975"),
|
'STPIMA' => array('nom'=>"PREFECTURE DE ST PIERRE ET MIQUELON", 'siret'=>"17975663000010", 'dep'=>"975"),
|
||||||
'STQUEB' => array('nom'=>"SOUS PREFECTURE DE ST QUENTIN", 'siret'=>"17020001800043", 'dep'=>"21"),
|
'STQUEB' => array('nom'=>"SOUS PREFECTURE DE ST QUENTIN", 'siret'=>"17020001800043", 'dep'=>"02"),
|
||||||
'STQUEC' => array('nom'=>"TC SAINT QUENTIN", 'siret'=>"17800111100115", 'dep'=>"21"),
|
'STQUEC' => array('nom'=>"TC SAINT QUENTIN", 'siret'=>"17800111100115", 'dep'=>"02"),
|
||||||
'STQUEG' => array('nom'=>"TGI SAINT QUENTIN", 'siret'=>"17800111100065", 'dep'=>"23"),
|
'STQUEG' => array('nom'=>"TGI SAINT QUENTIN", 'siret'=>"17800111100065", 'dep'=>"02"),
|
||||||
'STRASA' => array('nom'=>"PREFECTURE DE STRASBOURG", 'siret'=>"17670001100016", 'dep'=>"67"),
|
'STRASA' => array('nom'=>"PREFECTURE DE STRASBOURG", 'siret'=>"17670001100016", 'dep'=>"67"),
|
||||||
'STRASB' => array('nom'=>"SOUS PREFECTURE DE STRASBOURG", 'siret'=>"17670001100131", 'dep'=>"67"),
|
'STRASB' => array('nom'=>"SOUS PREFECTURE DE STRASBOURG", 'siret'=>"17670001100131", 'dep'=>"67"),
|
||||||
'STRASG' => array('nom'=>"TGIcc STRASBOURG", 'siret'=>"17680111600276", 'dep'=>"67"),
|
'STRASG' => array('nom'=>"TGIcc STRASBOURG", 'siret'=>"17680111600276", 'dep'=>"67"),
|
||||||
@ -732,7 +732,7 @@ return array(
|
|||||||
'TOULSC' => array('nom'=>"TC TOULOUSE", 'siret'=>"17310111400168", 'dep'=>"31"),
|
'TOULSC' => array('nom'=>"TC TOULOUSE", 'siret'=>"17310111400168", 'dep'=>"31"),
|
||||||
'TOULSG' => array('nom'=>"TGI TOULOUSE", 'siret'=>"17310111400259", 'dep'=>"31"),
|
'TOULSG' => array('nom'=>"TGI TOULOUSE", 'siret'=>"17310111400259", 'dep'=>"31"),
|
||||||
'TOURCC' => array('nom'=>"TC ROUBAIX TOURCOING", 'siret'=>"17590111500642", 'dep'=>"59"),
|
'TOURCC' => array('nom'=>"TC ROUBAIX TOURCOING", 'siret'=>"17590111500642", 'dep'=>"59"),
|
||||||
'TOURNB' => array('nom'=>"SOUS PREFECTURE DE TOURNON SUR RHONE", 'siret'=>"17070001700024", 'dep'=>"73"),
|
'TOURNB' => array('nom'=>"SOUS PREFECTURE DE TOURNON SUR RHONE", 'siret'=>"17070001700024", 'dep'=>"07"),
|
||||||
'TOURNC' => array('nom'=>"TC TOURNUS", 'siret'=>"", 'dep'=>"71"),
|
'TOURNC' => array('nom'=>"TC TOURNUS", 'siret'=>"", 'dep'=>"71"),
|
||||||
'TOURSA' => array('nom'=>"PREFECTURE DE TOURS", 'siret'=>"17370001400017", 'dep'=>"37"),
|
'TOURSA' => array('nom'=>"PREFECTURE DE TOURS", 'siret'=>"17370001400017", 'dep'=>"37"),
|
||||||
'TOURSC' => array('nom'=>"TC TOURS", 'siret'=>"17450111400105", 'dep'=>"37"),
|
'TOURSC' => array('nom'=>"TC TOURS", 'siret'=>"17450111400105", 'dep'=>"37"),
|
||||||
@ -759,12 +759,12 @@ return array(
|
|||||||
'VERSAA' => array('nom'=>"PREFECTURE DE VERSAILLES", 'siret'=>"17780001800067", 'dep'=>"78"),
|
'VERSAA' => array('nom'=>"PREFECTURE DE VERSAILLES", 'siret'=>"17780001800067", 'dep'=>"78"),
|
||||||
'VERSAC' => array('nom'=>"TC VERSAILLES", 'siret'=>"17780111500482", 'dep'=>"78"),
|
'VERSAC' => array('nom'=>"TC VERSAILLES", 'siret'=>"17780111500482", 'dep'=>"78"),
|
||||||
'VERSAG' => array('nom'=>"TGI VERSAILLES", 'siret'=>"17780111500466", 'dep'=>"78"),
|
'VERSAG' => array('nom'=>"TGI VERSAILLES", 'siret'=>"17780111500466", 'dep'=>"78"),
|
||||||
'VERVIB' => array('nom'=>"SOUS PREFECTURE DE VERVINS", 'siret'=>"17020001800035", 'dep'=>"21"),
|
'VERVIB' => array('nom'=>"SOUS PREFECTURE DE VERVINS", 'siret'=>"17020001800035", 'dep'=>"02"),
|
||||||
'VERVIC' => array('nom'=>"TC VERVINS", 'siret'=>"17800111100131", 'dep'=>"21"),
|
'VERVIC' => array('nom'=>"TC VERVINS", 'siret'=>"17800111100131", 'dep'=>"02"),
|
||||||
'VESOUA' => array('nom'=>"PREFECTURE DE VESOUL", 'siret'=>"17700001500012", 'dep'=>"70"),
|
'VESOUA' => array('nom'=>"PREFECTURE DE VESOUL", 'siret'=>"17700001500012", 'dep'=>"70"),
|
||||||
'VESOUC' => array('nom'=>"TC VESOUL GRAY", 'siret'=>"17250111600476", 'dep'=>"70"),
|
'VESOUC' => array('nom'=>"TC VESOUL GRAY", 'siret'=>"17250111600476", 'dep'=>"70"),
|
||||||
'VESOUG' => array('nom'=>"TGI VESOUL", 'siret'=>"17250111600286", 'dep'=>"70"),
|
'VESOUG' => array('nom'=>"TGI VESOUL", 'siret'=>"17250111600286", 'dep'=>"70"),
|
||||||
'VICHYB' => array('nom'=>"SOUS PREFECTURE DE VICHY", 'siret'=>"17030001600038", 'dep'=>"32"),
|
'VICHYB' => array('nom'=>"SOUS PREFECTURE DE VICHY", 'siret'=>"17030001600038", 'dep'=>"03"),
|
||||||
'VIENNB' => array('nom'=>"SOUS PREFECTURE DE VIENNE", 'siret'=>"", 'dep'=>"38"),
|
'VIENNB' => array('nom'=>"SOUS PREFECTURE DE VIENNE", 'siret'=>"", 'dep'=>"38"),
|
||||||
'VIENNC' => array('nom'=>"TC VIENNE", 'siret'=>"17380111900137", 'dep'=>"38"),
|
'VIENNC' => array('nom'=>"TC VIENNE", 'siret'=>"17380111900137", 'dep'=>"38"),
|
||||||
'VIENNG' => array('nom'=>"TGI VIENNE", 'siret'=>"17380111900053", 'dep'=>"38"),
|
'VIENNG' => array('nom'=>"TGI VIENNE", 'siret'=>"17380111900053", 'dep'=>"38"),
|
||||||
@ -780,14 +780,14 @@ return array(
|
|||||||
'VIREB' => array('nom'=>"SOUS PREFECTURE DE VIRE", 'siret'=>"17140001300057", 'dep'=>"14"),
|
'VIREB' => array('nom'=>"SOUS PREFECTURE DE VIRE", 'siret'=>"17140001300057", 'dep'=>"14"),
|
||||||
'VIREC' => array('nom'=>"TC VIRE", 'siret'=>"", 'dep'=>"14"),
|
'VIREC' => array('nom'=>"TC VIRE", 'siret'=>"", 'dep'=>"14"),
|
||||||
'VITRYB' => array('nom'=>"SOUS PREFECTURE DE VITRY LE FRANCOIS", 'siret'=>"17510001500031", 'dep'=>"51"),
|
'VITRYB' => array('nom'=>"SOUS PREFECTURE DE VITRY LE FRANCOIS", 'siret'=>"17510001500031", 'dep'=>"51"),
|
||||||
'VOUZIB' => array('nom'=>"SOUS PREFECTURE DE VOUZIERS", 'siret'=>"17080001500027", 'dep'=>"84"),
|
'VOUZIB' => array('nom'=>"SOUS PREFECTURE DE VOUZIERS", 'siret'=>"17080001500027", 'dep'=>"08"),
|
||||||
'WISSEB' => array('nom'=>"SOUS PREFECTURE DE WISSEMBOURG", 'siret'=>"17670001100081", 'dep'=>"67"),
|
'WISSEB' => array('nom'=>"SOUS PREFECTURE DE WISSEMBOURG", 'siret'=>"17670001100081", 'dep'=>"67"),
|
||||||
'YSSINB' => array('nom'=>"SOUS PREFECTURE DE YSSINGEAUX", 'siret'=>"17430001200047", 'dep'=>"43"),
|
'YSSINB' => array('nom'=>"SOUS PREFECTURE DE YSSINGEAUX", 'siret'=>"17430001200047", 'dep'=>"43"),
|
||||||
'LOUVII' => array('nom'=>"TI LOUVIERS", 'siret'=>"17760111900304", 'dep'=>"27"),
|
'LOUVII' => array('nom'=>"TI LOUVIERS", 'siret'=>"17760111900304", 'dep'=>"27"),
|
||||||
'VIGANI' => array('nom'=>"TI VIGAN", 'siret'=>"17300111600362", 'dep'=>"30"),
|
'VIGANI' => array('nom'=>"TI VIGAN", 'siret'=>"17300111600362", 'dep'=>"30"),
|
||||||
'NANTUI' => array('nom'=>"TI NANTUA", 'siret'=>"17690111400155", 'dep'=>"11"),
|
'NANTUI' => array('nom'=>"TI NANTUA", 'siret'=>"17690111400155", 'dep'=>"01"),
|
||||||
'NICEI' => array('nom'=>"TI NICE", 'siret'=>"17130111200685", 'dep'=>"63"),
|
'NICEI' => array('nom'=>"TI NICE", 'siret'=>"17130111200685", 'dep'=>"06"),
|
||||||
'SEDANI' => array('nom'=>"TI SEDAN", 'siret'=>"17510111200209", 'dep'=>"82"),
|
'SEDANI' => array('nom'=>"TI SEDAN", 'siret'=>"17510111200209", 'dep'=>"08"),
|
||||||
'PERIGI' => array('nom'=>"TI PERIGUEUX", 'siret'=>"17330111000180", 'dep'=>"24"),
|
'PERIGI' => array('nom'=>"TI PERIGUEUX", 'siret'=>"17330111000180", 'dep'=>"24"),
|
||||||
'NANTEI' => array('nom'=>"TI NANTES", 'siret'=>"17350111500880", 'dep'=>"44"),
|
'NANTEI' => array('nom'=>"TI NANTES", 'siret'=>"17350111500880", 'dep'=>"44"),
|
||||||
'COUTAI' => array('nom'=>"TI COUTANCES", 'siret'=>"17140111000282", 'dep'=>"50"),
|
'COUTAI' => array('nom'=>"TI COUTANCES", 'siret'=>"17140111000282", 'dep'=>"50"),
|
||||||
@ -795,7 +795,7 @@ return array(
|
|||||||
'PONTOI' => array('nom'=>"TI PONTOISE", 'siret'=>"17780111500573", 'dep'=>"95"),
|
'PONTOI' => array('nom'=>"TI PONTOISE", 'siret'=>"17780111500573", 'dep'=>"95"),
|
||||||
'MOUTII' => array('nom'=>"TI MOUTIERS", 'siret'=>"17730111600139", 'dep'=>"73"),
|
'MOUTII' => array('nom'=>"TI MOUTIERS", 'siret'=>"17730111600139", 'dep'=>"73"),
|
||||||
'CIVRAI' => array('nom'=>"TI CIVRAY", 'siret'=>"17860111800494", 'dep'=>"86"),
|
'CIVRAI' => array('nom'=>"TI CIVRAY", 'siret'=>"17860111800494", 'dep'=>"86"),
|
||||||
'ROCROI' => array('nom'=>"TI ROCROI", 'siret'=>"17510111200332", 'dep'=>"82"),
|
'ROCROI' => array('nom'=>"TI ROCROI", 'siret'=>"17510111200332", 'dep'=>"08"),
|
||||||
'MARENI' => array('nom'=>"TI MARENNES", 'siret'=>"17860111800080", 'dep'=>"17"),
|
'MARENI' => array('nom'=>"TI MARENNES", 'siret'=>"17860111800080", 'dep'=>"17"),
|
||||||
'JONZAI' => array('nom'=>"TI JONZAC", 'siret'=>"17860111800098", 'dep'=>"17"),
|
'JONZAI' => array('nom'=>"TI JONZAC", 'siret'=>"17860111800098", 'dep'=>"17"),
|
||||||
'SAINTI' => array('nom'=>"TI SAINT AMAND MONTROND", 'siret'=>"17180111100070", 'dep'=>"18"),
|
'SAINTI' => array('nom'=>"TI SAINT AMAND MONTROND", 'siret'=>"17180111100070", 'dep'=>"18"),
|
||||||
@ -875,11 +875,11 @@ return array(
|
|||||||
'MELUNI' => array('nom'=>"TI MELUN", 'siret'=>"17750111100211", 'dep'=>"77"),
|
'MELUNI' => array('nom'=>"TI MELUN", 'siret'=>"17750111100211", 'dep'=>"77"),
|
||||||
'TROYEI' => array('nom'=>"TI TROYES", 'siret'=>"17510111200266", 'dep'=>"10"),
|
'TROYEI' => array('nom'=>"TI TROYES", 'siret'=>"17510111200266", 'dep'=>"10"),
|
||||||
'HAVREI' => array('nom'=>"TI LE HAVRE", 'siret'=>"17760111900320", 'dep'=>"76"),
|
'HAVREI' => array('nom'=>"TI LE HAVRE", 'siret'=>"17760111900320", 'dep'=>"76"),
|
||||||
'GANNAI' => array('nom'=>"TI GANNAT", 'siret'=>"17630111700345", 'dep'=>"38"),
|
'GANNAI' => array('nom'=>"TI GANNAT", 'siret'=>"17630111700345", 'dep'=>"03"),
|
||||||
'BASTII' => array('nom'=>"TI BASTIA", 'siret'=>"17202111500131", 'dep'=>"20"),
|
'BASTII' => array('nom'=>"TI BASTIA", 'siret'=>"17202111500131", 'dep'=>"20"),
|
||||||
'BRIANI' => array('nom'=>"TI BRIANCON", 'siret'=>"17380111900251", 'dep'=>"51"),
|
'BRIANI' => array('nom'=>"TI BRIANCON", 'siret'=>"17380111900251", 'dep'=>"05"),
|
||||||
'CORTEI' => array('nom'=>"TI CORTE", 'siret'=>"17202111500149", 'dep'=>"20"),
|
'CORTEI' => array('nom'=>"TI CORTE", 'siret'=>"17202111500149", 'dep'=>"20"),
|
||||||
'GAPI' => array('nom'=>"TI GAP", 'siret'=>"17380111900285", 'dep'=>"50"),
|
'GAPI' => array('nom'=>"TI GAP", 'siret'=>"17380111900285", 'dep'=>"05"),
|
||||||
'LAROCI' => array('nom'=>"TI LA ROCHE SUR YON", 'siret'=>"17860111800239", 'dep'=>"85"),
|
'LAROCI' => array('nom'=>"TI LA ROCHE SUR YON", 'siret'=>"17860111800239", 'dep'=>"85"),
|
||||||
'MONTMI' => array('nom'=>"TI MONTMORILLON", 'siret'=>"17860111800064", 'dep'=>"86"),
|
'MONTMI' => array('nom'=>"TI MONTMORILLON", 'siret'=>"17860111800064", 'dep'=>"86"),
|
||||||
'CONFOI' => array('nom'=>"TI CONFOLENS", 'siret'=>"17330111000396", 'dep'=>"16"),
|
'CONFOI' => array('nom'=>"TI CONFOLENS", 'siret'=>"17330111000396", 'dep'=>"16"),
|
||||||
@ -890,7 +890,7 @@ return array(
|
|||||||
'AJACCI' => array('nom'=>"TI AJACCIO", 'siret'=>"17202111500115", 'dep'=>"20"),
|
'AJACCI' => array('nom'=>"TI AJACCIO", 'siret'=>"17202111500115", 'dep'=>"20"),
|
||||||
'VANVEI' => array('nom'=>"TI VANVES", 'siret'=>"17780111500342", 'dep'=>"92"),
|
'VANVEI' => array('nom'=>"TI VANVES", 'siret'=>"17780111500342", 'dep'=>"92"),
|
||||||
'VERSAI' => array('nom'=>"TI VERSAILLES", 'siret'=>"17780111500458", 'dep'=>"78"),
|
'VERSAI' => array('nom'=>"TI VERSAILLES", 'siret'=>"17780111500458", 'dep'=>"78"),
|
||||||
'VERVII' => array('nom'=>"TI VERVINS", 'siret'=>"17800111100388", 'dep'=>"21"),
|
'VERVII' => array('nom'=>"TI VERVINS", 'siret'=>"17800111100388", 'dep'=>"02"),
|
||||||
'VIERZI' => array('nom'=>"TI VIERZON", 'siret'=>"17180111100195", 'dep'=>"18"),
|
'VIERZI' => array('nom'=>"TI VIERZON", 'siret'=>"17180111100195", 'dep'=>"18"),
|
||||||
'VIREI' => array('nom'=>"TI VIRE", 'siret'=>"17140111000506", 'dep'=>"14"),
|
'VIREI' => array('nom'=>"TI VIRE", 'siret'=>"17140111000506", 'dep'=>"14"),
|
||||||
'WISSEI' => array('nom'=>"TI WISSEMBOURG", 'siret'=>"17680111600144", 'dep'=>"67"),
|
'WISSEI' => array('nom'=>"TI WISSEMBOURG", 'siret'=>"17680111600144", 'dep'=>"67"),
|
||||||
@ -898,7 +898,7 @@ return array(
|
|||||||
'LEPUYI' => array('nom'=>"TI PUY EN VELAY", 'siret'=>"17630111700428", 'dep'=>"43"),
|
'LEPUYI' => array('nom'=>"TI PUY EN VELAY", 'siret'=>"17630111700428", 'dep'=>"43"),
|
||||||
'LERAII' => array('nom'=>"TI LE RAINCY", 'siret'=>"17750111100997", 'dep'=>"93"),
|
'LERAII' => array('nom'=>"TI LE RAINCY", 'siret'=>"17750111100997", 'dep'=>"93"),
|
||||||
'MARTII' => array('nom'=>"TI MARTIGUES", 'siret'=>"17130111200123", 'dep'=>"13"),
|
'MARTII' => array('nom'=>"TI MARTIGUES", 'siret'=>"17130111200123", 'dep'=>"13"),
|
||||||
'MENTOI' => array('nom'=>"TI MENTON", 'siret'=>"17130111200347", 'dep'=>"65"),
|
'MENTOI' => array('nom'=>"TI MENTON", 'siret'=>"17130111200347", 'dep'=>"06"),
|
||||||
'MONTRI' => array('nom'=>"TI MONTREUIL SOUS BOIS", 'siret'=>"17750111100542", 'dep'=>"93"),
|
'MONTRI' => array('nom'=>"TI MONTREUIL SOUS BOIS", 'siret'=>"17750111100542", 'dep'=>"93"),
|
||||||
'NEUILI' => array('nom'=>"TI NEUILLY SUR SEINE", 'siret'=>"17780111500326", 'dep'=>"92"),
|
'NEUILI' => array('nom'=>"TI NEUILLY SUR SEINE", 'siret'=>"17780111500326", 'dep'=>"92"),
|
||||||
'PANTII' => array('nom'=>"TI PANTIN", 'siret'=>"17750111101052", 'dep'=>"93"),
|
'PANTII' => array('nom'=>"TI PANTIN", 'siret'=>"17750111101052", 'dep'=>"93"),
|
||||||
@ -916,22 +916,22 @@ return array(
|
|||||||
'MONTCI' => array('nom'=>"TI MONTCEAU LES MINES", 'siret'=>"17210111500100", 'dep'=>"71"),
|
'MONTCI' => array('nom'=>"TI MONTCEAU LES MINES", 'siret'=>"17210111500100", 'dep'=>"71"),
|
||||||
'NAZAII' => array('nom'=>"TI SAINT NAZAIRE", 'siret'=>"17350111500724", 'dep'=>"44"),
|
'NAZAII' => array('nom'=>"TI SAINT NAZAIRE", 'siret'=>"17350111500724", 'dep'=>"44"),
|
||||||
'SEVERI' => array('nom'=>"TI SAINT SEVER", 'siret'=>"17640111500231", 'dep'=>"40"),
|
'SEVERI' => array('nom'=>"TI SAINT SEVER", 'siret'=>"17640111500231", 'dep'=>"40"),
|
||||||
'BBRESI' => array('nom'=>"TI BOURG EN BRESSE", 'siret'=>"17690111400486", 'dep'=>"10"),
|
'BBRESI' => array('nom'=>"TI BOURG EN BRESSE", 'siret'=>"17690111400486", 'dep'=>"01"),
|
||||||
'YSSINI' => array('nom'=>"TI YSSINGEAUX", 'siret'=>"17630111700469", 'dep'=>"43"),
|
'YSSINI' => array('nom'=>"TI YSSINGEAUX", 'siret'=>"17630111700469", 'dep'=>"43"),
|
||||||
'TREVOI' => array('nom'=>"TI TREVOUX", 'siret'=>"17690111400494", 'dep'=>"16"),
|
'TREVOI' => array('nom'=>"TI TREVOUX", 'siret'=>"17690111400494", 'dep'=>"01"),
|
||||||
'ROMANI' => array('nom'=>"TI ROMANS SUR ISERE", 'siret'=>"17380111900384", 'dep'=>"26"),
|
'ROMANI' => array('nom'=>"TI ROMANS SUR ISERE", 'siret'=>"17380111900384", 'dep'=>"26"),
|
||||||
'LECHAI' => array('nom'=>"TI LE CHAMBON FEUGEROLLES", 'siret'=>"17690111400544", 'dep'=>"42"),
|
'LECHAI' => array('nom'=>"TI LE CHAMBON FEUGEROLLES", 'siret'=>"17690111400544", 'dep'=>"42"),
|
||||||
'CHINOI' => array('nom'=>"TI CHATEAU CHINON", 'siret'=>"17180111100369", 'dep'=>"58"),
|
'CHINOI' => array('nom'=>"TI CHATEAU CHINON", 'siret'=>"17180111100369", 'dep'=>"58"),
|
||||||
'FUMAYI' => array('nom'=>"TI FUMAY", 'siret'=>"17510111200464", 'dep'=>"81"),
|
'FUMAYI' => array('nom'=>"TI FUMAY", 'siret'=>"17510111200464", 'dep'=>"08"),
|
||||||
'NEVERI' => array('nom'=>"TI NEVERS", 'siret'=>"17180111100377", 'dep'=>"58"),
|
'NEVERI' => array('nom'=>"TI NEVERS", 'siret'=>"17180111100377", 'dep'=>"58"),
|
||||||
'ANGOUI' => array('nom'=>"TI ANGOULEME", 'siret'=>"17330111000099", 'dep'=>"16"),
|
'ANGOUI' => array('nom'=>"TI ANGOULEME", 'siret'=>"17330111000099", 'dep'=>"16"),
|
||||||
'AMBERI' => array('nom'=>"TI AMBERT", 'siret'=>"17630111700022", 'dep'=>"63"),
|
'AMBERI' => array('nom'=>"TI AMBERT", 'siret'=>"17630111700022", 'dep'=>"63"),
|
||||||
'AURILI' => array('nom'=>"TI AURILLAC", 'siret'=>"17630111700394", 'dep'=>"15"),
|
'AURILI' => array('nom'=>"TI AURILLAC", 'siret'=>"17630111700394", 'dep'=>"15"),
|
||||||
'BARSUI' => array('nom'=>"TI BAR SUR AUBE", 'siret'=>"17510111200357", 'dep'=>"10"),
|
'BARSUI' => array('nom'=>"TI BAR SUR AUBE", 'siret'=>"17510111200357", 'dep'=>"10"),
|
||||||
'BELLEI' => array('nom'=>"TI BELLEY", 'siret'=>"17690111400502", 'dep'=>"13"),
|
'BELLEI' => array('nom'=>"TI BELLEY", 'siret'=>"17690111400502", 'dep'=>"01"),
|
||||||
'BRIEYI' => array('nom'=>"TI BRIEY", 'siret'=>"17540111600066", 'dep'=>"54"),
|
'BRIEYI' => array('nom'=>"TI BRIEY", 'siret'=>"17540111600066", 'dep'=>"54"),
|
||||||
'CHALOI' => array('nom'=>"TI CHALONS EN CHAMPAGNE", 'siret'=>"17510111200225", 'dep'=>"51"),
|
'CHALOI' => array('nom'=>"TI CHALONS EN CHAMPAGNE", 'siret'=>"17510111200225", 'dep'=>"51"),
|
||||||
'CHARLI' => array('nom'=>"TI CHARLEVILLE MEZIERES", 'siret'=>"17510111200324", 'dep'=>"80"),
|
'CHARLI' => array('nom'=>"TI CHARLEVILLE MEZIERES", 'siret'=>"17510111200324", 'dep'=>"08"),
|
||||||
'VILLFI' => array('nom'=>"TI VILLEFRANCHE SUR SAONE", 'siret'=>"17690111400510", 'dep'=>"69"),
|
'VILLFI' => array('nom'=>"TI VILLEFRANCHE SUR SAONE", 'siret'=>"17690111400510", 'dep'=>"69"),
|
||||||
'BRIOUI' => array('nom'=>"TI BRIOUDE", 'siret'=>"17630111700527", 'dep'=>"43"),
|
'BRIOUI' => array('nom'=>"TI BRIOUDE", 'siret'=>"17630111700527", 'dep'=>"43"),
|
||||||
'CROUXI' => array('nom'=>"TI CHATEAUROUX", 'siret'=>"17180111100138", 'dep'=>"36"),
|
'CROUXI' => array('nom'=>"TI CHATEAUROUX", 'siret'=>"17180111100138", 'dep'=>"36"),
|
||||||
@ -947,8 +947,8 @@ return array(
|
|||||||
'LYONI' => array('nom'=>"TI LYON 3EME", 'siret'=>"17690111400437", 'dep'=>"69"),
|
'LYONI' => array('nom'=>"TI LYON 3EME", 'siret'=>"17690111400437", 'dep'=>"69"),
|
||||||
'MAURII' => array('nom'=>"TI MAURIAC", 'siret'=>"17630111700436", 'dep'=>"15"),
|
'MAURII' => array('nom'=>"TI MAURIAC", 'siret'=>"17630111700436", 'dep'=>"15"),
|
||||||
'MONTEI' => array('nom'=>"TI MONTELIMAR", 'siret'=>"17380111900301", 'dep'=>"26"),
|
'MONTEI' => array('nom'=>"TI MONTELIMAR", 'siret'=>"17380111900301", 'dep'=>"26"),
|
||||||
'MONTLI' => array('nom'=>"TI MONTLUCON", 'siret'=>"17630111700261", 'dep'=>"31"),
|
'MONTLI' => array('nom'=>"TI MONTLUCON", 'siret'=>"17630111700261", 'dep'=>"03"),
|
||||||
'MOULII' => array('nom'=>"TI MOULINS", 'siret'=>"17630111700451", 'dep'=>"30"),
|
'MOULII' => array('nom'=>"TI MOULINS", 'siret'=>"17630111700451", 'dep'=>"03"),
|
||||||
'MARSAI' => array('nom'=>"TI MONT DE MARSAN", 'siret'=>"17640111500173", 'dep'=>"40"),
|
'MARSAI' => array('nom'=>"TI MONT DE MARSAN", 'siret'=>"17640111500173", 'dep'=>"40"),
|
||||||
'MURATI' => array('nom'=>"TI MURAT", 'siret'=>"17630111700105", 'dep'=>"15"),
|
'MURATI' => array('nom'=>"TI MURAT", 'siret'=>"17630111700105", 'dep'=>"15"),
|
||||||
'NANCYI' => array('nom'=>"TI NANCY", 'siret'=>"17540111600108", 'dep'=>"54"),
|
'NANCYI' => array('nom'=>"TI NANCY", 'siret'=>"17540111600108", 'dep'=>"54"),
|
||||||
@ -956,17 +956,17 @@ return array(
|
|||||||
'NOGENI' => array('nom'=>"TI NOGENT SUR SEINE", 'siret'=>"17510111200308", 'dep'=>"10"),
|
'NOGENI' => array('nom'=>"TI NOGENT SUR SEINE", 'siret'=>"17510111200308", 'dep'=>"10"),
|
||||||
'NEUFCI' => array('nom'=>"TI NEUFCHATEAU", 'siret'=>"17540111600363", 'dep'=>"88"),
|
'NEUFCI' => array('nom'=>"TI NEUFCHATEAU", 'siret'=>"17540111600363", 'dep'=>"88"),
|
||||||
'REIMSI' => array('nom'=>"TI REIMS", 'siret'=>"17510111200241", 'dep'=>"51"),
|
'REIMSI' => array('nom'=>"TI REIMS", 'siret'=>"17510111200241", 'dep'=>"51"),
|
||||||
'RETHEI' => array('nom'=>"TI RETHEL", 'siret'=>"17510111200316", 'dep'=>"83"),
|
'RETHEI' => array('nom'=>"TI RETHEL", 'siret'=>"17510111200316", 'dep'=>"08"),
|
||||||
'RIOMI' => array('nom'=>"TI RIOM", 'siret'=>"17630111700311", 'dep'=>"63"),
|
'RIOMI' => array('nom'=>"TI RIOM", 'siret'=>"17630111700311", 'dep'=>"63"),
|
||||||
'ROANNI' => array('nom'=>"TI ROANNE", 'siret'=>"17690111400163", 'dep'=>"42"),
|
'ROANNI' => array('nom'=>"TI ROANNE", 'siret'=>"17690111400163", 'dep'=>"42"),
|
||||||
'FLOURI' => array('nom'=>"TI SAINT FLOUR", 'siret'=>"17630111700444", 'dep'=>"15"),
|
'FLOURI' => array('nom'=>"TI SAINT FLOUR", 'siret'=>"17630111700444", 'dep'=>"15"),
|
||||||
'THIERI' => array('nom'=>"TI THIERS", 'siret'=>"17630111700329", 'dep'=>"63"),
|
'THIERI' => array('nom'=>"TI THIERS", 'siret'=>"17630111700329", 'dep'=>"63"),
|
||||||
'THONOI' => array('nom'=>"TI THONON LES BAINS", 'siret'=>"17730111600287", 'dep'=>"74"),
|
'THONOI' => array('nom'=>"TI THONON LES BAINS", 'siret'=>"17730111600287", 'dep'=>"74"),
|
||||||
'VICHYI' => array('nom'=>"TI VICHY", 'siret'=>"17630111700287", 'dep'=>"32"),
|
'VICHYI' => array('nom'=>"TI VICHY", 'siret'=>"17630111700287", 'dep'=>"03"),
|
||||||
'VIENNI' => array('nom'=>"TI VIENNE", 'siret'=>"17380111900236", 'dep'=>"38"),
|
'VIENNI' => array('nom'=>"TI VIENNE", 'siret'=>"17380111900236", 'dep'=>"38"),
|
||||||
'VBANNI' => array('nom'=>"TI VILLEURBANNE", 'siret'=>"17690111400346", 'dep'=>"69"),
|
'VBANNI' => array('nom'=>"TI VILLEURBANNE", 'siret'=>"17690111400346", 'dep'=>"69"),
|
||||||
'VITRYI' => array('nom'=>"TI VITRY LE FRANCOIS", 'siret'=>"17510111200217", 'dep'=>"51"),
|
'VITRYI' => array('nom'=>"TI VITRY LE FRANCOIS", 'siret'=>"17510111200217", 'dep'=>"51"),
|
||||||
'VOUZII' => array('nom'=>"TI VOUZIERS", 'siret'=>"17510111200340", 'dep'=>"84"),
|
'VOUZII' => array('nom'=>"TI VOUZIERS", 'siret'=>"17510111200340", 'dep'=>"08"),
|
||||||
'ALESI' => array('nom'=>"TI ALES", 'siret'=>"17300111600305", 'dep'=>"30"),
|
'ALESI' => array('nom'=>"TI ALES", 'siret'=>"17300111600305", 'dep'=>"30"),
|
||||||
'APTI' => array('nom'=>"TI APT", 'siret'=>"17300111600370", 'dep'=>"84"),
|
'APTI' => array('nom'=>"TI APT", 'siret'=>"17300111600370", 'dep'=>"84"),
|
||||||
'OLONNI' => array('nom'=>"TI DES SABLES D'OLONNE", 'siret'=>"17860111800635", 'dep'=>"85"),
|
'OLONNI' => array('nom'=>"TI DES SABLES D'OLONNE", 'siret'=>"17860111800635", 'dep'=>"85"),
|
||||||
@ -981,12 +981,12 @@ return array(
|
|||||||
'DIJONI' => array('nom'=>"TI DIJON", 'siret'=>"17210111500472", 'dep'=>"21"),
|
'DIJONI' => array('nom'=>"TI DIJON", 'siret'=>"17210111500472", 'dep'=>"21"),
|
||||||
'MAYENI' => array('nom'=>"TI MAYENNE", 'siret'=>"17490111600296", 'dep'=>"53"),
|
'MAYENI' => array('nom'=>"TI MAYENNE", 'siret'=>"17490111600296", 'dep'=>"53"),
|
||||||
'GONTII' => array('nom'=>"TI CHATEAU GONTIER", 'siret'=>"17490111600288", 'dep'=>"53"),
|
'GONTII' => array('nom'=>"TI CHATEAU GONTIER", 'siret'=>"17490111600288", 'dep'=>"53"),
|
||||||
'MANOSI' => array('nom'=>"TI MANOSQUE", 'siret'=>"17130111200453", 'dep'=>"41"),
|
'MANOSI' => array('nom'=>"TI MANOSQUE", 'siret'=>"17130111200453", 'dep'=>"04"),
|
||||||
'FORCAI' => array('nom'=>"TI FORCALQUIER", 'siret'=>"17130111200446", 'dep'=>"41"),
|
'FORCAI' => array('nom'=>"TI FORCALQUIER", 'siret'=>"17130111200446", 'dep'=>"04"),
|
||||||
'TOURNI' => array('nom'=>"TI TOURNON SUR RHONE", 'siret'=>"17300111600065", 'dep'=>"73"),
|
'TOURNI' => array('nom'=>"TI TOURNON SUR RHONE", 'siret'=>"17300111600065", 'dep'=>"07"),
|
||||||
'FOIXI' => array('nom'=>"TI FOIX", 'siret'=>"17310111400192", 'dep'=>"90"),
|
'FOIXI' => array('nom'=>"TI FOIX", 'siret'=>"17310111400192", 'dep'=>"09"),
|
||||||
'PAMIEI' => array('nom'=>"TI PAMIERS", 'siret'=>"17310111400184", 'dep'=>"91"),
|
'PAMIEI' => array('nom'=>"TI PAMIERS", 'siret'=>"17310111400184", 'dep'=>"09"),
|
||||||
'GIRONI' => array('nom'=>"TI SAINT GIRONS", 'siret'=>"17310111400317", 'dep'=>"92"),
|
'GIRONI' => array('nom'=>"TI SAINT GIRONS", 'siret'=>"17310111400317", 'dep'=>"09"),
|
||||||
'ROUERI' => array('nom'=>"TI VILLEFRANCHE DE ROUERGUE", 'siret'=>"17340111800240", 'dep'=>"12"),
|
'ROUERI' => array('nom'=>"TI VILLEFRANCHE DE ROUERGUE", 'siret'=>"17340111800240", 'dep'=>"12"),
|
||||||
'AFFRII' => array('nom'=>"TI SAINT AFFRIQUE", 'siret'=>"17340111800273", 'dep'=>"12"),
|
'AFFRII' => array('nom'=>"TI SAINT AFFRIQUE", 'siret'=>"17340111800273", 'dep'=>"12"),
|
||||||
'ESPALI' => array('nom'=>"TI ESPALION", 'siret'=>"17340111800125", 'dep'=>"12"),
|
'ESPALI' => array('nom'=>"TI ESPALION", 'siret'=>"17340111800125", 'dep'=>"12"),
|
||||||
@ -1070,7 +1070,7 @@ return array(
|
|||||||
'LOUHAI' => array('nom'=>"TI LOUHANS", 'siret'=>"17210111500407", 'dep'=>"71"),
|
'LOUHAI' => array('nom'=>"TI LOUHANS", 'siret'=>"17210111500407", 'dep'=>"71"),
|
||||||
'FONTEI' => array('nom'=>"TI FONTENAY LE COMTE", 'siret'=>"17860111800403", 'dep'=>"85"),
|
'FONTEI' => array('nom'=>"TI FONTENAY LE COMTE", 'siret'=>"17860111800403", 'dep'=>"85"),
|
||||||
'BELFOI' => array('nom'=>"TI BELFORT", 'siret'=>"17250111600310", 'dep'=>"90"),
|
'BELFOI' => array('nom'=>"TI BELFORT", 'siret'=>"17250111600310", 'dep'=>"90"),
|
||||||
'CAGNEI' => array('nom'=>"TI CAGNES SUR MER", 'siret'=>"17130111200719", 'dep'=>"68"),
|
'CAGNEI' => array('nom'=>"TI CAGNES SUR MER", 'siret'=>"17130111200719", 'dep'=>"06"),
|
||||||
'AGENI' => array('nom'=>"TI AGEN", 'siret'=>"17470111000218", 'dep'=>"47"),
|
'AGENI' => array('nom'=>"TI AGEN", 'siret'=>"17470111000218", 'dep'=>"47"),
|
||||||
'MARMAI' => array('nom'=>"TI MARMANDE", 'siret'=>"17470111000226", 'dep'=>"47"),
|
'MARMAI' => array('nom'=>"TI MARMANDE", 'siret'=>"17470111000226", 'dep'=>"47"),
|
||||||
'VILOTI' => array('nom'=>"TI VILLENEUVE SUR LOT", 'siret'=>"17470111000242", 'dep'=>"47"),
|
'VILOTI' => array('nom'=>"TI VILLENEUVE SUR LOT", 'siret'=>"17470111000242", 'dep'=>"47"),
|
||||||
@ -1078,7 +1078,7 @@ return array(
|
|||||||
'PAUI' => array('nom'=>"TI PAU", 'siret'=>"17640111500215", 'dep'=>"64"),
|
'PAUI' => array('nom'=>"TI PAU", 'siret'=>"17640111500215", 'dep'=>"64"),
|
||||||
'LILLEI' => array('nom'=>"TI LILLE", 'siret'=>"17590111500717", 'dep'=>"59"),
|
'LILLEI' => array('nom'=>"TI LILLE", 'siret'=>"17590111500717", 'dep'=>"59"),
|
||||||
'ARRASI' => array('nom'=>"TI ARRAS", 'siret'=>"17590111500808", 'dep'=>"62"),
|
'ARRASI' => array('nom'=>"TI ARRAS", 'siret'=>"17590111500808", 'dep'=>"62"),
|
||||||
'LARGEI' => array('nom'=>"TI LARGENTIERE", 'siret'=>"17300111600255", 'dep'=>"71"),
|
'LARGEI' => array('nom'=>"TI LARGENTIERE", 'siret'=>"17300111600255", 'dep'=>"07"),
|
||||||
'MANSI' => array('nom'=>"TI LE MANS", 'siret'=>"17490111600361", 'dep'=>"72"),
|
'MANSI' => array('nom'=>"TI LE MANS", 'siret'=>"17490111600361", 'dep'=>"72"),
|
||||||
'ST LOI' => array('nom'=>"TI SAINT LO", 'siret'=>"17140111000324", 'dep'=>"50"),
|
'ST LOI' => array('nom'=>"TI SAINT LO", 'siret'=>"17140111000324", 'dep'=>"50"),
|
||||||
'AVRAI' => array('nom'=>"TI AVRANCHES", 'siret'=>"17140111000233", 'dep'=>"50"),
|
'AVRAI' => array('nom'=>"TI AVRANCHES", 'siret'=>"17140111000233", 'dep'=>"50"),
|
||||||
@ -1092,13 +1092,13 @@ return array(
|
|||||||
'SETEI' => array('nom'=>"TI SETE", 'siret'=>"17340111800430", 'dep'=>"34"),
|
'SETEI' => array('nom'=>"TI SETE", 'siret'=>"17340111800430", 'dep'=>"34"),
|
||||||
'CERETI' => array('nom'=>"TI CERET", 'siret'=>"17340111800471", 'dep'=>"66"),
|
'CERETI' => array('nom'=>"TI CERET", 'siret'=>"17340111800471", 'dep'=>"66"),
|
||||||
'PRADEI' => array('nom'=>"TI PRADES", 'siret'=>"17340111800463", 'dep'=>"66"),
|
'PRADEI' => array('nom'=>"TI PRADES", 'siret'=>"17340111800463", 'dep'=>"66"),
|
||||||
'DIGNEI' => array('nom'=>"TI DIGNE", 'siret'=>"17130111200727", 'dep'=>"40"),
|
'DIGNEI' => array('nom'=>"TI DIGNE", 'siret'=>"17130111200727", 'dep'=>"04"),
|
||||||
'SPAULI' => array('nom'=>"TI SAINT PAUL", 'siret'=>"17974111100076", 'dep'=>"978"),
|
'SPAULI' => array('nom'=>"TI SAINT PAUL", 'siret'=>"17974111100076", 'dep'=>"978"),
|
||||||
'BENOII' => array('nom'=>"TI SAINT BENOIT", 'siret'=>"17974111100084", 'dep'=>"974"),
|
'BENOII' => array('nom'=>"TI SAINT BENOIT", 'siret'=>"17974111100084", 'dep'=>"974"),
|
||||||
'MIRECI' => array('nom'=>"TI MIRECOURT", 'siret'=>"17540111600397", 'dep'=>"88"),
|
'MIRECI' => array('nom'=>"TI MIRECOURT", 'siret'=>"17540111600397", 'dep'=>"88"),
|
||||||
'MIHIEI' => array('nom'=>"TI SAINT MIHIEL", 'siret'=>"17540111600405", 'dep'=>"55"),
|
'MIHIEI' => array('nom'=>"TI SAINT MIHIEL", 'siret'=>"17540111600405", 'dep'=>"55"),
|
||||||
'YRIEXI' => array('nom'=>"TI SAINT YRIEIX LA PERCHE", 'siret'=>"17870111600265", 'dep'=>"87"),
|
'YRIEXI' => array('nom'=>"TI SAINT YRIEIX LA PERCHE", 'siret'=>"17870111600265", 'dep'=>"87"),
|
||||||
'BARCEI' => array('nom'=>"TI BARCELONNETTE", 'siret'=>"17130111200743", 'dep'=>"44"),
|
'BARCEI' => array('nom'=>"TI BARCELONNETTE", 'siret'=>"17130111200743", 'dep'=>"04"),
|
||||||
'LUNEVI' => array('nom'=>"TI LUNEVILLE", 'siret'=>"17540111600421", 'dep'=>"54"),
|
'LUNEVI' => array('nom'=>"TI LUNEVILLE", 'siret'=>"17540111600421", 'dep'=>"54"),
|
||||||
'REMIRI' => array('nom'=>"TI REMIREMONT", 'siret'=>"17540111600439", 'dep'=>"88"),
|
'REMIRI' => array('nom'=>"TI REMIREMONT", 'siret'=>"17540111600439", 'dep'=>"88"),
|
||||||
'ALENCI' => array('nom'=>"TI ALENCON", 'siret'=>"17140111000381", 'dep'=>"61"),
|
'ALENCI' => array('nom'=>"TI ALENCON", 'siret'=>"17140111000381", 'dep'=>"61"),
|
||||||
@ -1113,14 +1113,14 @@ return array(
|
|||||||
'MEAUXI' => array('nom'=>"TI MEAUX", 'siret'=>"17750111101250", 'dep'=>"77"),
|
'MEAUXI' => array('nom'=>"TI MEAUX", 'siret'=>"17750111101250", 'dep'=>"77"),
|
||||||
'AUBAGI' => array('nom'=>"TI AUBAGNE", 'siret'=>"17130111200339", 'dep'=>"13"),
|
'AUBAGI' => array('nom'=>"TI AUBAGNE", 'siret'=>"17130111200339", 'dep'=>"13"),
|
||||||
'BRIGNI' => array('nom'=>"TI BRIGNOLES", 'siret'=>"17130111200545", 'dep'=>"83"),
|
'BRIGNI' => array('nom'=>"TI BRIGNOLES", 'siret'=>"17130111200545", 'dep'=>"83"),
|
||||||
'CANNEI' => array('nom'=>"TI CANNES", 'siret'=>"17130111200362", 'dep'=>"64"),
|
'CANNEI' => array('nom'=>"TI CANNES", 'siret'=>"17130111200362", 'dep'=>"06"),
|
||||||
'ABBEVI' => array('nom'=>"TI ABBEVILLE", 'siret'=>"17800111100396", 'dep'=>"80"),
|
'ABBEVI' => array('nom'=>"TI ABBEVILLE", 'siret'=>"17800111100396", 'dep'=>"80"),
|
||||||
'AIXLEI' => array('nom'=>"TI AIX LES BAINS", 'siret'=>"17730111600253", 'dep'=>"73"),
|
'AIXLEI' => array('nom'=>"TI AIX LES BAINS", 'siret'=>"17730111600253", 'dep'=>"73"),
|
||||||
'ALTKII' => array('nom'=>"TI ALTKIRCH", 'siret'=>"17680111600094", 'dep'=>"68"),
|
'ALTKII' => array('nom'=>"TI ALTKIRCH", 'siret'=>"17680111600094", 'dep'=>"68"),
|
||||||
'AMIENI' => array('nom'=>"TI AMIENS", 'siret'=>"17800111100404", 'dep'=>"80"),
|
'AMIENI' => array('nom'=>"TI AMIENS", 'siret'=>"17800111100404", 'dep'=>"80"),
|
||||||
'ANNECI' => array('nom'=>"TI ANNECY", 'siret'=>"17730111600154", 'dep'=>"74"),
|
'ANNECI' => array('nom'=>"TI ANNECY", 'siret'=>"17730111600154", 'dep'=>"74"),
|
||||||
'ANNEMI' => array('nom'=>"TI ANNEMASSE", 'siret'=>"17730111600303", 'dep'=>"74"),
|
'ANNEMI' => array('nom'=>"TI ANNEMASSE", 'siret'=>"17730111600303", 'dep'=>"74"),
|
||||||
'ANTIBI' => array('nom'=>"TI ANTIBES", 'siret'=>"17130111200354", 'dep'=>"66"),
|
'ANTIBI' => array('nom'=>"TI ANTIBES", 'siret'=>"17130111200354", 'dep'=>"06"),
|
||||||
'ANTONI' => array('nom'=>"TI ANTONY", 'siret'=>"17780111500250", 'dep'=>"92"),
|
'ANTONI' => array('nom'=>"TI ANTONY", 'siret'=>"17780111500250", 'dep'=>"92"),
|
||||||
'ARGENI' => array('nom'=>"TI ARGENTAN", 'siret'=>"17140111000357", 'dep'=>"61"),
|
'ARGENI' => array('nom'=>"TI ARGENTAN", 'siret'=>"17140111000357", 'dep'=>"61"),
|
||||||
'ARLESI' => array('nom'=>"TI ARLES", 'siret'=>"17130111200115", 'dep'=>"13"),
|
'ARLESI' => array('nom'=>"TI ARLES", 'siret'=>"17130111200115", 'dep'=>"13"),
|
||||||
@ -1146,7 +1146,7 @@ return array(
|
|||||||
'BOBIGI' => array('nom'=>"TI BOBIGNY", 'siret'=>"17750111101086", 'dep'=>"93"),
|
'BOBIGI' => array('nom'=>"TI BOBIGNY", 'siret'=>"17750111101086", 'dep'=>"93"),
|
||||||
'BOULOI' => array('nom'=>"TI BOULOGNE BILLANCOURT", 'siret'=>"17780111500276", 'dep'=>"92"),
|
'BOULOI' => array('nom'=>"TI BOULOGNE BILLANCOURT", 'siret'=>"17780111500276", 'dep'=>"92"),
|
||||||
'BRUMAI' => array('nom'=>"TI BRUMATH", 'siret'=>"17680111600250", 'dep'=>"67"),
|
'BRUMAI' => array('nom'=>"TI BRUMATH", 'siret'=>"17680111600250", 'dep'=>"67"),
|
||||||
'CTHIEI' => array('nom'=>"TI CHATEAU THIERRY", 'siret'=>"17800111100362", 'dep'=>"24"),
|
'CTHIEI' => array('nom'=>"TI CHATEAU THIERRY", 'siret'=>"17800111100362", 'dep'=>"02"),
|
||||||
'CHINNI' => array('nom'=>"TI CHINON", 'siret'=>"17450111400253", 'dep'=>"37"),
|
'CHINNI' => array('nom'=>"TI CHINON", 'siret'=>"17450111400253", 'dep'=>"37"),
|
||||||
'CLEROI' => array('nom'=>"TI CLERMONT", 'siret'=>"17800111100461", 'dep'=>"60"),
|
'CLEROI' => array('nom'=>"TI CLERMONT", 'siret'=>"17800111100461", 'dep'=>"60"),
|
||||||
'CLICHI' => array('nom'=>"TI CLICHY", 'siret'=>"17780111500284", 'dep'=>"92"),
|
'CLICHI' => array('nom'=>"TI CLICHY", 'siret'=>"17780111500284", 'dep'=>"92"),
|
||||||
@ -1160,13 +1160,13 @@ return array(
|
|||||||
'FREJUI' => array('nom'=>"TI FREJUS", 'siret'=>"17130111200560", 'dep'=>"83"),
|
'FREJUI' => array('nom'=>"TI FREJUS", 'siret'=>"17130111200560", 'dep'=>"83"),
|
||||||
'GIENI' => array('nom'=>"TI GIEN", 'siret'=>"17450111400188", 'dep'=>"45"),
|
'GIENI' => array('nom'=>"TI GIEN", 'siret'=>"17450111400188", 'dep'=>"45"),
|
||||||
'GONESI' => array('nom'=>"TI GONESSE", 'siret'=>"17780111500227", 'dep'=>"95"),
|
'GONESI' => array('nom'=>"TI GONESSE", 'siret'=>"17780111500227", 'dep'=>"95"),
|
||||||
'GRASSI' => array('nom'=>"TI GRASSE", 'siret'=>"17130111200370", 'dep'=>"61"),
|
'GRASSI' => array('nom'=>"TI GRASSE", 'siret'=>"17130111200370", 'dep'=>"06"),
|
||||||
'GRENOI' => array('nom'=>"TI GRENOBLE", 'siret'=>"17380111900038", 'dep'=>"38"),
|
'GRENOI' => array('nom'=>"TI GRENOBLE", 'siret'=>"17380111900038", 'dep'=>"38"),
|
||||||
'GUEBWI' => array('nom'=>"TI GUEBWILLER", 'siret'=>"17680111600086", 'dep'=>"68"),
|
'GUEBWI' => array('nom'=>"TI GUEBWILLER", 'siret'=>"17680111600086", 'dep'=>"68"),
|
||||||
'HAGUEI' => array('nom'=>"TI HAGUENAU", 'siret'=>"17680111600219", 'dep'=>"67"),
|
'HAGUEI' => array('nom'=>"TI HAGUENAU", 'siret'=>"17680111600219", 'dep'=>"67"),
|
||||||
'HUNINI' => array('nom'=>"TI HUNINGUE", 'siret'=>"17680111600060", 'dep'=>"68"),
|
'HUNINI' => array('nom'=>"TI HUNINGUE", 'siret'=>"17680111600060", 'dep'=>"68"),
|
||||||
'JUVISI' => array('nom'=>"TI JUVISY SUR ORGE", 'siret'=>"17750111100898", 'dep'=>"91"),
|
'JUVISI' => array('nom'=>"TI JUVISY SUR ORGE", 'siret'=>"17750111100898", 'dep'=>"91"),
|
||||||
'LAONI' => array('nom'=>"TI LAON", 'siret'=>"17800111100446", 'dep'=>"20"),
|
'LAONI' => array('nom'=>"TI LAON", 'siret'=>"17800111100446", 'dep'=>"02"),
|
||||||
'LEVALI' => array('nom'=>"TI LEVALLOIS PERRET", 'siret'=>"17780111500300", 'dep'=>"92"),
|
'LEVALI' => array('nom'=>"TI LEVALLOIS PERRET", 'siret'=>"17780111500300", 'dep'=>"92"),
|
||||||
'LISIEI' => array('nom'=>"TI LISIEUX", 'siret'=>"17140111000399", 'dep'=>"14"),
|
'LISIEI' => array('nom'=>"TI LISIEUX", 'siret'=>"17140111000399", 'dep'=>"14"),
|
||||||
'LOCHEI' => array('nom'=>"TI LOCHES", 'siret'=>"17450111400246", 'dep'=>"37"),
|
'LOCHEI' => array('nom'=>"TI LOCHES", 'siret'=>"17450111400246", 'dep'=>"37"),
|
||||||
@ -1185,9 +1185,9 @@ return array(
|
|||||||
'SEGREI' => array('nom'=>"TI SEGRE", 'siret'=>"17490111600387", 'dep'=>"49"),
|
'SEGREI' => array('nom'=>"TI SEGRE", 'siret'=>"17490111600387", 'dep'=>"49"),
|
||||||
'SELESI' => array('nom'=>"TI SELESTAT", 'siret'=>"17680111600177", 'dep'=>"67"),
|
'SELESI' => array('nom'=>"TI SELESTAT", 'siret'=>"17680111600177", 'dep'=>"67"),
|
||||||
'SENLII' => array('nom'=>"TI SENLIS", 'siret'=>"17800111100479", 'dep'=>"60"),
|
'SENLII' => array('nom'=>"TI SENLIS", 'siret'=>"17800111100479", 'dep'=>"60"),
|
||||||
'SOISSI' => array('nom'=>"TI SOISSONS", 'siret'=>"17800111100370", 'dep'=>"22"),
|
'SOISSI' => array('nom'=>"TI SOISSONS", 'siret'=>"17800111100370", 'dep'=>"02"),
|
||||||
'SPALAI' => array('nom'=>"TI SAINT PALAIS", 'siret'=>"17640111500223", 'dep'=>"64"),
|
'SPALAI' => array('nom'=>"TI SAINT PALAIS", 'siret'=>"17640111500223", 'dep'=>"64"),
|
||||||
'SQUENI' => array('nom'=>"TI SAINT QUENTIN", 'siret'=>"17800111100438", 'dep'=>"23"),
|
'SQUENI' => array('nom'=>"TI SAINT QUENTIN", 'siret'=>"17800111100438", 'dep'=>"02"),
|
||||||
'THANNI' => array('nom'=>"TI THANN", 'siret'=>"17680111600037", 'dep'=>"68"),
|
'THANNI' => array('nom'=>"TI THANN", 'siret'=>"17680111600037", 'dep'=>"68"),
|
||||||
'TOULNI' => array('nom'=>"TI TOULON", 'siret'=>"17130111200578", 'dep'=>"83"),
|
'TOULNI' => array('nom'=>"TI TOULON", 'siret'=>"17130111200578", 'dep'=>"83"),
|
||||||
'TOURSI' => array('nom'=>"TI TOURS", 'siret'=>"17450111400220", 'dep'=>"37"),
|
'TOURSI' => array('nom'=>"TI TOURS", 'siret'=>"17450111400220", 'dep'=>"37"),
|
||||||
@ -1254,7 +1254,7 @@ return array(
|
|||||||
'BOBIGE' => array('nom'=>"Tribunal pour Enfants de Bobigny", 'siret'=>"", 'dep'=>"93"),
|
'BOBIGE' => array('nom'=>"Tribunal pour Enfants de Bobigny", 'siret'=>"", 'dep'=>"93"),
|
||||||
'BORDEE' => array('nom'=>"Tribunal pour Enfants de Bordeaux", 'siret'=>"", 'dep'=>"33"),
|
'BORDEE' => array('nom'=>"Tribunal pour Enfants de Bordeaux", 'siret'=>"", 'dep'=>"33"),
|
||||||
'BOULOE' => array('nom'=>"Tribunal pour Enfants de Boulogne-Sur-Mer", 'siret'=>"", 'dep'=>"62"),
|
'BOULOE' => array('nom'=>"Tribunal pour Enfants de Boulogne-Sur-Mer", 'siret'=>"", 'dep'=>"62"),
|
||||||
'BOURGE' => array('nom'=>"Tribunal pour Enfants de Bourg-en-Bresse", 'siret'=>"", 'dep'=>"10"),
|
'BOURGE' => array('nom'=>"Tribunal pour Enfants de Bourg-en-Bresse", 'siret'=>"", 'dep'=>"01"),
|
||||||
'BOURHE' => array('nom'=>"Tribunal pour Enfants de Bourges", 'siret'=>"", 'dep'=>"18"),
|
'BOURHE' => array('nom'=>"Tribunal pour Enfants de Bourges", 'siret'=>"", 'dep'=>"18"),
|
||||||
'JALLIE' => array('nom'=>"Tribunal pour Enfants de Bourgoin-Jallieu", 'siret'=>"", 'dep'=>"38"),
|
'JALLIE' => array('nom'=>"Tribunal pour Enfants de Bourgoin-Jallieu", 'siret'=>"", 'dep'=>"38"),
|
||||||
'BRESTE' => array('nom'=>"Tribunal pour Enfants de Brest", 'siret'=>"", 'dep'=>"29"),
|
'BRESTE' => array('nom'=>"Tribunal pour Enfants de Brest", 'siret'=>"", 'dep'=>"29"),
|
||||||
@ -1270,7 +1270,7 @@ return array(
|
|||||||
'CHALOE' => array('nom'=>"Tribunal pour Enfants de Châlons-en-Champagne", 'siret'=>"", 'dep'=>"51"),
|
'CHALOE' => array('nom'=>"Tribunal pour Enfants de Châlons-en-Champagne", 'siret'=>"", 'dep'=>"51"),
|
||||||
'CHALSE' => array('nom'=>"Tribunal pour Enfants de Chalon-sur-Saône", 'siret'=>"", 'dep'=>"71"),
|
'CHALSE' => array('nom'=>"Tribunal pour Enfants de Chalon-sur-Saône", 'siret'=>"", 'dep'=>"71"),
|
||||||
'CHAMBE' => array('nom'=>"Tribunal pour Enfants de Chambéry", 'siret'=>"", 'dep'=>"73"),
|
'CHAMBE' => array('nom'=>"Tribunal pour Enfants de Chambéry", 'siret'=>"", 'dep'=>"73"),
|
||||||
'CHARLE' => array('nom'=>"Tribunal pour Enfants de Charleville-Mézières", 'siret'=>"", 'dep'=>"80"),
|
'CHARLE' => array('nom'=>"Tribunal pour Enfants de Charleville-Mézières", 'siret'=>"", 'dep'=>"08"),
|
||||||
'CHARTE' => array('nom'=>"Tribunal pour Enfants de Chartres", 'siret'=>"", 'dep'=>"28"),
|
'CHARTE' => array('nom'=>"Tribunal pour Enfants de Chartres", 'siret'=>"", 'dep'=>"28"),
|
||||||
'CHATEE' => array('nom'=>"Tribunal pour Enfants de Châteauroux", 'siret'=>"", 'dep'=>"36"),
|
'CHATEE' => array('nom'=>"Tribunal pour Enfants de Châteauroux", 'siret'=>"", 'dep'=>"36"),
|
||||||
'CHAUME' => array('nom'=>"Tribunal pour Enfants de Chaumont", 'siret'=>"", 'dep'=>"52"),
|
'CHAUME' => array('nom'=>"Tribunal pour Enfants de Chaumont", 'siret'=>"", 'dep'=>"52"),
|
||||||
@ -1282,20 +1282,20 @@ return array(
|
|||||||
'CRETEE' => array('nom'=>"Tribunal pour Enfants de Créteil", 'siret'=>"", 'dep'=>"94"),
|
'CRETEE' => array('nom'=>"Tribunal pour Enfants de Créteil", 'siret'=>"", 'dep'=>"94"),
|
||||||
'DAXE' => array('nom'=>"Tribunal pour Enfants de Dax", 'siret'=>"", 'dep'=>"40"),
|
'DAXE' => array('nom'=>"Tribunal pour Enfants de Dax", 'siret'=>"", 'dep'=>"40"),
|
||||||
'DIEPPE' => array('nom'=>"Tribunal pour Enfants de Dieppe", 'siret'=>"", 'dep'=>"76"),
|
'DIEPPE' => array('nom'=>"Tribunal pour Enfants de Dieppe", 'siret'=>"", 'dep'=>"76"),
|
||||||
'DIGNEE' => array('nom'=>"Tribunal pour Enfants de Digne-les-Bains", 'siret'=>"", 'dep'=>"40"),
|
'DIGNEE' => array('nom'=>"Tribunal pour Enfants de Digne-les-Bains", 'siret'=>"", 'dep'=>"04"),
|
||||||
'DIJONE' => array('nom'=>"Tribunal pour Enfants de Dijon", 'siret'=>"", 'dep'=>"21"),
|
'DIJONE' => array('nom'=>"Tribunal pour Enfants de Dijon", 'siret'=>"", 'dep'=>"21"),
|
||||||
'DOUAIE' => array('nom'=>"Tribunal pour Enfants de Douai", 'siret'=>"", 'dep'=>"59"),
|
'DOUAIE' => array('nom'=>"Tribunal pour Enfants de Douai", 'siret'=>"", 'dep'=>"59"),
|
||||||
'DRAGUE' => array('nom'=>"Tribunal pour Enfants de Draguignan", 'siret'=>"", 'dep'=>"83"),
|
'DRAGUE' => array('nom'=>"Tribunal pour Enfants de Draguignan", 'siret'=>"", 'dep'=>"83"),
|
||||||
'DUNKEE' => array('nom'=>"Tribunal pour Enfants de Dunkerque", 'siret'=>"", 'dep'=>"59"),
|
'DUNKEE' => array('nom'=>"Tribunal pour Enfants de Dunkerque", 'siret'=>"", 'dep'=>"59"),
|
||||||
'FOIXE' => array('nom'=>"Tribunal pour Enfants de Foix", 'siret'=>"", 'dep'=>"90"),
|
'FOIXE' => array('nom'=>"Tribunal pour Enfants de Foix", 'siret'=>"", 'dep'=>"09"),
|
||||||
'FORTDE' => array('nom'=>"Tribunal pour Enfants de Fort-de-France", 'siret'=>"", 'dep'=>"972"),
|
'FORTDE' => array('nom'=>"Tribunal pour Enfants de Fort-de-France", 'siret'=>"", 'dep'=>"972"),
|
||||||
'GAPE' => array('nom'=>"Tribunal pour Enfants de Gap", 'siret'=>"", 'dep'=>"50"),
|
'GAPE' => array('nom'=>"Tribunal pour Enfants de Gap", 'siret'=>"", 'dep'=>"05"),
|
||||||
'GRASSE' => array('nom'=>"Tribunal pour Enfants de Grasse", 'siret'=>"", 'dep'=>"61"),
|
'GRASSE' => array('nom'=>"Tribunal pour Enfants de Grasse", 'siret'=>"", 'dep'=>"06"),
|
||||||
'GRENOE' => array('nom'=>"Tribunal pour Enfants de Grenoble", 'siret'=>"", 'dep'=>"38"),
|
'GRENOE' => array('nom'=>"Tribunal pour Enfants de Grenoble", 'siret'=>"", 'dep'=>"38"),
|
||||||
'GUEREE' => array('nom'=>"Tribunal pour Enfants de Guéret", 'siret'=>"", 'dep'=>"23"),
|
'GUEREE' => array('nom'=>"Tribunal pour Enfants de Guéret", 'siret'=>"", 'dep'=>"23"),
|
||||||
'GUINGE' => array('nom'=>"Tribunal pour Enfants de Guingamp", 'siret'=>"", 'dep'=>"22"),
|
'GUINGE' => array('nom'=>"Tribunal pour Enfants de Guingamp", 'siret'=>"", 'dep'=>"22"),
|
||||||
'LAROCE' => array('nom'=>"Tribunal pour Enfants de La Rochelle", 'siret'=>"", 'dep'=>"17"),
|
'LAROCE' => array('nom'=>"Tribunal pour Enfants de La Rochelle", 'siret'=>"", 'dep'=>"17"),
|
||||||
'LAONE' => array('nom'=>"Tribunal pour Enfants de Laon", 'siret'=>"", 'dep'=>"20"),
|
'LAONE' => array('nom'=>"Tribunal pour Enfants de Laon", 'siret'=>"", 'dep'=>"02"),
|
||||||
'LAVALE' => array('nom'=>"Tribunal pour Enfants de Laval", 'siret'=>"", 'dep'=>"53"),
|
'LAVALE' => array('nom'=>"Tribunal pour Enfants de Laval", 'siret'=>"", 'dep'=>"53"),
|
||||||
'LIBOUE' => array('nom'=>"Tribunal pour Enfants de Libourne", 'siret'=>"", 'dep'=>"33"),
|
'LIBOUE' => array('nom'=>"Tribunal pour Enfants de Libourne", 'siret'=>"", 'dep'=>"33"),
|
||||||
'LILLEE' => array('nom'=>"Tribunal pour Enfants de Lille", 'siret'=>"", 'dep'=>"59"),
|
'LILLEE' => array('nom'=>"Tribunal pour Enfants de Lille", 'siret'=>"", 'dep'=>"59"),
|
||||||
@ -1315,13 +1315,13 @@ return array(
|
|||||||
'MONTBE' => array('nom'=>"Tribunal pour Enfants de Montbéliard", 'siret'=>"", 'dep'=>"25"),
|
'MONTBE' => array('nom'=>"Tribunal pour Enfants de Montbéliard", 'siret'=>"", 'dep'=>"25"),
|
||||||
'MONTDE' => array('nom'=>"Tribunal pour Enfants de Mont-de-Marsan", 'siret'=>"", 'dep'=>"40"),
|
'MONTDE' => array('nom'=>"Tribunal pour Enfants de Mont-de-Marsan", 'siret'=>"", 'dep'=>"40"),
|
||||||
'MONTPE' => array('nom'=>"Tribunal pour Enfants de Montpellier", 'siret'=>"", 'dep'=>"34"),
|
'MONTPE' => array('nom'=>"Tribunal pour Enfants de Montpellier", 'siret'=>"", 'dep'=>"34"),
|
||||||
'MOULIE' => array('nom'=>"Tribunal pour Enfants de Moulins", 'siret'=>"", 'dep'=>"30"),
|
'MOULIE' => array('nom'=>"Tribunal pour Enfants de Moulins", 'siret'=>"", 'dep'=>"03"),
|
||||||
'MULHOE' => array('nom'=>"Tribunal pour Enfants de Mulhouse", 'siret'=>"", 'dep'=>"68"),
|
'MULHOE' => array('nom'=>"Tribunal pour Enfants de Mulhouse", 'siret'=>"", 'dep'=>"68"),
|
||||||
'NANCYE' => array('nom'=>"Tribunal pour Enfants de Nancy", 'siret'=>"", 'dep'=>"54"),
|
'NANCYE' => array('nom'=>"Tribunal pour Enfants de Nancy", 'siret'=>"", 'dep'=>"54"),
|
||||||
'NANTEE' => array('nom'=>"Tribunal pour Enfants de Nanterre", 'siret'=>"", 'dep'=>"92"),
|
'NANTEE' => array('nom'=>"Tribunal pour Enfants de Nanterre", 'siret'=>"", 'dep'=>"92"),
|
||||||
'NARBOE' => array('nom'=>"Tribunal pour Enfants de Narbonne", 'siret'=>"", 'dep'=>"11"),
|
'NARBOE' => array('nom'=>"Tribunal pour Enfants de Narbonne", 'siret'=>"", 'dep'=>"11"),
|
||||||
'NEVERE' => array('nom'=>"Tribunal pour Enfants de Nevers", 'siret'=>"", 'dep'=>"58"),
|
'NEVERE' => array('nom'=>"Tribunal pour Enfants de Nevers", 'siret'=>"", 'dep'=>"58"),
|
||||||
'NICEE' => array('nom'=>"Tribunal pour Enfants de Nice", 'siret'=>"", 'dep'=>"63"),
|
'NICEE' => array('nom'=>"Tribunal pour Enfants de Nice", 'siret'=>"", 'dep'=>"06"),
|
||||||
'NIMESE' => array('nom'=>"Tribunal pour Enfants de Nîmes", 'siret'=>"", 'dep'=>"30"),
|
'NIMESE' => array('nom'=>"Tribunal pour Enfants de Nîmes", 'siret'=>"", 'dep'=>"30"),
|
||||||
'NIORTE' => array('nom'=>"Tribunal pour Enfants de Niort", 'siret'=>"", 'dep'=>"79"),
|
'NIORTE' => array('nom'=>"Tribunal pour Enfants de Niort", 'siret'=>"", 'dep'=>"79"),
|
||||||
'NOUMEE' => array('nom'=>"Tribunal pour Enfants de Nouméa", 'siret'=>"", 'dep'=>"988"),
|
'NOUMEE' => array('nom'=>"Tribunal pour Enfants de Nouméa", 'siret'=>"", 'dep'=>"988"),
|
||||||
@ -1333,7 +1333,7 @@ return array(
|
|||||||
'POINTE' => array('nom'=>"Tribunal pour Enfants de Pointe-à-Pitre", 'siret'=>"", 'dep'=>"971"),
|
'POINTE' => array('nom'=>"Tribunal pour Enfants de Pointe-à-Pitre", 'siret'=>"", 'dep'=>"971"),
|
||||||
'POITIE' => array('nom'=>"Tribunal pour Enfants de Poitiers", 'siret'=>"", 'dep'=>"86"),
|
'POITIE' => array('nom'=>"Tribunal pour Enfants de Poitiers", 'siret'=>"", 'dep'=>"86"),
|
||||||
'CERGYE' => array('nom'=>"Tribunal pour Enfants de Pontoise", 'siret'=>"", 'dep'=>"95"),
|
'CERGYE' => array('nom'=>"Tribunal pour Enfants de Pontoise", 'siret'=>"", 'dep'=>"95"),
|
||||||
'PRIVAE' => array('nom'=>"Tribunal pour Enfants de Privas", 'siret'=>"", 'dep'=>"70"),
|
'PRIVAE' => array('nom'=>"Tribunal pour Enfants de Privas", 'siret'=>"", 'dep'=>"07"),
|
||||||
'QUIMPE' => array('nom'=>"Tribunal pour Enfants de Quimper", 'siret'=>"", 'dep'=>"29"),
|
'QUIMPE' => array('nom'=>"Tribunal pour Enfants de Quimper", 'siret'=>"", 'dep'=>"29"),
|
||||||
'REIMSE' => array('nom'=>"Tribunal pour Enfants de Reims", 'siret'=>"", 'dep'=>"51"),
|
'REIMSE' => array('nom'=>"Tribunal pour Enfants de Reims", 'siret'=>"", 'dep'=>"51"),
|
||||||
'RENNEE' => array('nom'=>"Tribunal pour Enfants de Rennes", 'siret'=>"", 'dep'=>"35"),
|
'RENNEE' => array('nom'=>"Tribunal pour Enfants de Rennes", 'siret'=>"", 'dep'=>"35"),
|
||||||
@ -1348,7 +1348,7 @@ return array(
|
|||||||
'STNAZE' => array('nom'=>"Tribunal pour Enfants de Saint-Nazaire", 'siret'=>"", 'dep'=>"44"),
|
'STNAZE' => array('nom'=>"Tribunal pour Enfants de Saint-Nazaire", 'siret'=>"", 'dep'=>"44"),
|
||||||
'STOMEE' => array('nom'=>"Tribunal pour Enfants de Saint-Omer", 'siret'=>"", 'dep'=>"62"),
|
'STOMEE' => array('nom'=>"Tribunal pour Enfants de Saint-Omer", 'siret'=>"", 'dep'=>"62"),
|
||||||
'STPIEE' => array('nom'=>"Tribunal pour Enfants de Saint-Pierre", 'siret'=>"", 'dep'=>"974"),
|
'STPIEE' => array('nom'=>"Tribunal pour Enfants de Saint-Pierre", 'siret'=>"", 'dep'=>"974"),
|
||||||
'STQUEE' => array('nom'=>"Tribunal pour Enfants de Saint-Quentin", 'siret'=>"", 'dep'=>"23"),
|
'STQUEE' => array('nom'=>"Tribunal pour Enfants de Saint-Quentin", 'siret'=>"", 'dep'=>"02"),
|
||||||
'SARREE' => array('nom'=>"Tribunal pour Enfants de Sarreguemines", 'siret'=>"", 'dep'=>"57"),
|
'SARREE' => array('nom'=>"Tribunal pour Enfants de Sarreguemines", 'siret'=>"", 'dep'=>"57"),
|
||||||
'SAVERE' => array('nom'=>"Tribunal pour Enfants de Saverne", 'siret'=>"", 'dep'=>"67"),
|
'SAVERE' => array('nom'=>"Tribunal pour Enfants de Saverne", 'siret'=>"", 'dep'=>"67"),
|
||||||
'SENLIE' => array('nom'=>"Tribunal pour Enfants de Senlis", 'siret'=>"", 'dep'=>"60"),
|
'SENLIE' => array('nom'=>"Tribunal pour Enfants de Senlis", 'siret'=>"", 'dep'=>"60"),
|
||||||
@ -1471,7 +1471,7 @@ return array(
|
|||||||
'STPRMB' => array('nom'=>"SOUS PREFECTURE DE ST PIERRE", 'siret'=>"17972001600064", 'dep'=>"972"),
|
'STPRMB' => array('nom'=>"SOUS PREFECTURE DE ST PIERRE", 'siret'=>"17972001600064", 'dep'=>"972"),
|
||||||
'ETATV' => array('nom'=>"Conseil d'Etat", 'siret'=>"11000027000014", 'dep'=>"75"),
|
'ETATV' => array('nom'=>"Conseil d'Etat", 'siret'=>"11000027000014", 'dep'=>"75"),
|
||||||
'VERSAV' => array('nom'=>"Cour Administrative de Versailles", 'siret'=>"17780704700010", 'dep'=>"78"),
|
'VERSAV' => array('nom'=>"Cour Administrative de Versailles", 'siret'=>"17780704700010", 'dep'=>"78"),
|
||||||
'INCONU' => array('nom'=>"Tribunal Inconnu", 'siret'=>"", 'dep'=>"0"),
|
'INCONU' => array('nom'=>"Tribunal Inconnu", 'siret'=>"", 'dep'=>"00"),
|
||||||
'GUEREC' => array('nom'=>"TC GUERET", 'siret'=>"17870111600026", 'dep'=>"23"),
|
'GUEREC' => array('nom'=>"TC GUERET", 'siret'=>"17870111600026", 'dep'=>"23"),
|
||||||
'ANNECC' => array('nom'=>"TC ANNECY", 'siret'=>"17730111600063", 'dep'=>"74"),
|
'ANNECC' => array('nom'=>"TC ANNECY", 'siret'=>"17730111600063", 'dep'=>"74"),
|
||||||
'THONOC' => array('nom'=>"TC THONON LES BAINS", 'siret'=>"17730111600089", 'dep'=>"74"),
|
'THONOC' => array('nom'=>"TC THONON LES BAINS", 'siret'=>"17730111600089", 'dep'=>"74"),
|
||||||
@ -1486,10 +1486,10 @@ return array(
|
|||||||
'DJOFFJ' => array('nom'=>"DIRECTION DES JOURNAUX OFFICIELS", 'siret'=>"16000102000017", 'dep'=>"75"),
|
'DJOFFJ' => array('nom'=>"DIRECTION DES JOURNAUX OFFICIELS", 'siret'=>"16000102000017", 'dep'=>"75"),
|
||||||
'FLERSI' => array('nom'=>"TI FLERS", 'siret'=>"17140111000845", 'dep'=>"61"),
|
'FLERSI' => array('nom'=>"TI FLERS", 'siret'=>"17140111000845", 'dep'=>"61"),
|
||||||
'MBARDI' => array('nom'=>"TI MONTBARD", 'siret'=>"17210111500746", 'dep'=>"21"),
|
'MBARDI' => array('nom'=>"TI MONTBARD", 'siret'=>"17210111500746", 'dep'=>"21"),
|
||||||
'AUBENI' => array('nom'=>"TI AUBENAS", 'siret'=>"17300111600636", 'dep'=>"72"),
|
'AUBENI' => array('nom'=>"TI AUBENAS", 'siret'=>"17300111600636", 'dep'=>"07"),
|
||||||
'ANNONI' => array('nom'=>"TI ANNONAY", 'siret'=>"17300111600644", 'dep'=>"71"),
|
'ANNONI' => array('nom'=>"TI ANNONAY", 'siret'=>"17300111600644", 'dep'=>"07"),
|
||||||
'PERTUI' => array('nom'=>"TI PERTUIS", 'siret'=>"17300111600651", 'dep'=>"84"),
|
'PERTUI' => array('nom'=>"TI PERTUIS", 'siret'=>"17300111600651", 'dep'=>"84"),
|
||||||
'SOISSE' => array('nom'=>"Tribunal pour Enfants de Soissons", 'siret'=>"17800111100800", 'dep'=>"22"),
|
'SOISSE' => array('nom'=>"Tribunal pour Enfants de Soissons", 'siret'=>"17800111100800", 'dep'=>"02"),
|
||||||
'BONNEE' => array('nom'=>"Tribunal pour Enfants de BONNEVILLE", 'siret'=>"17730111600519", 'dep'=>"74"),
|
'BONNEE' => array('nom'=>"Tribunal pour Enfants de BONNEVILLE", 'siret'=>"17730111600519", 'dep'=>"74"),
|
||||||
'ABBEVF' => array('nom'=>"JUGE DE PROXIMITE D'ABBEVILLE", 'siret'=>"17800111100396", 'dep'=>"80"),
|
'ABBEVF' => array('nom'=>"JUGE DE PROXIMITE D'ABBEVILLE", 'siret'=>"17800111100396", 'dep'=>"80"),
|
||||||
'AGENF' => array('nom'=>"JUGE DE PROXIMITE D'AGEN", 'siret'=>"17470111000218", 'dep'=>"47"),
|
'AGENF' => array('nom'=>"JUGE DE PROXIMITE D'AGEN", 'siret'=>"17470111000218", 'dep'=>"47"),
|
||||||
@ -1504,8 +1504,8 @@ return array(
|
|||||||
'ANGOUF' => array('nom'=>"JUGE DE PROXIMITE D'ANGOULEME", 'siret'=>"17330111000099", 'dep'=>"16"),
|
'ANGOUF' => array('nom'=>"JUGE DE PROXIMITE D'ANGOULEME", 'siret'=>"17330111000099", 'dep'=>"16"),
|
||||||
'ANNECF' => array('nom'=>"JUGE DE PROXIMITE D'ANNECY", 'siret'=>"17730111600154", 'dep'=>"74"),
|
'ANNECF' => array('nom'=>"JUGE DE PROXIMITE D'ANNECY", 'siret'=>"17730111600154", 'dep'=>"74"),
|
||||||
'ANNEMF' => array('nom'=>"JUGE DE PROXIMITE D'ANNEMASSE", 'siret'=>"17730111600303", 'dep'=>"74"),
|
'ANNEMF' => array('nom'=>"JUGE DE PROXIMITE D'ANNEMASSE", 'siret'=>"17730111600303", 'dep'=>"74"),
|
||||||
'ANNONF' => array('nom'=>"JUGE DE PROXIMITE D'ANNONAY", 'siret'=>"17300111600644", 'dep'=>"71"),
|
'ANNONF' => array('nom'=>"JUGE DE PROXIMITE D'ANNONAY", 'siret'=>"17300111600644", 'dep'=>"07"),
|
||||||
'ANTIBF' => array('nom'=>"JUGE DE PROXIMITE D'ANTIBES", 'siret'=>"17130111200354", 'dep'=>"66"),
|
'ANTIBF' => array('nom'=>"JUGE DE PROXIMITE D'ANTIBES", 'siret'=>"17130111200354", 'dep'=>"06"),
|
||||||
'ANTONF' => array('nom'=>"JUGE DE PROXIMITE D'ANTONY", 'siret'=>"17780111500250", 'dep'=>"92"),
|
'ANTONF' => array('nom'=>"JUGE DE PROXIMITE D'ANTONY", 'siret'=>"17780111500250", 'dep'=>"92"),
|
||||||
'ARCACF' => array('nom'=>"JUGE DE PROXIMITE D'ARCACHON", 'siret'=>"17330111000024", 'dep'=>"33"),
|
'ARCACF' => array('nom'=>"JUGE DE PROXIMITE D'ARCACHON", 'siret'=>"17330111000024", 'dep'=>"33"),
|
||||||
'ARGENF' => array('nom'=>"JUGE DE PROXIMITE D'ARGENTAN", 'siret'=>"17140111000357", 'dep'=>"61"),
|
'ARGENF' => array('nom'=>"JUGE DE PROXIMITE D'ARGENTAN", 'siret'=>"17140111000357", 'dep'=>"61"),
|
||||||
@ -1521,7 +1521,7 @@ return array(
|
|||||||
'BAYONF' => array('nom'=>"JUGE DE PROXIMITE DE BAYONNE", 'siret'=>"17640111500140", 'dep'=>"64"),
|
'BAYONF' => array('nom'=>"JUGE DE PROXIMITE DE BAYONNE", 'siret'=>"17640111500140", 'dep'=>"64"),
|
||||||
'BEAUNF' => array('nom'=>"JUGE DE PROXIMITE DE BEAUNE", 'siret'=>"17210111500027", 'dep'=>"21"),
|
'BEAUNF' => array('nom'=>"JUGE DE PROXIMITE DE BEAUNE", 'siret'=>"17210111500027", 'dep'=>"21"),
|
||||||
'BEAUVF' => array('nom'=>"JUGE DE PROXIMITE DE BEAUVAIS", 'siret'=>"17800111100453", 'dep'=>"60"),
|
'BEAUVF' => array('nom'=>"JUGE DE PROXIMITE DE BEAUVAIS", 'siret'=>"17800111100453", 'dep'=>"60"),
|
||||||
'BELLEF' => array('nom'=>"JUGE DE PROXIMITE DE BELLEY", 'siret'=>"17690111400502", 'dep'=>"13"),
|
'BELLEF' => array('nom'=>"JUGE DE PROXIMITE DE BELLEY", 'siret'=>"17690111400502", 'dep'=>"01"),
|
||||||
'BERNAF' => array('nom'=>"JUGE DE PROXIMITE DE BERNAY", 'siret'=>"17760111900387", 'dep'=>"27"),
|
'BERNAF' => array('nom'=>"JUGE DE PROXIMITE DE BERNAY", 'siret'=>"17760111900387", 'dep'=>"27"),
|
||||||
'BESANF' => array('nom'=>"JUGE DE PROXIMITE DE BESANCON", 'siret'=>"17250111600211", 'dep'=>"25"),
|
'BESANF' => array('nom'=>"JUGE DE PROXIMITE DE BESANCON", 'siret'=>"17250111600211", 'dep'=>"25"),
|
||||||
'BETHUF' => array('nom'=>"JUGE DE PROXIMITE DE BETHUNE", 'siret'=>"17590111500063", 'dep'=>"62"),
|
'BETHUF' => array('nom'=>"JUGE DE PROXIMITE DE BETHUNE", 'siret'=>"17590111500063", 'dep'=>"62"),
|
||||||
@ -1533,7 +1533,7 @@ return array(
|
|||||||
'BORDEF' => array('nom'=>"JUGE DE PROXIMITE DE BORDEAUX", 'siret'=>"17330111000313", 'dep'=>"33"),
|
'BORDEF' => array('nom'=>"JUGE DE PROXIMITE DE BORDEAUX", 'siret'=>"17330111000313", 'dep'=>"33"),
|
||||||
'BOULOF' => array('nom'=>"JUGE DE PROXIMITE DE BOULOGNE BILLANCOURT", 'siret'=>"17780111500276", 'dep'=>"92"),
|
'BOULOF' => array('nom'=>"JUGE DE PROXIMITE DE BOULOGNE BILLANCOURT", 'siret'=>"17780111500276", 'dep'=>"92"),
|
||||||
'BSMERF' => array('nom'=>"JUGE DE PROXIMITE DE BOULOGNE SUR MER", 'siret'=>"17590111500105", 'dep'=>"62"),
|
'BSMERF' => array('nom'=>"JUGE DE PROXIMITE DE BOULOGNE SUR MER", 'siret'=>"17590111500105", 'dep'=>"62"),
|
||||||
'BBRESF' => array('nom'=>"JUGE DE PROXIMITE DE BOURG EN BRESSE", 'siret'=>"17690111400486", 'dep'=>"10"),
|
'BBRESF' => array('nom'=>"JUGE DE PROXIMITE DE BOURG EN BRESSE", 'siret'=>"17690111400486", 'dep'=>"01"),
|
||||||
'BRGESF' => array('nom'=>"JUGE DE PROXIMITE DE BOURGES", 'siret'=>"17180111100187", 'dep'=>"18"),
|
'BRGESF' => array('nom'=>"JUGE DE PROXIMITE DE BOURGES", 'siret'=>"17180111100187", 'dep'=>"18"),
|
||||||
'BOURGF' => array('nom'=>"JUGE DE PROXIMITE DE BOURGOIN JALLIEU", 'siret'=>"17380111900103", 'dep'=>"38"),
|
'BOURGF' => array('nom'=>"JUGE DE PROXIMITE DE BOURGOIN JALLIEU", 'siret'=>"17380111900103", 'dep'=>"38"),
|
||||||
'BRESSF' => array('nom'=>"JUGE DE PROXIMITE DE BRESSUIRE", 'siret'=>"17860111800478", 'dep'=>"79"),
|
'BRESSF' => array('nom'=>"JUGE DE PROXIMITE DE BRESSUIRE", 'siret'=>"17860111800478", 'dep'=>"79"),
|
||||||
@ -1542,11 +1542,11 @@ return array(
|
|||||||
'BRIGNF' => array('nom'=>"JUGE DE PROXIMITE DE BRIGNOLES", 'siret'=>"17130111200545", 'dep'=>"83"),
|
'BRIGNF' => array('nom'=>"JUGE DE PROXIMITE DE BRIGNOLES", 'siret'=>"17130111200545", 'dep'=>"83"),
|
||||||
'BRIVEF' => array('nom'=>"JUGE DE PROXIMITE DE BRIVE", 'siret'=>"17870111600190", 'dep'=>"19"),
|
'BRIVEF' => array('nom'=>"JUGE DE PROXIMITE DE BRIVE", 'siret'=>"17870111600190", 'dep'=>"19"),
|
||||||
'CAENF' => array('nom'=>"JUGE DE PROXIMITE DE CAEN", 'siret'=>"17140111000456", 'dep'=>"14"),
|
'CAENF' => array('nom'=>"JUGE DE PROXIMITE DE CAEN", 'siret'=>"17140111000456", 'dep'=>"14"),
|
||||||
'CAGNEF' => array('nom'=>"JUGE DE PROXIMITE DE CAGNES SUR MER", 'siret'=>"17130111200719", 'dep'=>"68"),
|
'CAGNEF' => array('nom'=>"JUGE DE PROXIMITE DE CAGNES SUR MER", 'siret'=>"17130111200719", 'dep'=>"06"),
|
||||||
'CAHORF' => array('nom'=>"JUGE DE PROXIMITE DE CAHORS", 'siret'=>"17470111000028", 'dep'=>"46"),
|
'CAHORF' => array('nom'=>"JUGE DE PROXIMITE DE CAHORS", 'siret'=>"17470111000028", 'dep'=>"46"),
|
||||||
'CALAIF' => array('nom'=>"JUGE DE PROXIMITE DE CALAIS", 'siret'=>"17590111500121", 'dep'=>"62"),
|
'CALAIF' => array('nom'=>"JUGE DE PROXIMITE DE CALAIS", 'siret'=>"17590111500121", 'dep'=>"62"),
|
||||||
'CAMBRF' => array('nom'=>"JUGE DE PROXIMITE DE CAMBRAI", 'siret'=>"17590111500949", 'dep'=>"59"),
|
'CAMBRF' => array('nom'=>"JUGE DE PROXIMITE DE CAMBRAI", 'siret'=>"17590111500949", 'dep'=>"59"),
|
||||||
'CANNEF' => array('nom'=>"JUGE DE PROXIMITE DE CANNES", 'siret'=>"17130111200362", 'dep'=>"64"),
|
'CANNEF' => array('nom'=>"JUGE DE PROXIMITE DE CANNES", 'siret'=>"17130111200362", 'dep'=>"06"),
|
||||||
'CARCAF' => array('nom'=>"JUGE DE PROXIMITE DE CARCASSONNE", 'siret'=>"17340111800364", 'dep'=>"11"),
|
'CARCAF' => array('nom'=>"JUGE DE PROXIMITE DE CARCASSONNE", 'siret'=>"17340111800364", 'dep'=>"11"),
|
||||||
'CARPEF' => array('nom'=>"JUGE DE PROXIMITE DE CARPENTRAS", 'siret'=>"17300111600164", 'dep'=>"84"),
|
'CARPEF' => array('nom'=>"JUGE DE PROXIMITE DE CARPENTRAS", 'siret'=>"17300111600164", 'dep'=>"84"),
|
||||||
'CASTEF' => array('nom'=>"JUGE DE PROXIMITE DE CASTELSARRASIN", 'siret'=>"17310111400135", 'dep'=>"82"),
|
'CASTEF' => array('nom'=>"JUGE DE PROXIMITE DE CASTELSARRASIN", 'siret'=>"17310111400135", 'dep'=>"82"),
|
||||||
@ -1556,7 +1556,7 @@ return array(
|
|||||||
'CHALOF' => array('nom'=>"JUGE DE PROXIMITE DE CHALONS EN CHAMPAGNE", 'siret'=>"17510111200225", 'dep'=>"51"),
|
'CHALOF' => array('nom'=>"JUGE DE PROXIMITE DE CHALONS EN CHAMPAGNE", 'siret'=>"17510111200225", 'dep'=>"51"),
|
||||||
'CHAMBF' => array('nom'=>"JUGE DE PROXIMITE DE CHAMBERY", 'siret'=>"17730111600113", 'dep'=>"73"),
|
'CHAMBF' => array('nom'=>"JUGE DE PROXIMITE DE CHAMBERY", 'siret'=>"17730111600113", 'dep'=>"73"),
|
||||||
'CHAREF' => array('nom'=>"JUGE DE PROXIMITE DE CHARENTON LE PONT", 'siret'=>"17750111100609", 'dep'=>"94"),
|
'CHAREF' => array('nom'=>"JUGE DE PROXIMITE DE CHARENTON LE PONT", 'siret'=>"17750111100609", 'dep'=>"94"),
|
||||||
'CHARLF' => array('nom'=>"JUGE DE PROXIMITE DE CHARLEVILLE MEZIERES", 'siret'=>"17510111200324", 'dep'=>"80"),
|
'CHARLF' => array('nom'=>"JUGE DE PROXIMITE DE CHARLEVILLE MEZIERES", 'siret'=>"17510111200324", 'dep'=>"08"),
|
||||||
'CHARTF' => array('nom'=>"JUGE DE PROXIMITE DE CHARTRES", 'siret'=>"17780111500102", 'dep'=>"28"),
|
'CHARTF' => array('nom'=>"JUGE DE PROXIMITE DE CHARTRES", 'siret'=>"17780111500102", 'dep'=>"28"),
|
||||||
'CROUXF' => array('nom'=>"JUGE DE PROXIMITE DE CHATEAUROUX", 'siret'=>"17180111100138", 'dep'=>"36"),
|
'CROUXF' => array('nom'=>"JUGE DE PROXIMITE DE CHATEAUROUX", 'siret'=>"17180111100138", 'dep'=>"36"),
|
||||||
'RAULTF' => array('nom'=>"JUGE DE PROXIMITE DE CHATELLERAULT", 'siret'=>"17860111800585", 'dep'=>"86"),
|
'RAULTF' => array('nom'=>"JUGE DE PROXIMITE DE CHATELLERAULT", 'siret'=>"17860111800585", 'dep'=>"86"),
|
||||||
@ -1572,7 +1572,7 @@ return array(
|
|||||||
'COUTAF' => array('nom'=>"JUGE DE PROXIMITE DE COUTANCES", 'siret'=>"17140111000282", 'dep'=>"50"),
|
'COUTAF' => array('nom'=>"JUGE DE PROXIMITE DE COUTANCES", 'siret'=>"17140111000282", 'dep'=>"50"),
|
||||||
'DAXF' => array('nom'=>"JUGE DE PROXIMITE DE DAX", 'siret'=>"17640111500165", 'dep'=>"40"),
|
'DAXF' => array('nom'=>"JUGE DE PROXIMITE DE DAX", 'siret'=>"17640111500165", 'dep'=>"40"),
|
||||||
'DIEPPF' => array('nom'=>"JUGE DE PROXIMITE DE DIEPPE", 'siret'=>"17760111900247", 'dep'=>"76"),
|
'DIEPPF' => array('nom'=>"JUGE DE PROXIMITE DE DIEPPE", 'siret'=>"17760111900247", 'dep'=>"76"),
|
||||||
'DIGNEF' => array('nom'=>"JUGE DE PROXIMITE DE DIGNE", 'siret'=>"17130111200727", 'dep'=>"40"),
|
'DIGNEF' => array('nom'=>"JUGE DE PROXIMITE DE DIGNE", 'siret'=>"17130111200727", 'dep'=>"04"),
|
||||||
'DIJONF' => array('nom'=>"JUGE DE PROXIMITE DE DIJON", 'siret'=>"17210111500472", 'dep'=>"21"),
|
'DIJONF' => array('nom'=>"JUGE DE PROXIMITE DE DIJON", 'siret'=>"17210111500472", 'dep'=>"21"),
|
||||||
'DINANF' => array('nom'=>"JUGE DE PROXIMITE DE DINAN", 'siret'=>"17350111500674", 'dep'=>"22"),
|
'DINANF' => array('nom'=>"JUGE DE PROXIMITE DE DINAN", 'siret'=>"17350111500674", 'dep'=>"22"),
|
||||||
'DOLEF' => array('nom'=>"JUGE DE PROXIMITE DE DOLE", 'siret'=>"17250111600054", 'dep'=>"39"),
|
'DOLEF' => array('nom'=>"JUGE DE PROXIMITE DE DOLE", 'siret'=>"17250111600054", 'dep'=>"39"),
|
||||||
@ -1585,14 +1585,14 @@ return array(
|
|||||||
'ETAMPF' => array('nom'=>"JUGE DE PROXIMITE D'ETAMPES", 'siret'=>"17750111100708", 'dep'=>"91"),
|
'ETAMPF' => array('nom'=>"JUGE DE PROXIMITE D'ETAMPES", 'siret'=>"17750111100708", 'dep'=>"91"),
|
||||||
'EVREUF' => array('nom'=>"JUGE DE PROXIMITE D'EVREUX", 'siret'=>"17760111900379", 'dep'=>"27"),
|
'EVREUF' => array('nom'=>"JUGE DE PROXIMITE D'EVREUX", 'siret'=>"17760111900379", 'dep'=>"27"),
|
||||||
'EVRYF' => array('nom'=>"JUGE DE PROXIMITE D'EVRY", 'siret'=>"17750111101110", 'dep'=>"91"),
|
'EVRYF' => array('nom'=>"JUGE DE PROXIMITE D'EVRY", 'siret'=>"17750111101110", 'dep'=>"91"),
|
||||||
'FOIXF' => array('nom'=>"JUGE DE PROXIMITE DE FOIX", 'siret'=>"17310111400192", 'dep'=>"90"),
|
'FOIXF' => array('nom'=>"JUGE DE PROXIMITE DE FOIX", 'siret'=>"17310111400192", 'dep'=>"09"),
|
||||||
'FONTF' => array('nom'=>"JUGE DE PROXIMITE DE FONTAINEBLEAU", 'siret'=>"17750111101292", 'dep'=>"77"),
|
'FONTF' => array('nom'=>"JUGE DE PROXIMITE DE FONTAINEBLEAU", 'siret'=>"17750111101292", 'dep'=>"77"),
|
||||||
'FONTEF' => array('nom'=>"JUGE DE PROXIMITE DE FONTENAY LE COMTE", 'siret'=>"17860111800403", 'dep'=>"85"),
|
'FONTEF' => array('nom'=>"JUGE DE PROXIMITE DE FONTENAY LE COMTE", 'siret'=>"17860111800403", 'dep'=>"85"),
|
||||||
'FORTFF' => array('nom'=>"JUGE DE PROXIMITE DE FORT DE FRANCE", 'siret'=>"17972111300126", 'dep'=>"972"),
|
'FORTFF' => array('nom'=>"JUGE DE PROXIMITE DE FORT DE FRANCE", 'siret'=>"17972111300126", 'dep'=>"972"),
|
||||||
'FREJUF' => array('nom'=>"JUGE DE PROXIMITE DE FREJUS", 'siret'=>"17130111200560", 'dep'=>"83"),
|
'FREJUF' => array('nom'=>"JUGE DE PROXIMITE DE FREJUS", 'siret'=>"17130111200560", 'dep'=>"83"),
|
||||||
'GAPF' => array('nom'=>"JUGE DE PROXIMITE DE GAP", 'siret'=>"17380111900285", 'dep'=>"50"),
|
'GAPF' => array('nom'=>"JUGE DE PROXIMITE DE GAP", 'siret'=>"17380111900285", 'dep'=>"05"),
|
||||||
'GONESF' => array('nom'=>"JUGE DE PROXIMITE DE GONESSE", 'siret'=>"17780111500227", 'dep'=>"95"),
|
'GONESF' => array('nom'=>"JUGE DE PROXIMITE DE GONESSE", 'siret'=>"17780111500227", 'dep'=>"95"),
|
||||||
'GRASSF' => array('nom'=>"JUGE DE PROXIMITE DE GRASSE", 'siret'=>"17130111200370", 'dep'=>"61"),
|
'GRASSF' => array('nom'=>"JUGE DE PROXIMITE DE GRASSE", 'siret'=>"17130111200370", 'dep'=>"06"),
|
||||||
'GRENOF' => array('nom'=>"JUGE DE PROXIMITE DE GRENOBLE", 'siret'=>"17380111900038", 'dep'=>"38"),
|
'GRENOF' => array('nom'=>"JUGE DE PROXIMITE DE GRENOBLE", 'siret'=>"17380111900038", 'dep'=>"38"),
|
||||||
'GUEBWF' => array('nom'=>"JUGE DE PROXIMITE DE GUEBWILLER", 'siret'=>"17680111600086", 'dep'=>"68"),
|
'GUEBWF' => array('nom'=>"JUGE DE PROXIMITE DE GUEBWILLER", 'siret'=>"17680111600086", 'dep'=>"68"),
|
||||||
'GUEREF' => array('nom'=>"JUGE DE PROXIMITE DE GUERET", 'siret'=>"17870111600174", 'dep'=>"23"),
|
'GUEREF' => array('nom'=>"JUGE DE PROXIMITE DE GUERET", 'siret'=>"17870111600174", 'dep'=>"23"),
|
||||||
@ -1607,7 +1607,7 @@ return array(
|
|||||||
'LAROCF' => array('nom'=>"JUGE DE PROXIMITE DE LA ROCHE SUR YON", 'siret'=>"17860111800239", 'dep'=>"85"),
|
'LAROCF' => array('nom'=>"JUGE DE PROXIMITE DE LA ROCHE SUR YON", 'siret'=>"17860111800239", 'dep'=>"85"),
|
||||||
'ROCHLF' => array('nom'=>"JUGE DE PROXIMITE DE LA ROCHELLE", 'siret'=>"17860111800148", 'dep'=>"17"),
|
'ROCHLF' => array('nom'=>"JUGE DE PROXIMITE DE LA ROCHELLE", 'siret'=>"17860111800148", 'dep'=>"17"),
|
||||||
'LAGNYF' => array('nom'=>"JUGE DE PROXIMITE DE LAGNY SUR MARNE", 'siret'=>"17750111100724", 'dep'=>"77"),
|
'LAGNYF' => array('nom'=>"JUGE DE PROXIMITE DE LAGNY SUR MARNE", 'siret'=>"17750111100724", 'dep'=>"77"),
|
||||||
'LAONF' => array('nom'=>"JUGE DE PROXIMITE DE LAON", 'siret'=>"17800111100446", 'dep'=>"20"),
|
'LAONF' => array('nom'=>"JUGE DE PROXIMITE DE LAON", 'siret'=>"17800111100446", 'dep'=>"02"),
|
||||||
'LAVALF' => array('nom'=>"JUGE DE PROXIMITE DE LAVAL", 'siret'=>"17490111600254", 'dep'=>"53"),
|
'LAVALF' => array('nom'=>"JUGE DE PROXIMITE DE LAVAL", 'siret'=>"17490111600254", 'dep'=>"53"),
|
||||||
'HAVREF' => array('nom'=>"JUGE DE PROXIMITE DU HAVRE", 'siret'=>"17760111900320", 'dep'=>"76"),
|
'HAVREF' => array('nom'=>"JUGE DE PROXIMITE DU HAVRE", 'siret'=>"17760111900320", 'dep'=>"76"),
|
||||||
'MANSF' => array('nom'=>"JUGE DE PROXIMITE DU MANS", 'siret'=>"17490111600361", 'dep'=>"72"),
|
'MANSF' => array('nom'=>"JUGE DE PROXIMITE DU MANS", 'siret'=>"17490111600361", 'dep'=>"72"),
|
||||||
@ -1625,7 +1625,7 @@ return array(
|
|||||||
'LUREF' => array('nom'=>"JUGE DE PROXIMITE DE LURE", 'siret'=>"17250111600179", 'dep'=>"70"),
|
'LUREF' => array('nom'=>"JUGE DE PROXIMITE DE LURE", 'siret'=>"17250111600179", 'dep'=>"70"),
|
||||||
'LYONF' => array('nom'=>"JUGE DE PROXIMITE DE LYON", 'siret'=>"17690111400437", 'dep'=>"69"),
|
'LYONF' => array('nom'=>"JUGE DE PROXIMITE DE LYON", 'siret'=>"17690111400437", 'dep'=>"69"),
|
||||||
'MACONF' => array('nom'=>"JUGE DE PROXIMITE DE MACON", 'siret'=>"17210111500423", 'dep'=>"71"),
|
'MACONF' => array('nom'=>"JUGE DE PROXIMITE DE MACON", 'siret'=>"17210111500423", 'dep'=>"71"),
|
||||||
'MANOSF' => array('nom'=>"JUGE DE PROXIMITE DE MANOSQUE", 'siret'=>"17130111200453", 'dep'=>"41"),
|
'MANOSF' => array('nom'=>"JUGE DE PROXIMITE DE MANOSQUE", 'siret'=>"17130111200453", 'dep'=>"04"),
|
||||||
'MANTEF' => array('nom'=>"JUGE DE PROXIMITE DE MANTES LA JOLIE", 'siret'=>"17780111500193", 'dep'=>"78"),
|
'MANTEF' => array('nom'=>"JUGE DE PROXIMITE DE MANTES LA JOLIE", 'siret'=>"17780111500193", 'dep'=>"78"),
|
||||||
'MARMAF' => array('nom'=>"JUGE DE PROXIMITE DE MARMANDE", 'siret'=>"17470111000226", 'dep'=>"47"),
|
'MARMAF' => array('nom'=>"JUGE DE PROXIMITE DE MARMANDE", 'siret'=>"17470111000226", 'dep'=>"47"),
|
||||||
'MARSEF' => array('nom'=>"JUGE DE PROXIMITE DE MARSEILLE", 'siret'=>"17130111200321", 'dep'=>"13"),
|
'MARSEF' => array('nom'=>"JUGE DE PROXIMITE DE MARSEILLE", 'siret'=>"17130111200321", 'dep'=>"13"),
|
||||||
@ -1634,7 +1634,7 @@ return array(
|
|||||||
'MEAUXF' => array('nom'=>"JUGE DE PROXIMITE DE MEAUX", 'siret'=>"17750111101250", 'dep'=>"77"),
|
'MEAUXF' => array('nom'=>"JUGE DE PROXIMITE DE MEAUX", 'siret'=>"17750111101250", 'dep'=>"77"),
|
||||||
'MELUNF' => array('nom'=>"JUGE DE PROXIMITE DE MELUN", 'siret'=>"17750111100211", 'dep'=>"77"),
|
'MELUNF' => array('nom'=>"JUGE DE PROXIMITE DE MELUN", 'siret'=>"17750111100211", 'dep'=>"77"),
|
||||||
'MENDEF' => array('nom'=>"JUGE DE PROXIMITE DE MENDE", 'siret'=>"17300111600073", 'dep'=>"48"),
|
'MENDEF' => array('nom'=>"JUGE DE PROXIMITE DE MENDE", 'siret'=>"17300111600073", 'dep'=>"48"),
|
||||||
'MENTOF' => array('nom'=>"JUGE DE PROXIMITE DE MENTON", 'siret'=>"17130111200347", 'dep'=>"65"),
|
'MENTOF' => array('nom'=>"JUGE DE PROXIMITE DE MENTON", 'siret'=>"17130111200347", 'dep'=>"06"),
|
||||||
'METZF' => array('nom'=>"JUGE DE PROXIMITE DE METZ", 'siret'=>"17570111900125", 'dep'=>"57"),
|
'METZF' => array('nom'=>"JUGE DE PROXIMITE DE METZ", 'siret'=>"17570111900125", 'dep'=>"57"),
|
||||||
'MILLAF' => array('nom'=>"JUGE DE PROXIMITE DE MILLAU", 'siret'=>"17340111800380", 'dep'=>"12"),
|
'MILLAF' => array('nom'=>"JUGE DE PROXIMITE DE MILLAU", 'siret'=>"17340111800380", 'dep'=>"12"),
|
||||||
'MARSAF' => array('nom'=>"JUGE DE PROXIMITE DE MONT DE MARSAN", 'siret'=>"17640111500173", 'dep'=>"40"),
|
'MARSAF' => array('nom'=>"JUGE DE PROXIMITE DE MONT DE MARSAN", 'siret'=>"17640111500173", 'dep'=>"40"),
|
||||||
@ -1642,7 +1642,7 @@ return array(
|
|||||||
'MONTNF' => array('nom'=>"JUGE DE PROXIMITE DE MONTAUBAN", 'siret'=>"17310111400242", 'dep'=>"82"),
|
'MONTNF' => array('nom'=>"JUGE DE PROXIMITE DE MONTAUBAN", 'siret'=>"17310111400242", 'dep'=>"82"),
|
||||||
'MONTBF' => array('nom'=>"JUGE DE PROXIMITE DE MONTBRISON", 'siret'=>"17690111400098", 'dep'=>"42"),
|
'MONTBF' => array('nom'=>"JUGE DE PROXIMITE DE MONTBRISON", 'siret'=>"17690111400098", 'dep'=>"42"),
|
||||||
'MONTEF' => array('nom'=>"JUGE DE PROXIMITE DE MONTELIMAR", 'siret'=>"17380111900301", 'dep'=>"26"),
|
'MONTEF' => array('nom'=>"JUGE DE PROXIMITE DE MONTELIMAR", 'siret'=>"17380111900301", 'dep'=>"26"),
|
||||||
'MONTLF' => array('nom'=>"JUGE DE PROXIMITE DE MONTLUCON", 'siret'=>"17630111700261", 'dep'=>"31"),
|
'MONTLF' => array('nom'=>"JUGE DE PROXIMITE DE MONTLUCON", 'siret'=>"17630111700261", 'dep'=>"03"),
|
||||||
'MONTYF' => array('nom'=>"JUGE DE PROXIMITE DE MONTMORENCY", 'siret'=>"17780111500235", 'dep'=>"95"),
|
'MONTYF' => array('nom'=>"JUGE DE PROXIMITE DE MONTMORENCY", 'siret'=>"17780111500235", 'dep'=>"95"),
|
||||||
'MONTPF' => array('nom'=>"JUGE DE PROXIMITE DE MONTPELLIER", 'siret'=>"17340111800604", 'dep'=>"34"),
|
'MONTPF' => array('nom'=>"JUGE DE PROXIMITE DE MONTPELLIER", 'siret'=>"17340111800604", 'dep'=>"34"),
|
||||||
'MONTUF' => array('nom'=>"JUGE DE PROXIMITE DE MONTREUIL SUR MER", 'siret'=>"17590111500444", 'dep'=>"62"),
|
'MONTUF' => array('nom'=>"JUGE DE PROXIMITE DE MONTREUIL SUR MER", 'siret'=>"17590111500444", 'dep'=>"62"),
|
||||||
@ -1651,10 +1651,10 @@ return array(
|
|||||||
'MURETF' => array('nom'=>"JUGE DE PROXIMITE DE MURET", 'siret'=>"17310111400093", 'dep'=>"31"),
|
'MURETF' => array('nom'=>"JUGE DE PROXIMITE DE MURET", 'siret'=>"17310111400093", 'dep'=>"31"),
|
||||||
'NANCYF' => array('nom'=>"JUGE DE PROXIMITE DE NANCY", 'siret'=>"17540111600108", 'dep'=>"54"),
|
'NANCYF' => array('nom'=>"JUGE DE PROXIMITE DE NANCY", 'siret'=>"17540111600108", 'dep'=>"54"),
|
||||||
'NANTEF' => array('nom'=>"JUGE DE PROXIMITE DE NANTES", 'siret'=>"17350111500880", 'dep'=>"44"),
|
'NANTEF' => array('nom'=>"JUGE DE PROXIMITE DE NANTES", 'siret'=>"17350111500880", 'dep'=>"44"),
|
||||||
'NANTUF' => array('nom'=>"JUGE DE PROXIMITE DE NANTUA", 'siret'=>"17690111400155", 'dep'=>"11"),
|
'NANTUF' => array('nom'=>"JUGE DE PROXIMITE DE NANTUA", 'siret'=>"17690111400155", 'dep'=>"01"),
|
||||||
'NARBOF' => array('nom'=>"JUGE DE PROXIMITE DE NARBONNE", 'siret'=>"17340111800372", 'dep'=>"11"),
|
'NARBOF' => array('nom'=>"JUGE DE PROXIMITE DE NARBONNE", 'siret'=>"17340111800372", 'dep'=>"11"),
|
||||||
'NEVERF' => array('nom'=>"JUGE DE PROXIMITE DE NEVERS", 'siret'=>"17180111100377", 'dep'=>"58"),
|
'NEVERF' => array('nom'=>"JUGE DE PROXIMITE DE NEVERS", 'siret'=>"17180111100377", 'dep'=>"58"),
|
||||||
'NICEF' => array('nom'=>"JUGE DE PROXIMITE DE NICE", 'siret'=>"17130111200685", 'dep'=>"63"),
|
'NICEF' => array('nom'=>"JUGE DE PROXIMITE DE NICE", 'siret'=>"17130111200685", 'dep'=>"06"),
|
||||||
'NIMESF' => array('nom'=>"JUGE DE PROXIMITE DE NIMES", 'siret'=>"17300111600099", 'dep'=>"30"),
|
'NIMESF' => array('nom'=>"JUGE DE PROXIMITE DE NIMES", 'siret'=>"17300111600099", 'dep'=>"30"),
|
||||||
'NIORTF' => array('nom'=>"JUGE DE PROXIMITE DE NIORT", 'siret'=>"17860111800460", 'dep'=>"79"),
|
'NIORTF' => array('nom'=>"JUGE DE PROXIMITE DE NIORT", 'siret'=>"17860111800460", 'dep'=>"79"),
|
||||||
'NOGEMF' => array('nom'=>"JUGE DE PROXIMITE DE NOGENT SUR MARNE", 'siret'=>"17750111100500", 'dep'=>"94"),
|
'NOGEMF' => array('nom'=>"JUGE DE PROXIMITE DE NOGENT SUR MARNE", 'siret'=>"17750111100500", 'dep'=>"94"),
|
||||||
@ -1672,7 +1672,7 @@ return array(
|
|||||||
'POITIF' => array('nom'=>"JUGE DE PROXIMITE DE POITIERS", 'siret'=>"17860111800411", 'dep'=>"86"),
|
'POITIF' => array('nom'=>"JUGE DE PROXIMITE DE POITIERS", 'siret'=>"17860111800411", 'dep'=>"86"),
|
||||||
'PONTAF' => array('nom'=>"JUGE DE PROXIMITE DE PONTARLIER", 'siret'=>"17250111600237", 'dep'=>"25"),
|
'PONTAF' => array('nom'=>"JUGE DE PROXIMITE DE PONTARLIER", 'siret'=>"17250111600237", 'dep'=>"25"),
|
||||||
'PONTOF' => array('nom'=>"JUGE DE PROXIMITE DE PONTOISE", 'siret'=>"17780111500573", 'dep'=>"95"),
|
'PONTOF' => array('nom'=>"JUGE DE PROXIMITE DE PONTOISE", 'siret'=>"17780111500573", 'dep'=>"95"),
|
||||||
'PRIVF' => array('nom'=>"JUGE DE PROXIMITE DE PRIVAS", 'siret'=>"17300111600313", 'dep'=>"70"),
|
'PRIVF' => array('nom'=>"JUGE DE PROXIMITE DE PRIVAS", 'siret'=>"17300111600313", 'dep'=>"07"),
|
||||||
'PUTEAF' => array('nom'=>"JUGE DE PROXIMITE DE PUTEAUX", 'siret'=>"17780111500334", 'dep'=>"92"),
|
'PUTEAF' => array('nom'=>"JUGE DE PROXIMITE DE PUTEAUX", 'siret'=>"17780111500334", 'dep'=>"92"),
|
||||||
'QUIMPF' => array('nom'=>"JUGE DE PROXIMITE DE QUIMPER", 'siret'=>"17350111500591", 'dep'=>"29"),
|
'QUIMPF' => array('nom'=>"JUGE DE PROXIMITE DE QUIMPER", 'siret'=>"17350111500591", 'dep'=>"29"),
|
||||||
'RAMBOF' => array('nom'=>"JUGE DE PROXIMITE DE RAMBOUILLET", 'siret'=>"17780111500169", 'dep'=>"78"),
|
'RAMBOF' => array('nom'=>"JUGE DE PROXIMITE DE RAMBOUILLET", 'siret'=>"17780111500169", 'dep'=>"78"),
|
||||||
@ -1698,7 +1698,7 @@ return array(
|
|||||||
'STETIF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT ETIENNE", 'siret'=>"17690111400189", 'dep'=>"42"),
|
'STETIF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT ETIENNE", 'siret'=>"17690111400189", 'dep'=>"42"),
|
||||||
'GAUDEF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT GAUDENS", 'siret'=>"17310111400200", 'dep'=>"31"),
|
'GAUDEF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT GAUDENS", 'siret'=>"17310111400200", 'dep'=>"31"),
|
||||||
'SGERMF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT GERMAIN EN LAYE", 'siret'=>"17780111500177", 'dep'=>"78"),
|
'SGERMF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT GERMAIN EN LAYE", 'siret'=>"17780111500177", 'dep'=>"78"),
|
||||||
'GIRONF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT GIRONS", 'siret'=>"17310111400317", 'dep'=>"92"),
|
'GIRONF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT GIRONS", 'siret'=>"17310111400317", 'dep'=>"09"),
|
||||||
'STMALF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT MALO", 'siret'=>"17350111500120", 'dep'=>"35"),
|
'STMALF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT MALO", 'siret'=>"17350111500120", 'dep'=>"35"),
|
||||||
'MAURDF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT MAUR DES FOSSES", 'siret'=>"17750111100492", 'dep'=>"94"),
|
'MAURDF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT MAUR DES FOSSES", 'siret'=>"17750111100492", 'dep'=>"94"),
|
||||||
'NAZAIF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT NAZAIRE", 'siret'=>"17350111500724", 'dep'=>"44"),
|
'NAZAIF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT NAZAIRE", 'siret'=>"17350111500724", 'dep'=>"44"),
|
||||||
@ -1706,7 +1706,7 @@ return array(
|
|||||||
'STOUEF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT OUEN", 'siret'=>"17750111101078", 'dep'=>"93"),
|
'STOUEF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT OUEN", 'siret'=>"17750111101078", 'dep'=>"93"),
|
||||||
'SPAULF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT PAUL", 'siret'=>"17974111100076", 'dep'=>"978"),
|
'SPAULF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT PAUL", 'siret'=>"17974111100076", 'dep'=>"978"),
|
||||||
'PIERRF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT PIERRE", 'siret'=>"17974111100100", 'dep'=>"974"),
|
'PIERRF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT PIERRE", 'siret'=>"17974111100100", 'dep'=>"974"),
|
||||||
'SQUENF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT QUENTIN", 'siret'=>"17800111100438", 'dep'=>"23"),
|
'SQUENF' => array('nom'=>"JUGE DE PROXIMITE DE SAINT QUENTIN", 'siret'=>"17800111100438", 'dep'=>"02"),
|
||||||
'SNTESF' => array('nom'=>"JUGE DE PROXIMITE DE SAINTES", 'siret'=>"17860111800189", 'dep'=>"17"),
|
'SNTESF' => array('nom'=>"JUGE DE PROXIMITE DE SAINTES", 'siret'=>"17860111800189", 'dep'=>"17"),
|
||||||
'SALONF' => array('nom'=>"JUGE DE PROXIMITE DE SALON DE PROVENCE", 'siret'=>"17130111200131", 'dep'=>"13"),
|
'SALONF' => array('nom'=>"JUGE DE PROXIMITE DE SALON DE PROVENCE", 'siret'=>"17130111200131", 'dep'=>"13"),
|
||||||
'SANNOF' => array('nom'=>"JUGE DE PROXIMITE DE SANNOIS", 'siret'=>"17780111500474", 'dep'=>"95"),
|
'SANNOF' => array('nom'=>"JUGE DE PROXIMITE DE SANNOIS", 'siret'=>"17780111500474", 'dep'=>"95"),
|
||||||
@ -1718,7 +1718,7 @@ return array(
|
|||||||
'SENLIF' => array('nom'=>"JUGE DE PROXIMITE DE SENLIS", 'siret'=>"17800111100479", 'dep'=>"60"),
|
'SENLIF' => array('nom'=>"JUGE DE PROXIMITE DE SENLIS", 'siret'=>"17800111100479", 'dep'=>"60"),
|
||||||
'SENSF' => array('nom'=>"JUGE DE PROXIMITE DE SENS", 'siret'=>"17750111100856", 'dep'=>"89"),
|
'SENSF' => array('nom'=>"JUGE DE PROXIMITE DE SENS", 'siret'=>"17750111100856", 'dep'=>"89"),
|
||||||
'SETEF' => array('nom'=>"JUGE DE PROXIMITE DE SETE", 'siret'=>"17340111800430", 'dep'=>"34"),
|
'SETEF' => array('nom'=>"JUGE DE PROXIMITE DE SETE", 'siret'=>"17340111800430", 'dep'=>"34"),
|
||||||
'SOISSF' => array('nom'=>"JUGE DE PROXIMITE DE SOISSONS", 'siret'=>"17800111100370", 'dep'=>"22"),
|
'SOISSF' => array('nom'=>"JUGE DE PROXIMITE DE SOISSONS", 'siret'=>"17800111100370", 'dep'=>"02"),
|
||||||
'STRASF' => array('nom'=>"JUGE DE PROXIMITE DE STRASBOURG", 'siret'=>"17680111600268", 'dep'=>"67"),
|
'STRASF' => array('nom'=>"JUGE DE PROXIMITE DE STRASBOURG", 'siret'=>"17680111600268", 'dep'=>"67"),
|
||||||
'TARASF' => array('nom'=>"JUGE DE PROXIMITE DE TARASCON", 'siret'=>"17130111200420", 'dep'=>"13"),
|
'TARASF' => array('nom'=>"JUGE DE PROXIMITE DE TARASCON", 'siret'=>"17130111200420", 'dep'=>"13"),
|
||||||
'TARBEF' => array('nom'=>"JUGE DE PROXIMITE DE TARBES", 'siret'=>"17640111500090", 'dep'=>"65"),
|
'TARBEF' => array('nom'=>"JUGE DE PROXIMITE DE TARBES", 'siret'=>"17640111500090", 'dep'=>"65"),
|
||||||
@ -1730,7 +1730,7 @@ return array(
|
|||||||
'TOULOF' => array('nom'=>"JUGE DE PROXIMITE DE TOULOUSE", 'siret'=>"17310111400325", 'dep'=>"31"),
|
'TOULOF' => array('nom'=>"JUGE DE PROXIMITE DE TOULOUSE", 'siret'=>"17310111400325", 'dep'=>"31"),
|
||||||
'TOURCF' => array('nom'=>"JUGE DE PROXIMITE DE TOURCOING", 'siret'=>"17590111500360", 'dep'=>"59"),
|
'TOURCF' => array('nom'=>"JUGE DE PROXIMITE DE TOURCOING", 'siret'=>"17590111500360", 'dep'=>"59"),
|
||||||
'TOURSF' => array('nom'=>"JUGE DE PROXIMITE DE TOURS", 'siret'=>"17450111400220", 'dep'=>"37"),
|
'TOURSF' => array('nom'=>"JUGE DE PROXIMITE DE TOURS", 'siret'=>"17450111400220", 'dep'=>"37"),
|
||||||
'TREVOF' => array('nom'=>"JUGE DE PROXIMITE DE TREVOUX", 'siret'=>"17690111400494", 'dep'=>"16"),
|
'TREVOF' => array('nom'=>"JUGE DE PROXIMITE DE TREVOUX", 'siret'=>"17690111400494", 'dep'=>"01"),
|
||||||
'TROYEF' => array('nom'=>"JUGE DE PROXIMITE DE TROYES", 'siret'=>"17510111200266", 'dep'=>"10"),
|
'TROYEF' => array('nom'=>"JUGE DE PROXIMITE DE TROYES", 'siret'=>"17510111200266", 'dep'=>"10"),
|
||||||
'TULLEF' => array('nom'=>"JUGE DE PROXIMITE DE TULLE", 'siret'=>"17870111600166", 'dep'=>"19"),
|
'TULLEF' => array('nom'=>"JUGE DE PROXIMITE DE TULLE", 'siret'=>"17870111600166", 'dep'=>"19"),
|
||||||
'UZESF' => array('nom'=>"JUGE DE PROXIMITE DE UZES", 'siret'=>"17300111600347", 'dep'=>"30"),
|
'UZESF' => array('nom'=>"JUGE DE PROXIMITE DE UZES", 'siret'=>"17300111600347", 'dep'=>"30"),
|
||||||
@ -1740,7 +1740,7 @@ return array(
|
|||||||
'VANVEF' => array('nom'=>"JUGE DE PROXIMITE DE VANVES", 'siret'=>"17780111500342", 'dep'=>"92"),
|
'VANVEF' => array('nom'=>"JUGE DE PROXIMITE DE VANVES", 'siret'=>"17780111500342", 'dep'=>"92"),
|
||||||
'VERSAF' => array('nom'=>"JUGE DE PROXIMITE DE VERSAILLES", 'siret'=>"17780111500458", 'dep'=>"78"),
|
'VERSAF' => array('nom'=>"JUGE DE PROXIMITE DE VERSAILLES", 'siret'=>"17780111500458", 'dep'=>"78"),
|
||||||
'VESOUF' => array('nom'=>"JUGE DE PROXIMITE DE VESOUL", 'siret'=>"17250111600161", 'dep'=>"70"),
|
'VESOUF' => array('nom'=>"JUGE DE PROXIMITE DE VESOUL", 'siret'=>"17250111600161", 'dep'=>"70"),
|
||||||
'VICHYF' => array('nom'=>"JUGE DE PROXIMITE DE VICHY", 'siret'=>"17630111700287", 'dep'=>"32"),
|
'VICHYF' => array('nom'=>"JUGE DE PROXIMITE DE VICHY", 'siret'=>"17630111700287", 'dep'=>"03"),
|
||||||
'VIENNF' => array('nom'=>"JUGE DE PROXIMITE DE VIENNE", 'siret'=>"17380111900236", 'dep'=>"38"),
|
'VIENNF' => array('nom'=>"JUGE DE PROXIMITE DE VIENNE", 'siret'=>"17380111900236", 'dep'=>"38"),
|
||||||
'VILLFF' => array('nom'=>"JUGE DE PROXIMITE DE VILLEFRANCHE SUR SAONE", 'siret'=>"17690111400510", 'dep'=>"69"),
|
'VILLFF' => array('nom'=>"JUGE DE PROXIMITE DE VILLEFRANCHE SUR SAONE", 'siret'=>"17690111400510", 'dep'=>"69"),
|
||||||
'VILLEF' => array('nom'=>"JUGE DE PROXIMITE DE VILLEJUIF", 'siret'=>"17750111101284", 'dep'=>"94"),
|
'VILLEF' => array('nom'=>"JUGE DE PROXIMITE DE VILLEJUIF", 'siret'=>"17750111101284", 'dep'=>"94"),
|
||||||
|
@ -280,4 +280,5 @@ return array(
|
|||||||
9970 => "Groupement de coopération sanitaire à gestion privée",
|
9970 => "Groupement de coopération sanitaire à gestion privée",
|
||||||
7357 => "P?le d'?quilibre territorial",
|
7357 => "P?le d'?quilibre territorial",
|
||||||
7367 => "Centre Intercommunal d'action sociale",
|
7367 => "Centre Intercommunal d'action sociale",
|
||||||
|
6500 => "",
|
||||||
);
|
);
|
||||||
|
@ -2149,6 +2149,13 @@ return array(
|
|||||||
'Version' => 15,
|
'Version' => 15,
|
||||||
'LienEtab' => 1,
|
'LienEtab' => 1,
|
||||||
),
|
),
|
||||||
|
'5461' => array(
|
||||||
|
'libEven' => "Cession/donation dans le cadre d'un divorce",
|
||||||
|
'Bodacc_Code' => "BODA",
|
||||||
|
'Rubrique' => "ventes",
|
||||||
|
'Version' => 18,
|
||||||
|
'LienEtab' => 1,
|
||||||
|
),
|
||||||
'5500' => array(
|
'5500' => array(
|
||||||
'libEven' => "Entreprise réalisant la vente",
|
'libEven' => "Entreprise réalisant la vente",
|
||||||
'Bodacc_Code' => "BODA",
|
'Bodacc_Code' => "BODA",
|
||||||
|
5
library/Metier/sphinx/Engine.php
Normal file
5
library/Metier/sphinx/Engine.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
class Metier_Sphinx_Engine
|
||||||
|
{
|
||||||
|
public function __construct() {}
|
||||||
|
}
|
@ -6,10 +6,6 @@ if (defined('DEBUG') == false) {
|
|||||||
define( 'DEBUG', 0);
|
define( 'DEBUG', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once realpath(dirname(__FILE__)).'/criteresFonc.php';
|
|
||||||
|
|
||||||
$gDatabaseJO = databaseJO();
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------- //
|
// --------------------------------------------------------------------------- //
|
||||||
// databaseJO
|
// databaseJO
|
||||||
// --------------------------------------------------------------------------- //
|
// --------------------------------------------------------------------------- //
|
||||||
@ -36,17 +32,15 @@ function println($ln = '')
|
|||||||
// debugln
|
// debugln
|
||||||
// --------------------------------------------------------------------------- //
|
// --------------------------------------------------------------------------- //
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
function debugln($ln = '')
|
function debugln($ln = '') {
|
||||||
{
|
|
||||||
print $ln.'<br/>';
|
print $ln.'<br/>';
|
||||||
}
|
}
|
||||||
} else if (LOCAL) {
|
}
|
||||||
function debugln($ln = '')
|
else if (LOCAL) {
|
||||||
{
|
function debugln($ln = '') {}
|
||||||
}
|
}
|
||||||
} else {
|
else {
|
||||||
function debugln($ln = '')
|
function debugln($ln = '') {
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
$fp = fopen(LOG_PATH.'/recherchesDebug.log', 'a');
|
$fp = fopen(LOG_PATH.'/recherchesDebug.log', 'a');
|
||||||
fwrite($fp, $ln."\n");
|
fwrite($fp, $ln."\n");
|
||||||
@ -55,6 +49,199 @@ if (DEBUG) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------- //
|
||||||
|
// Nouvelle sequence
|
||||||
|
// --------------------------------------------------------------------------- //
|
||||||
|
function nouvelleSequence(&$criteres)
|
||||||
|
{
|
||||||
|
$sequence = array(
|
||||||
|
array( 'crit' => 'IT ', 'next' => '12' ),
|
||||||
|
array( 'crit' => 'I ', 'next' => '00' ),
|
||||||
|
array( 'crit' => 'I SEP ', 'next' => '12' ),
|
||||||
|
array( 'crit' => ' T ', 'next' => '00' ),
|
||||||
|
array( 'crit' => ' TSEP ', 'next' => '13 61 61o61p' ),
|
||||||
|
array( 'crit' => ' D VNR', 'next' => '24 45o24o24p' ),
|
||||||
|
array( 'crit' => ' D NR', 'next' => '21o21p' ),
|
||||||
|
array( 'crit' => ' DL NR', 'next' => '21 21o21p' ),
|
||||||
|
array( 'crit' => ' DLVNR', 'next' => '36 45 24 45o24o24p' ),
|
||||||
|
array( 'crit' => ' P VNR', 'next' => '74 78o74o74p' ),
|
||||||
|
array( 'crit' => ' PD VNR', 'next' => '74 78o74o74p' ),
|
||||||
|
array( 'crit' => ' PDL NR', 'next' => '78 83o74 74o74p' ),
|
||||||
|
array( 'crit' => ' PDLV R', 'next' => '78 81 82 77 71' ),
|
||||||
|
array( 'crit' => ' PDLVN ', 'next' => '82 75 28 71' ),
|
||||||
|
array( 'crit' => ' PDLVNR', 'next' => '78 74 82 78o74o82o82p' ),
|
||||||
|
array( 'crit' => ' S ', 'next' => '30o30p' ),
|
||||||
|
array( 'crit' => ' S R', 'next' => '72o71 71o71p' ),
|
||||||
|
array( 'crit' => ' S N ', 'next' => '31' ),
|
||||||
|
array( 'crit' => ' S NR', 'next' => '77 43 71' ),
|
||||||
|
array( 'crit' => ' S V ', 'next' => '35o35p30' ),
|
||||||
|
array( 'crit' => ' S VN ', 'next' => '75 77o75o77p75p' ),
|
||||||
|
array( 'crit' => ' S V R', 'next' => '75 83' ),
|
||||||
|
array( 'crit' => ' S VNR', 'next' => '43 44 75 83 61 71' ),
|
||||||
|
array( 'crit' => ' S D ', 'next' => '40p40o61p61' ),
|
||||||
|
array( 'crit' => ' S D R', 'next' => '45o77 77o77p' ),
|
||||||
|
array( 'crit' => ' S D N ', 'next' => '71' ),
|
||||||
|
array( 'crit' => ' S D NR', 'next' => '77 43 71 31' ),
|
||||||
|
array( 'crit' => ' S D V ', 'next' => '77o40 40o' ),
|
||||||
|
array( 'crit' => ' S D V R', 'next' => '75 72 71' ),
|
||||||
|
array( 'crit' => ' S D VN ', 'next' => '43 41 77 71' ),
|
||||||
|
array( 'crit' => ' S D VNR', 'next' => '44 43 49 73 75 72 71' ),
|
||||||
|
array( 'crit' => ' S DL ', 'next' => '78 78p61p61p' ),
|
||||||
|
array( 'crit' => ' S DL R', 'next' => '82 78 77 71' ),
|
||||||
|
array( 'crit' => ' S DL N ', 'next' => '41 71' ),
|
||||||
|
array( 'crit' => ' S DL NR', 'next' => '78 82 81 78p77 43 71 31' ),
|
||||||
|
array( 'crit' => ' S DLV ', 'next' => '78 78p71' ),
|
||||||
|
array( 'crit' => ' S DLV R', 'next' => '78 83 82 75 72 40 71' ),
|
||||||
|
array( 'crit' => ' S DLVN ', 'next' => '78 82 78p43 71' ),
|
||||||
|
array( 'crit' => ' S DLVNR', 'next' => '78 49 77 43 78p75 41 72 71 22' ),
|
||||||
|
array( 'crit' => ' S P ', 'next' => '60o60p31 31o31p' ),
|
||||||
|
array( 'crit' => ' S P R', 'next' => '45 77 41' ),
|
||||||
|
array( 'crit' => ' S P N ', 'next' => '71 71o45 45p' ),
|
||||||
|
array( 'crit' => ' S P NR', 'next' => '77 72 33 32' ),
|
||||||
|
array( 'crit' => ' S P V ', 'next' => '63o45 45o45p' ),
|
||||||
|
array( 'crit' => ' S P VN ', 'next' => '45 43 61 64' ),
|
||||||
|
array( 'crit' => ' S P V R', 'next' => '75 83 45 35' ),
|
||||||
|
array( 'crit' => ' S P VNR', 'next' => '77 45 44 43 73 75 72 71 41 42 40' ),
|
||||||
|
array( 'crit' => ' S PD ', 'next' => '45 71p71o' ),
|
||||||
|
array( 'crit' => ' S PD R', 'next' => '77 45 71' ),
|
||||||
|
array( 'crit' => ' S PD N ', 'next' => '71 71o45 45o' ),
|
||||||
|
array( 'crit' => ' S PD NR', 'next' => '77 76 45 41 43 40' ),
|
||||||
|
array( 'crit' => ' S PD V ', 'next' => '45 45o71 42 42p' ),
|
||||||
|
array( 'crit' => ' S PD V R', 'next' => '77 83 43 71 41' ),
|
||||||
|
array( 'crit' => ' S PD VN ', 'next' => '83 75 71 44 83o75o71o44o43 41 40 40o40p' ),
|
||||||
|
array( 'crit' => ' S PD VNR', 'next' => '77 74 45 44 43 75 71 61 63 60 40' ),
|
||||||
|
array( 'crit' => ' S PDL ', 'next' => '71 71o71p45 45o' ),
|
||||||
|
array( 'crit' => ' S PDL R', 'next' => '78 82 75 45 44' ),
|
||||||
|
array( 'crit' => ' S PDL N ', 'next' => '73 48 41' ),
|
||||||
|
array( 'crit' => ' S PDL NR', 'next' => '78 82 81 49 77 65 44 43 75 60 31' ),
|
||||||
|
array( 'crit' => ' S PDLV ', 'next' => '78 45 45o71 42 42p40' ),
|
||||||
|
array( 'crit' => ' S PDLV R', 'next' => '78 83 82 75 45 49 46 42 71 40' ),
|
||||||
|
array( 'crit' => ' S PDLVN ', 'next' => '78 83 77 45 71 42 41 40' ),
|
||||||
|
array( 'crit' => ' S PDLVNR', 'next' => '78 83 27 74 45 44 43 42 40' ),
|
||||||
|
array( 'crit' => ' SE ', 'next' => '31o31p' ),
|
||||||
|
array( 'crit' => ' SE R', 'next' => '72o71 71o71p' ),
|
||||||
|
array( 'crit' => ' SE N ', 'next' => '31' ),
|
||||||
|
array( 'crit' => ' SE NR', 'next' => '77 43 71' ),
|
||||||
|
array( 'crit' => ' SE V ', 'next' => '35o35p30' ),
|
||||||
|
array( 'crit' => ' SE V R', 'next' => '75 83' ),
|
||||||
|
array( 'crit' => ' SE VN ', 'next' => '75 77' ),
|
||||||
|
array( 'crit' => ' SE VNR', 'next' => '43 44 75 83 61 71' ),
|
||||||
|
array( 'crit' => ' SE D ', 'next' => '40o30' ),
|
||||||
|
array( 'crit' => ' SE D R', 'next' => '45o77' ),
|
||||||
|
array( 'crit' => ' SE D N ', 'next' => '71' ),
|
||||||
|
array( 'crit' => ' SE D NR', 'next' => '77 43 71 31' ),
|
||||||
|
array( 'crit' => ' SE D V ', 'next' => '77o40' ),
|
||||||
|
array( 'crit' => ' SE D V R', 'next' => '75 72 71' ),
|
||||||
|
array( 'crit' => ' SE D VN ', 'next' => '43 41 77' ),
|
||||||
|
array( 'crit' => ' SE D VNR', 'next' => '44 43 49 73 75 72 71' ),
|
||||||
|
array( 'crit' => ' SE DL ', 'next' => '40' ),
|
||||||
|
array( 'crit' => ' SE DL R', 'next' => '82 78 77' ),
|
||||||
|
array( 'crit' => ' SE DL N ', 'next' => '45 43 82o45o43o43p' ),
|
||||||
|
array( 'crit' => ' SE DL NR', 'next' => '78 82 81 46 77 43 71 31' ),
|
||||||
|
array( 'crit' => ' SE DLV ', 'next' => '78 78o71 71o71p' ),
|
||||||
|
array( 'crit' => ' SE DLV R', 'next' => '78 83 82 75 72 40' ),
|
||||||
|
array( 'crit' => ' SE DLVN ', 'next' => '78 82 46 43 71' ),
|
||||||
|
array( 'crit' => ' SE DLVNR', 'next' => '78 49 77 43 46 75 41 72 71 22' ),
|
||||||
|
array( 'crit' => ' SEP ', 'next' => '61p31 31p30' ),
|
||||||
|
array( 'crit' => ' SEP R', 'next' => '45 77 41' ),
|
||||||
|
array( 'crit' => ' SEP N ', 'next' => '71 71o45 45p' ),
|
||||||
|
array( 'crit' => ' SEP NR', 'next' => '77 72 33 32' ),
|
||||||
|
array( 'crit' => ' SEP V ', 'next' => '63o45' ),
|
||||||
|
array( 'crit' => ' SEP V R', 'next' => '75 83 45 35' ),
|
||||||
|
array( 'crit' => ' SEP VN ', 'next' => '45 43 61 64' ),
|
||||||
|
array( 'crit' => ' SEP VNR', 'next' => '77 45 44 43 73 75 72 71 41 42 40' ),
|
||||||
|
array( 'crit' => ' SEPD ', 'next' => '45 71p' ),
|
||||||
|
array( 'crit' => ' SEPD R', 'next' => '77 45' ),
|
||||||
|
array( 'crit' => ' SEPD N ', 'next' => '71 71o45 40' ),
|
||||||
|
array( 'crit' => ' SEPD NR', 'next' => '77 76 45 41 43 40' ),
|
||||||
|
array( 'crit' => ' SEPD V ', 'next' => '45 71p71o40' ),
|
||||||
|
array( 'crit' => ' SEPD V R', 'next' => '77 83 43 71 41 40' ),
|
||||||
|
array( 'crit' => ' SEPD VN ', 'next' => '83 75 71 44 83o75o71o44o43 41 40 40o40p' ),
|
||||||
|
array( 'crit' => ' SEPD VNR', 'next' => '77 74 45 44 43 75 71 61 63 60 40' ),
|
||||||
|
array( 'crit' => ' SEPDL ', 'next' => '45 71p40' ),
|
||||||
|
array( 'crit' => ' SEPDL R', 'next' => '78 82 75 45 44 40' ),
|
||||||
|
array( 'crit' => ' SEPDL N ', 'next' => '73 48 41 40' ),
|
||||||
|
array( 'crit' => ' SEPDL NR', 'next' => '78 82 81 49 77 65 44 43 75 60 31' ),
|
||||||
|
array( 'crit' => ' SEPDLV ', 'next' => '78 45 45o71 42 42p' ),
|
||||||
|
array( 'crit' => ' SEPDLV R', 'next' => '78 83 82 75 45 49 46 42 71 40' ),
|
||||||
|
array( 'crit' => ' SEPDLVN ', 'next' => '78 83 77 45 71 42 41 40' ),
|
||||||
|
array( 'crit' => ' SEPDLVNR', 'next' => '78 83 27 74 45 44 43 42 40' ),
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($sequence as $ligne) {
|
||||||
|
if (strstr($ligne['crit'], $criteres) != false) {
|
||||||
|
return str_split($ligne['next'], 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------- //
|
||||||
|
// Nouvelle combinaison
|
||||||
|
// --------------------------------------------------------------------------- //
|
||||||
|
function nouvelleCombinaison(&$sequence, &$sequencePos, $pass, &$index, &$mode)
|
||||||
|
{
|
||||||
|
for (;;) {
|
||||||
|
if (isset($sequence[$sequencePos]) === false) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$combinaison = trim($sequence[$sequencePos]);
|
||||||
|
++$sequencePos;
|
||||||
|
|
||||||
|
if (strlen($combinaison) == 2) {
|
||||||
|
return $combinaison;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Passage en phonetique ou en orthographique
|
||||||
|
if (strlen($combinaison) == 3) {
|
||||||
|
if ($pass == 2 || $pass == 3) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$car = strtolower(substr($combinaison, 2, 1));
|
||||||
|
|
||||||
|
//Search Engine Version 2, we remove the orthographique
|
||||||
|
if (SPHINX_ENT_VERSION == 2 && $car == 'o') {
|
||||||
|
return strtolower(substr($combinaison, 0, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
switch($car) {
|
||||||
|
case 'p':
|
||||||
|
$index = 'ent_phx';
|
||||||
|
$mode = SPH_MATCH_EXTENDED2;
|
||||||
|
break;
|
||||||
|
case 'o':
|
||||||
|
$index = 'ent_mns';
|
||||||
|
$mode = SPH_MATCH_ISPELL;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
debugln("attention: mode inconnu: '$car'");
|
||||||
|
}
|
||||||
|
} else if ($pass == 1) {
|
||||||
|
$index = 'ent_mns';
|
||||||
|
//Search Engine Version 2, we remove the orthographique
|
||||||
|
if (SPHINX_ENT_VERSION == 2) {
|
||||||
|
$index = 'ent';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $combinaison;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------- //
|
||||||
|
// Nouveaux criteres
|
||||||
|
// --------------------------------------------------------------------------- //
|
||||||
|
function nouveauxCriteres($comb2crit, $combinaison)
|
||||||
|
{
|
||||||
|
if ( array_key_exists($combinaison, $comb2crit) ) {
|
||||||
|
$ligne = $comb2crit[$combinaison];
|
||||||
|
return $ligne;
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------- //
|
// --------------------------------------------------------------------------- //
|
||||||
// Filtre les caracteres speciaux
|
// Filtre les caracteres speciaux
|
||||||
// --------------------------------------------------------------------------- //
|
// --------------------------------------------------------------------------- //
|
||||||
@ -1811,4 +1998,4 @@ function recherche(&$formR, $deb = 0, $nbRep = 20, $max = 1000)
|
|||||||
'erreur' => 'Type de recherche inconnu');
|
'erreur' => 'Type de recherche inconnu');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
112
library/Scores/Account/Category.php
Normal file
112
library/Scores/Account/Category.php
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
<?php
|
||||||
|
return array(
|
||||||
|
'RECHERCHE' => array(
|
||||||
|
'label' => "Recherche",
|
||||||
|
'droits' => array(
|
||||||
|
'RECHCSV',
|
||||||
|
'IPARI',
|
||||||
|
'HISTOBODACC',
|
||||||
|
'INVESTIG',
|
||||||
|
'SEARCHENT',
|
||||||
|
'SEARCHDIR',
|
||||||
|
'SEARCHACT'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'IDENTITE' => array(
|
||||||
|
'label' => "Identité",
|
||||||
|
'droits' => array(
|
||||||
|
'IDENTITE',
|
||||||
|
'IDPROCOL',
|
||||||
|
'LIENS',
|
||||||
|
'ETABLISSEMENTS',
|
||||||
|
'GROUPE',
|
||||||
|
'EVENINSEE',
|
||||||
|
'AVISINSEE',
|
||||||
|
'AVISRNCS',
|
||||||
|
'RNVP'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'DIRIGEANT' => array(
|
||||||
|
'label' => "Dirigeant",
|
||||||
|
'droits' => array(
|
||||||
|
'DIRIGEANTS',
|
||||||
|
'DIRIGEANTSOP',
|
||||||
|
'WORLDCHECK'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'FINANCE' => array(
|
||||||
|
'label' => 'Elements Financiers',
|
||||||
|
'droits' => array(
|
||||||
|
'SYNTHESE',
|
||||||
|
'RATIOS',
|
||||||
|
'FLUX',
|
||||||
|
'LIASSE',
|
||||||
|
'LIASSEXLS',
|
||||||
|
'UPLOADBILAN',
|
||||||
|
'BOURSE',
|
||||||
|
'BANQUE'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'JURIDIQUE' => array(
|
||||||
|
'label' => 'Elements Juridiques',
|
||||||
|
'droits' => array('ANNONCES',
|
||||||
|
'INFOSREG',
|
||||||
|
'COMPETENCES',
|
||||||
|
'CONVENTIONS',
|
||||||
|
'MARQUES',
|
||||||
|
'CONTENTIEUX'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'EVALUATION' => array(
|
||||||
|
'label' => 'Evaluation',
|
||||||
|
'droits' => array(
|
||||||
|
'INDISCORE',
|
||||||
|
'INDISCORE2',
|
||||||
|
'INDISCORE3',
|
||||||
|
'INDISCOREP',
|
||||||
|
'INDISCORE2P',
|
||||||
|
'INDISCORE3P',
|
||||||
|
'VALORISATION',
|
||||||
|
'ENQUETEC',
|
||||||
|
'AVISCREDIT'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'PIECES' => array(
|
||||||
|
'label' => 'Pièces officielles',
|
||||||
|
'droits' => array(
|
||||||
|
'KBIS',
|
||||||
|
'ACTES',
|
||||||
|
'PRIVILEGES'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'SURVEILLANCES' => array(
|
||||||
|
'label' => 'Surveillances',
|
||||||
|
'droits' => array(
|
||||||
|
'SURVANNONCE',
|
||||||
|
'SURVINSEE',
|
||||||
|
'SURVBILAN',
|
||||||
|
'SURVSCORE',
|
||||||
|
'SURVACTES',
|
||||||
|
'SURVDIRIGEANTS',
|
||||||
|
'SURVPAIEMENTS',
|
||||||
|
'SURVLIENS',
|
||||||
|
'SURVPRIV',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'OPTIONS' => array(
|
||||||
|
'label' => 'Options',
|
||||||
|
'droits' => array(
|
||||||
|
'MONPROFIL',
|
||||||
|
'SURVLISTE',
|
||||||
|
'PORTEFEUILLE',
|
||||||
|
'EDITION'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'DIVERS' => array(
|
||||||
|
'label' => 'Divers',
|
||||||
|
'droits' => array(
|
||||||
|
'INTERNATIONAL',
|
||||||
|
'BDF'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
@ -543,21 +543,6 @@ class Scores_Extract_Dict
|
|||||||
'help' => "",
|
'help' => "",
|
||||||
'columns' => array()
|
'columns' => array()
|
||||||
),
|
),
|
||||||
'ZonePrioritaire' => array(
|
|
||||||
'lib' => 'Zone Prioritaire',
|
|
||||||
'help' => "",
|
|
||||||
'columns' => array()
|
|
||||||
),
|
|
||||||
'AdresseDom'=> array(
|
|
||||||
'lib' => 'AdresseDom',
|
|
||||||
'help' => "",
|
|
||||||
'columns' => array()
|
|
||||||
),
|
|
||||||
'Iris'=> array(
|
|
||||||
'lib' => 'Iris',
|
|
||||||
'help' => "",
|
|
||||||
'columns' => array()
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public function __construct(){}
|
public function __construct(){}
|
||||||
|
67
library/Scores/Logger/Sql.php
Normal file
67
library/Scores/Logger/Sql.php
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
use Doctrine\DBAL\Logging\SQLLogger;
|
||||||
|
|
||||||
|
class Scores_Logger_Sql implements SQLLogger
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Executed SQL queries.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $query = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If Debug Stack is enabled (log queries) or not.
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
public $enabled = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float|null
|
||||||
|
*/
|
||||||
|
public $start = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
public $total = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
public $nb = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function startQuery($sql, array $params = null, array $types = null)
|
||||||
|
{
|
||||||
|
if ($this->enabled) {
|
||||||
|
$this->start = microtime(true);
|
||||||
|
$this->query = array('sql' => $sql, 'params' => $params, 'types' => $types, 'executionMS' => 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function stopQuery()
|
||||||
|
{
|
||||||
|
if ($this->enabled) {
|
||||||
|
$time = microtime(true) - $this->start;
|
||||||
|
$this->total+= $time;
|
||||||
|
$this->query['executionTotal'] = $this->total;
|
||||||
|
$this->query['executionMS'] = $time;
|
||||||
|
if ($this->nb == 0) {
|
||||||
|
file_put_contents('logger.log', print_r($this->query,1));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
file_put_contents('logger.log', print_r($this->query,1), FILE_APPEND);
|
||||||
|
}
|
||||||
|
$this->nb++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
use Doctrine\DBAL\Connection;
|
||||||
|
|
||||||
class Scores_Ws_Server
|
class Scores_Ws_Server
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -72,65 +74,16 @@ class Scores_Ws_Server
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List all permission
|
* Liste des permissions
|
||||||
* @var array
|
* @var array
|
||||||
*
|
|
||||||
* category
|
|
||||||
*
|
|
||||||
* acces
|
|
||||||
* code | label | category
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
protected $listeDroits = array ();
|
protected $listeDroits = array();
|
||||||
|
|
||||||
protected $listeCategory = array(
|
/**
|
||||||
'RECHERCHE' => array(
|
* Permissions et catégories
|
||||||
'label' => "Recherche",
|
* @var array
|
||||||
'droits' => array('RECHCSV', 'IPARI', 'HISTOBODACC', 'INVESTIG', 'SEARCHENT',
|
*/
|
||||||
'SEARCHDIR', 'SEARCHACT'),
|
protected $listeCategory = array();
|
||||||
),
|
|
||||||
'IDENTITE' => array(
|
|
||||||
'label' => "Identité",
|
|
||||||
'droits' => array('IDENTITE','IDPROCOL', 'LIENS', 'ETABLISSEMENTS', 'GROUPE',
|
|
||||||
'EVENINSEE', 'AVISINSEE', 'AVISRNCS', 'RNVP'),
|
|
||||||
),
|
|
||||||
'DIRIGEANT' => array(
|
|
||||||
'label' => "Dirigeant",
|
|
||||||
'droits' => array('DIRIGEANTS','DIRIGEANTSOP', 'WORLDCHECK'),
|
|
||||||
),
|
|
||||||
'FINANCE' => array(
|
|
||||||
'label' => 'Elements Financiers',
|
|
||||||
'droits' => array('SYNTHESE','RATIOS','FLUX','LIASSE','LIASSEXLS', 'UPLOADBILAN',
|
|
||||||
'BOURSE','BANQUE'),
|
|
||||||
),
|
|
||||||
'JURIDIQUE' => array(
|
|
||||||
'label' => 'Elements Juridiques',
|
|
||||||
'droits' => array('ANNONCES','INFOSREG','COMPETENCES','CONVENTIONS','MARQUES'),
|
|
||||||
),
|
|
||||||
'EVALUATION' => array(
|
|
||||||
'label' => 'Evaluation',
|
|
||||||
'droits' => array('INDISCORE', 'INDISCORE2', 'INDISCORE3', 'INDISCOREP', 'INDISCORE2P',
|
|
||||||
'INDISCORE3P','VALORISATION','ENQUETEC','AVISCREDIT'),
|
|
||||||
),
|
|
||||||
'PIECES' => array(
|
|
||||||
'label' => 'Pièces officielles',
|
|
||||||
'droits' => array('KBIS', 'ACTES', 'PRIVILEGES'),
|
|
||||||
),
|
|
||||||
'SURVEILLANCES' => array(
|
|
||||||
'label' => 'Surveillances',
|
|
||||||
'droits' => array('SURVANNONCE', 'SURVINSEE', 'SURVBILAN', 'SURVSCORE', 'SURVACTES',
|
|
||||||
'SURVDIRIGEANTS', 'SURVPAIEMENTS', 'SURVLIENS', 'SURVPRIV',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'OPTIONS' => array(
|
|
||||||
'label' => 'Options',
|
|
||||||
'droits' => array('MONPROFIL','SURVLISTE','PORTEFEUILLE','EDITION'),
|
|
||||||
),
|
|
||||||
'DIVERS' => array(
|
|
||||||
'label' => 'Divers',
|
|
||||||
'droits' => array('INTERNATIONAL', 'BDF'),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List preferences
|
* List preferences
|
||||||
@ -281,25 +234,21 @@ class Scores_Ws_Server
|
|||||||
'9020' => "Requête incorrecte",
|
'9020' => "Requête incorrecte",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PDO Connection with Doctrine
|
||||||
|
* @var \Doctrine\DBAL\Connection
|
||||||
|
*/
|
||||||
|
protected $conn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Server SOAP
|
||||||
|
* Document/Literal Wrapped - WS-I Compliant
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
defined('DATETIME')
|
$this->conn = Zend_Registry::get('doctrine');
|
||||||
|| define ('DATETIME', date('YmdHis'));
|
$this->listeDroits = include APPLICATION_PATH . '/../library/Scores/Account/Access.php';
|
||||||
|
$this->listeCategory = include APPLICATION_PATH . '/../library/Scores/Account/Category.php';
|
||||||
defined('DATE')
|
|
||||||
|| define ('DATE', substr(DATETIME,0,8));
|
|
||||||
|
|
||||||
defined('TIME')
|
|
||||||
|| define ('TIME', substr(DATETIME,8,6));
|
|
||||||
|
|
||||||
defined('DATE_LISIBLE')
|
|
||||||
|| define ('DATE_LISIBLE', substr(DATETIME,6,2).'/'.substr(DATETIME,4,2).'/'.substr(DATETIME,0,4));
|
|
||||||
|
|
||||||
defined('TIME_LISIBLE')
|
|
||||||
|| define ('TIME_LISIBLE', substr(DATETIME,8,2).':'.substr(DATETIME,10,2).':'.substr(DATETIME,12,2));
|
|
||||||
|
|
||||||
|
|
||||||
$this->listeDroits = include APPLICATION_PATH . '/../library/Scores/Account/Access.php';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -313,7 +262,7 @@ class Scores_Ws_Server
|
|||||||
if (array_key_exists($code, $this->listError)){
|
if (array_key_exists($code, $this->listError)){
|
||||||
$message = $this->listError[$code];
|
$message = $this->listError[$code];
|
||||||
}
|
}
|
||||||
throw new SoapFault($code,$message);
|
throw new SoapFault($code, $message);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,20 +273,21 @@ class Scores_Ws_Server
|
|||||||
* @param $ref
|
* @param $ref
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function wsLog($service, $siret='', $ref='')
|
protected function wsLog($service, $siret = '', $ref = '')
|
||||||
{
|
{
|
||||||
//Is it a test
|
//Is it a test
|
||||||
if ( $this->User->clientTest=='Oui' || $this->User->typeCompte=='TEST' ) {
|
if ($this->User->clientTest=='Oui' || $this->User->typeCompte=='TEST') {
|
||||||
$test=1;
|
$test = 1;
|
||||||
} else {
|
} else {
|
||||||
$test=0;
|
$test = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$siren = 0;
|
$siren = 0;
|
||||||
if ( strlen($siret) == 14 ) {
|
if (strlen($siret) == 14) {
|
||||||
$siren = substr($siret,0,9);
|
$siren = substr($siret, 0, 9);
|
||||||
$nic = substr($siret,9,5);
|
$nic = substr($siret, 9, 5);
|
||||||
} elseif ( strlen($siret) == 9 ) {
|
}
|
||||||
|
elseif (strlen($siret) == 9) {
|
||||||
$siren = $siret;
|
$siren = $siret;
|
||||||
$nic = '';
|
$nic = '';
|
||||||
}
|
}
|
||||||
@ -357,8 +307,6 @@ class Scores_Ws_Server
|
|||||||
'ipClient' => $this->User->ipConnexion,
|
'ipClient' => $this->User->ipConnexion,
|
||||||
);
|
);
|
||||||
|
|
||||||
$db = Zend_Db_Table_Abstract::getDefaultAdapter();
|
|
||||||
|
|
||||||
$pageRS = array(
|
$pageRS = array(
|
||||||
'identite',
|
'identite',
|
||||||
'greffe_bilans',
|
'greffe_bilans',
|
||||||
@ -381,54 +329,47 @@ class Scores_Ws_Server
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( intval($siren)!=0 && in_array($service, $pageRS) ) {
|
if ( intval($siren)!=0 && in_array($service, $pageRS) ) {
|
||||||
|
$qb = $this->conn->createQueryBuilder();
|
||||||
|
$qb->select(array('e.siren', 'e.nic', 'e.actif', 'e.siege', 'e.raisonSociale',
|
||||||
|
'e.adr_cp', 'e.adr_ville', 'e.source', 'COUNT(r.siren) AS nb'))
|
||||||
|
->from('jo.etablissements', 'e')
|
||||||
|
->where('e.siren = :siren')->setParameter('siren', $siren)
|
||||||
|
->rightJoin('e', 'jo.rncs_entrep', 'r', 'e.siren = r.siren');
|
||||||
|
|
||||||
$sql = $db->select()->from('jo.etablissements', array('siren', 'nic', 'actif', 'siege', 'raisonSociale',
|
if (intval($siren) > 1000 && intval($nic) > 9) {
|
||||||
'adr_cp', 'adr_ville', 'source'))->where('siren=?', $siren);
|
$qb->andWhere('e.nic = :nic')->setParameter('nic', $nic);
|
||||||
|
} elseif (intval($siren) == 0 && $ref > 0) {
|
||||||
if ( intval($siren)>1000 && intval($nic)>9 ) {
|
$qb->andWhere('e.id = :id')->setParameter('id', $ref);
|
||||||
$sql->where('nic=?', $nic);
|
} elseif (intval($siren) > 1000) {
|
||||||
} elseif ( intval($siren)==0 && $ref>0 ) {
|
$qb->andWhere('e.siege = 1')->orderBy('e.actif', 'DESC')->orderBy('e.nic', 'DESC');
|
||||||
$sql->where('id=?', $ref);
|
|
||||||
} elseif ( intval($siren)>1000 ) {
|
|
||||||
$sql->where('siege=1')->order('actif DESC')->order('nic DESC');
|
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$result = $db->fetchRow($sql, null, Zend_Db::FETCH_OBJ);
|
$stmt = $qb->execute();
|
||||||
if ( $result !== null ) {
|
if ($stmt->rowCount() > 0) {
|
||||||
//file_put_contents('lecture.log', print_r($result,1));
|
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
$dataInsert['raisonSociale'] = $result->raisonSociale;
|
$dataInsert['raisonSociale'] = $result->raisonSociale;
|
||||||
$dataInsert['cp'] = $result->adr_cp;
|
$dataInsert['cp'] = $result->adr_cp;
|
||||||
$dataInsert['ville'] = $result->adr_ville;
|
$dataInsert['ville'] = $result->adr_ville;
|
||||||
$dataInsert['source'] = $result->source;
|
$dataInsert['source'] = $result->source;
|
||||||
if ( $result->actif == 0 ) {
|
if ($result->actif == 0) {
|
||||||
$dataInsert['actifInsee'] = 0;
|
$dataInsert['actifInsee'] = 0;
|
||||||
} elseif ( intval($siren)>1000 ) {
|
}
|
||||||
|
elseif (intval($siren) > 1000) {
|
||||||
$dataInsert['actifInsee'] = 1;
|
$dataInsert['actifInsee'] = 1;
|
||||||
$sql = $db->select()->from('jo.rncs_entrep', 'count(*) AS nb')->where('siren=?', $siren);
|
if ($result->nb > 0 ) {
|
||||||
$result = $db->fetchRow($sql, null, Zend_Db::FETCH_OBJ);
|
$dataInsert['source'] = 5;
|
||||||
if ( $result !== null ) {
|
|
||||||
if ($result->nb>0 ) {
|
|
||||||
$dataInsert['source'] = 5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(Zend_Db_Exception $e) {
|
} catch(\Doctrine\DBAL\DBALException $e) {}
|
||||||
//@todo : log exception
|
|
||||||
//file_put_contents('test.log', $e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//file_put_contents('insert.log', print_r($dataInsert,1));
|
$this->conn->insert('sdv1.logs', $dataInsert);
|
||||||
$db->insert('sdv1.logs', $dataInsert);
|
} catch(\Doctrine\DBAL\DBALException $e) {}
|
||||||
} catch(Zend_Db_Exception $e) {
|
|
||||||
//@todo : log exception
|
|
||||||
//file_put_contents('test.log', $e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -439,10 +380,8 @@ class Scores_Ws_Server
|
|||||||
*/
|
*/
|
||||||
public function authenticate($username = null, $password = null)
|
public function authenticate($username = null, $password = null)
|
||||||
{
|
{
|
||||||
if ( $this->authenticated === false )
|
if ( $this->authenticated === false ) {
|
||||||
{
|
if ( empty($username) ) {
|
||||||
if ( empty($username) )
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @todo : Digest auth
|
* @todo : Digest auth
|
||||||
*/
|
*/
|
||||||
@ -450,8 +389,7 @@ class Scores_Ws_Server
|
|||||||
$username = $_SERVER['PHP_AUTH_USER'];
|
$username = $_SERVER['PHP_AUTH_USER'];
|
||||||
$password = $_SERVER['PHP_AUTH_PW'];
|
$password = $_SERVER['PHP_AUTH_PW'];
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Auth Header in client
|
* Auth Header in client
|
||||||
* $ns = 'auth';
|
* $ns = 'auth';
|
||||||
@ -494,7 +432,8 @@ class Scores_Ws_Server
|
|||||||
$this->authenticated = $this->checkAuth($username, $password, $ip);
|
$this->authenticated = $this->checkAuth($username, $password, $ip);
|
||||||
if ( $this->authenticated === false ) {
|
if ( $this->authenticated === false ) {
|
||||||
$this->sendError('0900');
|
$this->sendError('0900');
|
||||||
} elseif ( is_string($this->authenticated) ) {
|
}
|
||||||
|
elseif ( is_string($this->authenticated) ) {
|
||||||
$this->sendError($this->authenticated);
|
$this->sendError($this->authenticated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -506,7 +445,7 @@ class Scores_Ws_Server
|
|||||||
*/
|
*/
|
||||||
protected function permission($perm)
|
protected function permission($perm)
|
||||||
{
|
{
|
||||||
if ( !$this->checkPerm($perm) ){
|
if ( !$this->checkPerm($perm) ) {
|
||||||
$this->sendError('0902');
|
$this->sendError('0902');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -519,7 +458,7 @@ class Scores_Ws_Server
|
|||||||
{
|
{
|
||||||
//Vérifier que l'utilisateur à le droit accesWS (clients/utilisateurs)
|
//Vérifier que l'utilisateur à le droit accesWS (clients/utilisateurs)
|
||||||
$accesWs = $this->User->accesWS;
|
$accesWs = $this->User->accesWS;
|
||||||
if ($accesWs){
|
if ($accesWs) {
|
||||||
$this->sendError('0901');
|
$this->sendError('0901');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -537,7 +476,8 @@ class Scores_Ws_Server
|
|||||||
if ( in_array(strtolower($perm), $droits) ){
|
if ( in_array(strtolower($perm), $droits) ){
|
||||||
$output = true;
|
$output = true;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if ( preg_match('/\b'.$perm.'\b/i', $droits) ){
|
if ( preg_match('/\b'.$perm.'\b/i', $droits) ){
|
||||||
$output = true;
|
$output = true;
|
||||||
}
|
}
|
||||||
@ -551,11 +491,13 @@ class Scores_Ws_Server
|
|||||||
*/
|
*/
|
||||||
protected function checkEdition()
|
protected function checkEdition()
|
||||||
{
|
{
|
||||||
if ($this->User->idClient==1)
|
if ($this->User->idClient == 1) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->checkPerm('edition'))
|
if ($this->checkPerm('edition')) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -577,59 +519,62 @@ class Scores_Ws_Server
|
|||||||
/**
|
/**
|
||||||
* User information
|
* User information
|
||||||
*/
|
*/
|
||||||
$userM = new Application_Model_Sdv1Utilisateurs();
|
try {
|
||||||
$sql = $userM->select()
|
$qb = $this->conn->createQueryBuilder();
|
||||||
->setIntegrityCheck(false)
|
$qb->select(array(
|
||||||
->from(array('u'=>'utilisateurs'), array(
|
|
||||||
'u.login', 'u.id', 'u.email', 'u.password', 'u.idClient', 'u.typeCompte', 'u.actif',
|
'u.login', 'u.id', 'u.email', 'u.password', 'u.idClient', 'u.typeCompte', 'u.actif',
|
||||||
'u.filtre_ip', 'u.profil', 'u.civilite', 'u.nom', 'u.prenom', 'u.tel', 'u.fax',
|
'u.filtre_ip', 'u.profil', 'u.civilite', 'u.nom', 'u.prenom', 'u.tel', 'u.fax',
|
||||||
'u.mobile', 'u.pref', 'u.rechRefType', 'u.profil', 'u.nombreConnexions',
|
'u.mobile', 'u.pref', 'u.rechRefType', 'u.profil', 'u.nombreConnexions',
|
||||||
'u.dateDerniereConnexion', 'u.droits', 'u.referenceParDefaut', 'u.nbReponses', 'u.lang',
|
'u.dateDerniereConnexion', 'u.droits', 'u.referenceParDefaut', 'u.nbReponses', 'u.lang',
|
||||||
'u.formatMail', 'u.dateDebutCompte', 'u.dateFinCompte', 'u.accesWS', 'u.acceptationCGU'))
|
'u.formatMail', 'u.dateDebutCompte', 'u.dateFinCompte', 'u.accesWS', 'u.acceptationCGU',
|
||||||
->join(array('c'=>'clients'), 'u.idClient = c.id', array(
|
|
||||||
'c.droits AS droitsClients', 'c.test AS clientTest', 'c.typeScore', 'c.timeout',
|
'c.droits AS droitsClients', 'c.test AS clientTest', 'c.typeScore', 'c.timeout',
|
||||||
))
|
's.Service AS serviceCode', 'v.version'))
|
||||||
->joinLeft(array('s'=>'sdv1.utilisateurs_service'), 'u.login=s.login', array('Service AS serviceCode'))
|
->from('sdv1.utilisateurs', 'u')
|
||||||
->joinLeft(array('v'=>'sdv1.clients_version'), 'u.idClient=v.clientId', array('version'))
|
->join('u', 'sdv1.clients', 'c', 'u.idClient = c.id')
|
||||||
->where('u.actif=?', 1)
|
->leftJoin('u', 'sdv1.utilisateurs_service', 's', 'u.login=s.login')
|
||||||
->where('u.deleted=?', 0)
|
->leftJoin('u', 'sdv1.clients_version', 'v', 'u.idClient=v.clientId')
|
||||||
->where('c.actif=?','Oui');
|
->where('u.actif = 1')->andWhere('u.deleted = 0')->andWhere("c.actif = 'Oui'");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connexion avec login = email
|
||||||
|
*/
|
||||||
|
if (strstr($login, '@') !== false) {
|
||||||
|
$qb->andWhere('u.email = :email')->setParameter('email', $login);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Connexion standard
|
||||||
|
*/
|
||||||
|
else {
|
||||||
|
$qb->andWhere('u.login = :login')->setParameter('login', $login);
|
||||||
|
}
|
||||||
|
$stmt = $qb->execute();
|
||||||
|
} catch (\Doctrine\DBAL\DBALException $e) {}
|
||||||
|
|
||||||
/**
|
|
||||||
* Connexion avec login = email
|
|
||||||
*/
|
|
||||||
if (strstr($login, '@') !== false) {
|
|
||||||
$sql->where('u.email=?', $login);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Connexion standard
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
$sql->where('u.login=?', $login);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
$resultId = $userM->fetchAll($sql);
|
|
||||||
} catch (Zend_Db_Exception $e) {
|
|
||||||
$c = Zend_Registry::get('config');
|
|
||||||
file_put_contents($c->profil->path->shared.'/log/application.log',
|
|
||||||
date('Y-m-d H:i:s').'- AUTH : '.$e->getMessage()."\n", FILE_APPEND);
|
|
||||||
return '0000';
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* No user, deleted or disable
|
* No user, deleted or disable
|
||||||
*/
|
*/
|
||||||
if ( null === $resultId ) {
|
if ($stmt->rowCount() == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Multiple compte
|
* Multiple compte
|
||||||
*/
|
*/
|
||||||
if ( count($resultId) > 1 ) {
|
if ($stmt->rowCount() > 1) {
|
||||||
return '0906';
|
return '0906';
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $resultId[0];
|
/**
|
||||||
|
* Get Data
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
} catch (\Doctrine\DBAL\DBALException $e) {
|
||||||
|
$c = Zend_Registry::get('config');
|
||||||
|
file_put_contents($c->profil->path->shared.'/log/application.log',
|
||||||
|
date('Y-m-d H:i:s').'- AUTH : '.$e->getMessage()."\n", FILE_APPEND);
|
||||||
|
return '0000';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Date de debut de compte
|
* Date de debut de compte
|
||||||
@ -816,6 +761,9 @@ class Scores_Ws_Server
|
|||||||
$this->User->droits[] = $droits;
|
$this->User->droits[] = $droits;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
//Inclure les droits du service ?
|
||||||
|
}
|
||||||
$this->User->droitsClients = $userInfos->droitsClients;
|
$this->User->droitsClients = $userInfos->droitsClients;
|
||||||
$this->User->timeout = $timeout;
|
$this->User->timeout = $timeout;
|
||||||
$this->User->clientTest = $userInfos->clientTest;
|
$this->User->clientTest = $userInfos->clientTest;
|
||||||
@ -844,11 +792,18 @@ class Scores_Ws_Server
|
|||||||
*/
|
*/
|
||||||
protected function authV2($userInfos, $credential, $ip)
|
protected function authV2($userInfos, $credential, $ip)
|
||||||
{
|
{
|
||||||
$serviceM = new Application_Model_Sdv1ClientsServices();
|
$result = null;
|
||||||
$sql = $serviceM->select()
|
try {
|
||||||
->where('IdClient=?', $userInfos->idClient)
|
$sql = "SELECT * FROM sdv1.clients_services
|
||||||
->where('Code=?', $userInfos->serviceCode);
|
WHERE IdClient = :client AND Code = :service";
|
||||||
$result = $serviceM->fetchRow($sql);
|
$stmt = $this->conn->prepare($sql);
|
||||||
|
$stmt->bindValue('client', $userInfos->idClient);
|
||||||
|
$stmt->bindValue('service', $userInfos->serviceCode);
|
||||||
|
$stmt->execute();
|
||||||
|
if ($stmt->rowCount() > 0) {
|
||||||
|
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||||
|
}
|
||||||
|
} catch (\Doctrine\DBAL\DBALException $e) {}
|
||||||
|
|
||||||
// Aucun service
|
// Aucun service
|
||||||
if ($result === null) {
|
if ($result === null) {
|
||||||
@ -935,7 +890,10 @@ class Scores_Ws_Server
|
|||||||
}
|
}
|
||||||
if ($this->authPassword($userInfos, $credential) === true) {
|
if ($this->authPassword($userInfos, $credential) === true) {
|
||||||
if (count($this->User->droits) > 0) {
|
if (count($this->User->droits) > 0) {
|
||||||
$this->User->droits = $this->getAccessList($userInfos->idClient, $userInfos->serviceCode);
|
$this->User->droits = $this->getAccessList(
|
||||||
|
$userInfos->idClient,
|
||||||
|
$userInfos->serviceCode
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -946,7 +904,10 @@ class Scores_Ws_Server
|
|||||||
}
|
}
|
||||||
if ($this->authPasswordCrypt($userInfos, $credential) === true) {
|
if ($this->authPasswordCrypt($userInfos, $credential) === true) {
|
||||||
if (count($this->User->droits) > 0) {
|
if (count($this->User->droits) > 0) {
|
||||||
$this->User->droits = $this->getAccessList($userInfos->idClient, $userInfos->serviceCode);
|
$this->User->droits = $this->getAccessList(
|
||||||
|
$userInfos->idClient,
|
||||||
|
$userInfos->serviceCode
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -956,7 +917,10 @@ class Scores_Ws_Server
|
|||||||
$ip = substr($credential,7);
|
$ip = substr($credential,7);
|
||||||
if ($this->authIP($ip) === true) {
|
if ($this->authIP($ip) === true) {
|
||||||
if (count($this->User->droits) > 0) {
|
if (count($this->User->droits) > 0) {
|
||||||
$this->User->droits = $this->getAccessList($userInfos->idClient, $userInfos->serviceCode);
|
$this->User->droits = $this->getAccessList(
|
||||||
|
$userInfos->idClient,
|
||||||
|
$userInfos->serviceCode
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1002,7 +966,9 @@ class Scores_Ws_Server
|
|||||||
*/
|
*/
|
||||||
protected function authPasswordCrypt($userInfos, $password)
|
protected function authPasswordCrypt($userInfos, $password)
|
||||||
{
|
{
|
||||||
if ( substr($password, 0, 4) == '$2y$' && strlen($password) == 60 && $password == $userInfos->password ) {
|
if ( substr($password, 0, 4) == '$2y$'
|
||||||
|
&& strlen($password) == 60
|
||||||
|
&& $password == $userInfos->password ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1022,39 +988,46 @@ class Scores_Ws_Server
|
|||||||
{
|
{
|
||||||
//Check IP
|
//Check IP
|
||||||
if (!in_array($ip, $this->listApplicationIp)) {
|
if (!in_array($ip, $this->listApplicationIp)) {
|
||||||
$serviceIPM = new Application_Model_Sdv1ClientsServicesIP();
|
|
||||||
$sql = $serviceIPM->select(true)->columns('IP')
|
try {
|
||||||
->where('IdClient=?', $this->User->idClient)
|
$sql = "SELECT IP FROM sdv1.clients_services_ip
|
||||||
->where('Service=?', $this->User->serviceCode);
|
WHERE IdClient = :client AND Service = :service";
|
||||||
$ipResult = $serviceIPM->fetchAll($sql);
|
$stmt = $this->conn->prepare($sql);
|
||||||
if (count($ipResult) > 0) {
|
$stmt->bindValue('client', $this->User->idClient);
|
||||||
//Validation
|
$stmt->bindValue('service', $this->User->serviceCode);
|
||||||
$overallIpValidate = false;
|
$stmt->execute();
|
||||||
foreach ($ipResult->IP as $filtre) {
|
if ($stmt->rowCount() > 0) {
|
||||||
if (trim($filtre) != '') {
|
$ipResult = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
// Is it a range ?
|
//Validation
|
||||||
if ( strpos($filtre, '-') ) {
|
$overallIpValidate = false;
|
||||||
$validateIp = new Scores_Validate_IpInNetwork();
|
foreach ($ipResult->IP as $filtre) {
|
||||||
$validateIp->setNetworkNotation($filtre);
|
if (trim($filtre) != '') {
|
||||||
$overallIpValidate = $validateIp->isValid($ip);
|
// Is it a range ?
|
||||||
}
|
if ( strpos($filtre, '-') ) {
|
||||||
// Ip only
|
$validateIp = new Scores_Validate_IpInNetwork();
|
||||||
else {
|
$validateIp->setNetworkNotation($filtre);
|
||||||
if ( $filtre === $ip ) {
|
$overallIpValidate = $validateIp->isValid($ip);
|
||||||
$overallIpValidate = true;
|
}
|
||||||
|
// Ip only
|
||||||
|
else {
|
||||||
|
if ( $filtre === $ip ) {
|
||||||
|
$overallIpValidate = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Break foreach
|
||||||
|
if ( $overallIpValidate === true ) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Break foreach
|
|
||||||
if ( $overallIpValidate === true ) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// Exit with error
|
||||||
|
if ( $overallIpValidate === false ) {
|
||||||
|
return '0904';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// Exit with error
|
} catch (\Doctrine\DBAL\DBALException $e) {}
|
||||||
if ( $overallIpValidate === false ) {
|
|
||||||
return '0904';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1069,20 +1042,20 @@ class Scores_Ws_Server
|
|||||||
$authenticate = null;
|
$authenticate = null;
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
$authenticate = 'KO';
|
$authenticate = 'KO';
|
||||||
} else if (is_string($result)) {
|
}
|
||||||
|
elseif (is_string($result)) {
|
||||||
$authenticate = $result;
|
$authenticate = $result;
|
||||||
}
|
}
|
||||||
if ($authenticate !== null) {
|
if ($authenticate !== null) {
|
||||||
$data = array(
|
$data = array(
|
||||||
'login' => $login,
|
'login' => $login,
|
||||||
'authenticate' => $authenticate,
|
'authenticate' => $authenticate,
|
||||||
'ip' => $ip,
|
'ip' => $ip,
|
||||||
'dateInsert' => date('YmdHis'),
|
'dateInsert' => date('YmdHis'),
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
$authLogM = new Application_Model_Sdv1UtilisateursAuthLog();
|
$this->conn->insert('sdv1.utilisateurs_auth_log', $data);
|
||||||
$authLogM->insert($data);
|
} catch (\Doctrine\DBAL\DBALException $e) {}
|
||||||
} catch (Zend_Db_Exception $e) {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1094,21 +1067,21 @@ class Scores_Ws_Server
|
|||||||
*/
|
*/
|
||||||
protected function getAccessList($clientId, $serviceCode)
|
protected function getAccessList($clientId, $serviceCode)
|
||||||
{
|
{
|
||||||
$accesM = new Application_Model_Sdv1ClientsServicesDroits();
|
|
||||||
$sql = $accesM->select(true)->columns(array('Acces'))
|
|
||||||
->where('IdClient=?', $this->User->idClient)
|
|
||||||
->where('Service=?', $this->User->serviceCode);
|
|
||||||
try {
|
|
||||||
$accesResult = $accesM->fetchAll($sql);
|
|
||||||
} catch ( Zend_Db_Exception $e ) {
|
|
||||||
}
|
|
||||||
|
|
||||||
$list = array();
|
$list = array();
|
||||||
if (count($accesResult) > 0 ) {
|
try {
|
||||||
foreach ($accesResult as $row) {
|
$sql = "SELECT Acces FROM sdv1.clients_services_droits
|
||||||
$list[] = $row->Acces;
|
WHERE IdClient = :client AND Service = :service";
|
||||||
|
$stmt = $this->conn->prepare($sql);
|
||||||
|
$stmt->bindValue('client', $this->User->idClient);
|
||||||
|
$stmt->bindValue('service', $this->User->serviceCode);
|
||||||
|
$stmt->execute();
|
||||||
|
if ($stmt->rowCount() > 0) {
|
||||||
|
$accesResult = $stmt->fetchAll(\PDO::FETCH_OBJ);
|
||||||
|
foreach ($accesResult as $row) {
|
||||||
|
$list[] = $row->Acces;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (\Doctrine\DBAL\DBALException $e) {}
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user