diff --git a/.gitignore b/.gitignore index ea59ac28..128c4f4d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /.buildpath /.project /vendor/ +/composer-develop.lock diff --git a/README.md b/README.md new file mode 100644 index 00000000..57ae2a40 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# WebService +## Installation du projet + +1. Création de la configuration du VHOST apache +2. Référencer le domaine virtuel dans le fichier host de la machine + * ex : 192.168.33.10 webservice.sd.dev +3. Executer composer install pour charger les librairies externes dans vendor +4. Configurer l'application (application.ini) + * exemple fourni - `docs/config` ou projet `ansible` + +Voir le fichier `docs/README` pour plus d'éléments + + +## Mode développement pour les librairies externes + +Utiliser la branche `develop` de `scores/library` + +`$ COMPOSER=composer-develop.json composer install` + + + + diff --git a/bin/buildCache.php b/bin/buildCache.php deleted file mode 100644 index 69919335..00000000 --- a/bin/buildCache.php +++ /dev/null @@ -1,391 +0,0 @@ - "Aide.", - 'list' => "List item.", - 'generate|g=s' => "Generate the specify cache.", - )); - $opts->parse(); - $optionsNb = count($opts->getOptions()); -} catch (Zend_Console_Getopt_Exception $e) { - $displayUsage = true; -} - -// --- Aide / Options -if ($optionsNb == 0 || isset($opts->help)) { - $displayUsage = true; -} - -// --- Usage -if ($displayUsage) { - echo "\nGénération Table Static Metier\n\n"; - echo $opts->getUsageMessage(); - exit; -} - -if ( $opts->list ) { - $tabItems = array( - 'Tribunaux' => "Tribunaux", - 'FctDir' => "Fonctions de direction", - 'Evenements' => "Table des evenements bodacc", - 'Devises' => "Table des devises bodacc", - 'RncsTribunaux' => "Table des tribunaux", - 'DevisesInpi' => "Devises Inpi", - 'Jugements' => "Jugements", - 'PaysInpi' => "PaysInpi", - 'CodesNaf' => "Codes Naf", - 'CodesNace' => "Codes Nace", - 'CodesNafa' => "Codes Nafa", - 'CodesFJ' => "Codes Formes Juridiques", - 'AffairesTypes' => "Codes natures des contentieux", - 'ProcolDelete' => "Codes effacement de procol", - ); - echo "\n"; - foreach ( $tabItems as $code => $label ) { - echo "\t" . $code . " => ". $label . PHP_EOL; - } - exit; -} - -/** - * Cache des Tribunaux Bodacc - */ -if( $opts->generate == 'Tribunaux' ) { - - $sql = "SELECT triCode, triNom, LPAD(triCP,5,0) AS triCP, triSiret FROM jo.tribunaux WHERE triCode IS NOT NULL"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/BodaccTribunaux.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - $dep = substr($item->triCP, 0, 2); - if ($dep == 97 || $dep == 98) { - $dep = substr($item->triCP, 0, 3); - } - fwrite($fp, "\t'" . $item->triCode . "' => array("); - fwrite($fp, "'nom'=>\"" . $item->triNom . "\", 'siret'=>\"".$item->triSiret."\", 'dep'=>\"".$dep."\""); - fwrite($fp, "),\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache Fonctions de Direction - */ -if ( $opts->generate == 'FctDir' ) { - - $sql = "SELECT codeFct, libelle FROM jo.bodacc_fonctions"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp=fopen(APPLICATION_PATH . '/../library/Metier/Table/FctDir.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t'" . intval($item->codeFct) . "' => \"". $item->libelle . "\",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache Evenements - */ -if ( $opts->generate == 'Evenements' ) { - - $sql = "SELECT codEven, libEven, Bodacc_Code, Rubrique, version, lienEtab FROM jo.tabEvenements"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/Evenements.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t'" . intval($item->codEven) . "' => array(\n"); - - fwrite($fp, "\t\t'libEven' => \"" . $item->libEven . "\",\n"); - fwrite($fp, "\t\t'Bodacc_Code' => \"" . $item->Bodacc_Code . "\",\n"); - fwrite($fp, "\t\t'Rubrique' => \"" . $item->Rubrique . "\",\n"); - fwrite($fp, "\t\t'Version' => " . $item->version . ",\n"); - fwrite($fp, "\t\t'LienEtab' => " . $item->lienEtab . ",\n"); - - fwrite($fp, "\t),\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache des devises Bodacc - */ -if ( $opts->generate == 'Devises' ) { - - $sql = "SELECT libDeviseBodacc, devIso FROM jo.bodacc_devises"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/Devises.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t\"" . $item->libDeviseBodacc . "\" => \"" . $item->devIso ."\",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache Tribunaux RNCS - */ -if ( $opts->generate == 'RncsTribunaux' ) { - - $sql = "SELECT triNumGreffe, triNom, triId, triCode FROM jo.tribunaux WHERE triNumGreffe IS NOT NULL"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/RncsTribunaux.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t" . intval($item->triNumGreffe) . " => array("); - fwrite($fp, "'Id'=>\"" . intval($item->triId) . "\", 'Nom'=>\"".$item->triNom."\", 'Code'=>\"".$item->triCode."\""); - fwrite($fp, "),\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache Devises Inpi - */ -if ( $opts->generate == 'DevisesInpi' ) { - - $sql = "SELECT devInpi, devIso FROM jo.tabDevises WHERE devInpi>0 ORDER BY devInpi ASC"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/DevisesInpi.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t" . intval($item->devInpi) . " => \"" . $item->devIso . "\",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache Jugements - */ -if ( $opts->generate == 'Jugements' ) { - - $sql = "SELECT codJugement, codEven FROM jo.tabJugeRncs"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/Jugements.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t" . intval($item->codJugement) . " => " . $item->codEven . ",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache PaysInpi - */ -if ( $opts->generate == 'PaysInpi' ) { - - $sql = "SELECT codePaysInpi, codPays FROM jo.tabPays WHERE codePaysInpi>0 ORDER BY codePaysInpi ASC"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/PaysInpi.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t" . intval($item->codePaysInpi) . " => \"" . $item->codPays . "\",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache CodesNaf - */ -if ( $opts->generate == 'CodesNaf' ) { - - $sql = "SELECT codNaf700 AS naf, libNaf700 AS LibNaf FROM jo.tabNaf4"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/CodesNaf.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t'" . $item->naf . "' => \"" . $item->LibNaf . "\",\n"); - } - } - - $sql = "SELECT codNaf5 AS naf, libNaf5 AS LibNaf FROM jo.tabNaf5"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - if ($stmt->rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t'" . $item->naf . "' => \"" . $item->LibNaf. "\",\n"); - } - } - - fwrite($fp, ");\n"); -} - -/** - * Cache CodesNace - */ -if ( $opts->generate == 'CodesNace' ) { - - $sql = "SELECT codNaf5 AS naf, libNaf5 AS LibNaf, codNaf1 FROM jo.tabNaf5"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/CodesNace.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t'" . $item->naf . "' => \"" . $item->codNaf1 . preg_replace('/^0/','',substr($item->naf,0,4)) . "\",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache CodesNafa - */ -if ( $opts->generate == 'CodesNafa' ) { - - $sql = "SELECT codNafa AS nafa, libNafa FROM jo.tabNafa"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/CodesNafa.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t'" . $item->nafa . "' => \"" . $item->libNafa ."\",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache CodesFJ - */ -if ( $opts->generate == 'CodesFJ' ) { - - $sql = "SELECT code AS FJ, libelle AS libFJ FROM jo.tabFJur WHERE code>=1000"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/CodesFJ.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t" . $item->FJ . " => \"" . str_replace('"','\"',$item->libFJ) ."\",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Cache AffairesTypes - * Code Nature des contentieux - */ -if ( $opts->generate == 'AffairesTypes' ) { - - $sql = "SELECT code, label FROM jo.greffes_affaires_nature"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Table/AffairesTypes.php','w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t'" . $item->code . "' => \"" . $item->label ."\",\n"); - } - } - fwrite($fp, ");\n"); -} - -/** - * Procol Delete - */ -if ( $opts->generate == 'ProcolDelete' ) { - - $sql = "SELECT codEven, affProcol, libEven FROM jo.tabEvenements WHERE affProcol>0"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - - $fp = fopen(APPLICATION_PATH . '/../library/Metier/Defaillance/ProcolDelete.php', 'w'); - fwrite($fp, "rowCount() > 0) { - foreach($result as $item) { - fwrite($fp, "\t" . $item->codEven . " => " . $item->affProcol .", //".$item->libEven." \n"); - } - } - fwrite($fp, ");\n"); -} - - diff --git a/bin/buildCodeRatios.php b/bin/buildCodeRatios.php deleted file mode 100644 index 38121107..00000000 --- a/bin/buildCodeRatios.php +++ /dev/null @@ -1,1070 +0,0 @@ - "Aide.", - 'ratios' => "Génére la class des ratios (classMRatios.php)", - 'type-s' => "Choix du type d'indiScore : score ou valo", - 'formules-s' => "Génére le code Formules{type}{versions}.php", - 'comments-s' => "Génére le cache des Comments{type}{versions}.php", - 'niveau=s' => "Niveau de commentaire", - 'tabcache' => "Tab in cache", - )); - $opts->parse(); - $optionsNb = count($opts->getOptions()); -} catch (Zend_Console_Getopt_Exception $e) { - $displayUsage = true; -} - -// --- Aide / Options -if ($optionsNb == 0 || isset($opts->help)) { - $displayUsage = true; -} - -// --- Usage -if ($displayUsage) { - echo "\nRatios et Formules\n\n"; - echo $opts->getUsageMessage(); - exit; -} - -// Fichier MRatios -if (isset($opts->ratios)) { - - $configFile = APPLICATION_PATH.'/../library/Metier/Scores/MRatios.php'; - - $fp = fopen($configFile, 'w'); - fwrite($fp, ''R[801]', - 'R01b'=>'Rh[801]', - 'R01c'=>'Rs[801]', - 'R02a'=>'R[802]', - 'R02b'=>'Rh[802]', - 'R02c'=>'Rs[802]', - 'R02d'=>'Rq[802]', - 'R02e'=>'Rt[802]', - 'R03a'=>'R[803]', - 'R03b'=>'Rh[803]', - 'R03c'=>'Rs[803]', - 'R03d'=>'Rq[803]', - 'R03e'=>'Rt[803]', - 'R04a'=>'R[804]', - 'R04b'=>'Rh[804]', - 'R04c'=>'Rs[804]', - 'R04d'=>'Rq[804]', - 'R04e'=>'Rt[804]', - 'R05a'=>'R[805]', - 'R05b'=>'Rh[805]', - 'R05c'=>'Rs[805]', - 'R06a'=>'R[806]', - 'R06b'=>'Rh[806]', - 'R06c'=>'Rs[806]', - 'R06d'=>'Rq[806]', - 'R06e'=>'Rt[806]', - 'R07a'=>'R[807]', - 'R07b'=>'Rh[807]', - 'R07c'=>'Rs[807]', - 'R07d'=>'Rq[807]', - 'R07e'=>'Rt[807]', - 'R08a'=>'R[808]', - 'R08b'=>'Rh[808]', - 'R08c'=>'Rs[808]', - 'R08d'=>'Rq[808]', - 'R08e'=>'Rt[808]', - 'R09a'=>'R[809]', - 'R09b'=>'Rh[809]', - 'R09c'=>'Rs[809]', - 'R09d'=>'Rq[809]', - 'R09e'=>'Rt[809]', - 'R10a'=>'R[810]', - 'R10b'=>'Rh[810]', - 'R10c'=>'Rs[810]', - 'R10d'=>'Rq[810]', - 'R10e'=>'Rt[810]', - 'R11a'=>'R[811]', - 'R11b'=>'Rh[811]', - 'R11c'=>'Rs[811]', - 'R12a'=>'R[812]', - 'R12b'=>'Rh[812]', - 'R12c'=>'Rs[812]', - 'R13a'=>'R[813]', - 'R13b'=>'Rh[813]', - 'R13c'=>'Rs[813]', - 'R13d'=>'Rq[813]', - 'R13e'=>'Rt[813]', - 'R14a'=>'R[814]', - 'R14b'=>'Rh[814]', - 'R14c'=>'Rs[814]', - 'R14d'=>'Rq[814]', - 'R14e'=>'Rt[814]', - 'R15a'=>'R[815]', - 'R15b'=>'Rh[815]', - 'R15c'=>'Rs[815]', - 'R15d'=>'Rq[815]', - 'R15e'=>'Rt[815]', - 'R16a'=>'R[816]', - 'R16b'=>'Rh[816]', - 'R16c'=>'Rs[816]', - 'R16d'=>'Rq[816]', - 'R16e'=>'Rt[816]', - 'R17a'=>'R[817]', - 'R17b'=>'Rh[817]', - 'R17c'=>'Rs[817]', - 'R18a'=>'R[818]', - 'R18b'=>'Rh[818]', - 'R18c'=>'Rs[818]', - 'R18d'=>'Rq[818]', - 'R18e'=>'Rt[818]', - 'R19a'=>'R[819]', - 'R19b'=>'Rh[819]', - 'R19c'=>'Rs[819]', - 'R19d'=>'Rq[819]', - 'R19e'=>'Rt[819]', - 'R20a'=>'R[820]', - 'R20b'=>'Rh[820]', - 'R20c'=>'Rs[820]', - 'R20d'=>'Rq[820]', - 'R20e'=>'Rt[820]', - 'R21a'=>'R[821]', - 'R21b'=>'Rh[821]', - 'R21c'=>'Rs[821]', - 'R21d'=>'Rq[821]', - 'R21e'=>'Rt[821]', - 'R22a'=>'R[822]', - 'R22b'=>'Rh[822]', - 'R22c'=>'Rs[822]', - 'R23a'=>'R[823]', - 'R23b'=>'Rh[823]', - 'R23c'=>'Rs[823]', - 'R24a'=>'R[824]', - 'R24b'=>'Rh[824]', - 'R24c'=>'Rs[824]', - 'R25a'=>'R[825]', - 'R25b'=>'Rh[825]', - 'R25c'=>'Rs[825]', - 'R26a'=>'R[826]', - 'R26b'=>'Rh[826]', - 'R26c'=>'Rs[826]', - 'R26d'=>'Rq[826]', - 'R26e'=>'Rt[826]', - 'R27a'=>'R[827]', - 'R27b'=>'Rh[827]', - 'R27c'=>'Rs[827]', - 'R27d'=>'Rq[827]', - 'R27e'=>'Rt[827]', - 'R28a'=>'R[828]', - 'R28b'=>'Rh[828]', - 'R28c'=>'Rs[828]', - 'R28d'=>'Rq[828]', - 'R28e'=>'Rt[828]', - 'R29a'=>'R[829]', - 'R29b'=>'Rh[829]', - 'R29c'=>'Rs[829]', - 'R29d'=>'Rq[829]', - 'R29e'=>'Rt[829]', - 'R30a'=>'R[830]', - 'R30b'=>'Rh[830]', - 'R30c'=>'Rs[830]', - 'R30d'=>'Rq[830]', - 'R30e'=>'Rt[830]', - 'R31a'=>'R[843]', - 'R31b'=>'Rh[843]', - 'R31c'=>'Rs[843]', - 'R31d'=>'Rq[843]', - 'R31e'=>'Rt[843]', - 'R32a'=>'R[831]', - 'R32b'=>'Rh[831]', - 'R32c'=>'Rs[831]', - 'R33a'=>'R[832]', - 'R33b'=>'Rh[832]', - 'R33c'=>'Rs[832]', - 'R33d'=>'R[845]', - 'R33e'=>'Rh[845]', - 'R33f'=>'Rs[845]', - 'R34a'=>'R[833]', - 'R34b'=>'Rh[833]', - 'R34c'=>'Rs[833]', - 'R34d'=>'R[846]', - 'R34e'=>'Rh[846]', - 'R34f'=>'Rs[846]', - 'R35a'=>'R[834]', - 'R35b'=>'Rh[834]', - 'R35c'=>'Rs[834]', - 'R35d'=>'R[847]', - 'R35e'=>'Rh[847]', - 'R35f'=>'Rs[847]', - 'R36a'=>'R[835]', - 'R36b'=>'Rh[835]', - 'R36c'=>'Rs[835]', - 'R36d'=>'R[849]', - 'R36e'=>'Rh[849]', - 'R36f'=>'Rs[849]', - 'R37a'=>'R[844]', - 'R37b'=>'Rh[844]', - 'R37c'=>'Rs[844]', - 'R37d'=>'R[848]', - 'R37e'=>'Rh[848]', - 'R37f'=>'Rs[848]', - 'R38a'=>'R[836]', - 'R38b'=>'Rh[836]', - 'R38c'=>'Rs[836]', - 'R38d'=>'Rq[836]', - 'R38e'=>'Rt[836]', - 'R39a'=>'R[837]', - 'R39b'=>'Rh[837]', - 'R39c'=>'Rs[837]', - 'R39d'=>'Rq[837]', - 'R39e'=>'Rt[837]', - 'R40a'=>'R[838]', - 'R40b'=>'Rh[838]', - 'R40c'=>'Rs[838]', - 'R40d'=>'Rq[838]', - 'R40e'=>'Rt[838]', - 'R41a'=>'R[842]', - 'R41b'=>'Rh[842]', - 'R41c'=>'Rs[842]', - 'R41d'=>'Rq[842]', - 'R41e'=>'Rt[842]', - 'R42a'=>'R[839]', - 'R42b'=>'Rh[839]', - 'R42c'=>'Rs[839]', - 'R42d'=>'Rq[839]', - 'R42e'=>'Rt[839]', - 'R43a'=>'R[840]', - 'R43b'=>'Rh[840]', - 'R43c'=>'Rs[840]', - 'R43d'=>'Rq[840]', - 'R43e'=>'Rt[840]', - 'R44a'=>'R[841]', - 'R44b'=>'Rh[841]', - 'R44c'=>'Rs[841]', - ); - - public function __construct() - { - } - - /** - * Conversion des zones pour les collectivités - * @param unknown \$codeR - * @param unknown \$zonesDB - * @return array - */ - public function convertZones(\$codeR, \$zonesDB) - { - foreach(\$this->tabZones2Ratios as \$oldR=>\$newR) { - if (preg_match('/(\D+)\[(\d+)\]/Uis', \$newR, \$matches) && \$matches[1]==\$codeR) { - \$iRatio=\$matches[2]; - if (\$codeR=='R') - \$ret[\$iRatio]=\$zonesDB[\$oldR]*1000; - else - \$ret[\$iRatio]=\$zonesDB[\$oldR]; - } - } - return \$ret; - } - - /** - * Donne le taux d'inflation pour une année donnée - * @param unknown \$annee - * @return unknown - */ - public function getInflation(\$annee) - { - \$tabInfla = include __DIR__ . '/Data/Infla.php'; - if ( isset(\$tabInfla[\$annee]) ) { - return \$tabInfla[\$annee]; - } - } - - /** - * Donne le taux de rendement des actions pour une année donnée - * @param unknown \$annee - * @return unknown - */ - public function getTxRendement(\$annee) - { - \$tabTxRendObli = include __DIR__ . '/Data/RendObli.php'; - if ( isset(\$tabTxRendObli[\$annee]) ) { - return \$tabTxRendObli[\$annee]; - } - } - - /** - * Taux de tva - * @param string \$date AAAAMM - * @return double - */ - public function getTxTva(\$date) - { - \$tabTxTva = include __DIR__ . '/Data/Tva.php'; - foreach (\$tabTxTva as \$ym => \$v) { - if (\$ym > \$date) { - break; - } - \$tva = \$v; - } - return \$tva; - } - - /** - * Définit la tranche d'effectif - * @param int \$value - */ - public function setTrancheEffectif(\$value) - { - \$this->efftr = \$value; - } - - /** - * Calcul les ratios - * @param array \$bilans - * Format des bilans à envoyer - * - * Les bilans doivent être envoyés trier - * @return array - */ - public function calcul(\$bilans) - { - \$numBil = 0; - foreach (\$bilans as \$k => \$p) { - - \$millesime = \$p['DATE_CLOTURE']; - \$tva = \$this->getTxTva(substr(\$millesime,0,6)); - - // --- Calcul - " . "\n"); - - fwrite($fp, "\t\t\t" . "\$nm=\$p['DUREE_MOIS'];" ."\n"); - fwrite($fp, "\t\t\t" . "\$nmp=\$p['DUREE_MOIS_PRE'];" ."\n"); - fwrite($fp, "\t\t\t" . "\$R=array();" ."\n"); - - $stmt = $conn->executeQuery("SELECT id, libelle, formule, unite, commentaires, borneMin, - borneMax, calcul, deleted FROM jo.ratios_formules WHERE deleted=0"); - - $tabMoy = array(); - while ($formule = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $id = intval($formule['id']); - $libelle = $formule['libelle']; - $unite = $formule['unite']; - - /** Ratios avec formules à calculer **/ - if ($formule['calcul']) { - $formuleStr = $formule['formule']; - - if (preg_match("/^MOY\(R\[(.*)\],(.*)\)/Ui", $formuleStr, $matches)) { - $tabMoy[$id]=array( - 'ratio'=>$matches[1]*1, - 'nbExo'=>$matches[2]*1, - ); - continue; - } - - // Gestion des variables minuscules de 1 à 8 caractères alphanumériques - $formule1 = preg_replace('/(tva|efftr|nm)/','\$this->$1', $formuleStr); - $formule1 = preg_replace('/([a-z]{1,8})/','\$$1', $formuleStr); - // Gestion des postes du BILAN AX, BX, YP, FL1, etc... - $formule1 = preg_replace('/\b([A-Z]{2,2}[1-9]{0,1})\b/','\$p[\'$1\']', $formule1); - - // Gestion des ratios précédent - $formule1 = preg_replace_callback('/\bR\[(.*)\]/U', function($match) { - return '$R['.intval($match[1]).']'; - }, $formule1); - - // Gestion des valeurs Absolues - $formule1 = preg_replace('/\|(.*)\|/U', 'abs($1)', $formule1); - // Gestion de l'inflation pour l'année du bilan - $formule1 = preg_replace('/\INFLATION/U', '$this->getInflation(substr($millesime,4))', $formule1); - - // Ecriture de la formule - $formule1 = "\$R[$id]=".$formule1.';'; - - /** fonction ou **/ - if (preg_match('/ \$ou (.*)/', $formule1, $matches)) { - $formule1 = preg_replace('/ \$ou (.*)/',';', $formule1); - $alternative = $matches[1]; - $formule1.= "\t" . "if (\$R[$id]==0) { \$R[$id] = $alternative }"; - } - - /** Bornage des résultats en cas de dépassement **/ - if (preg_match('/;BORN\((.*)\)/U', $formule1, $matches)) { - $formule1 = preg_replace('/(;BORN\(.*\))/U','', $formule1); - $tabBornes = explode(':', $matches[1]); - if (trim($tabBornes[0])<>'') { - $bMin = trim($tabBornes[0])*1; - $formule1.= "\t" . "if (\$R[$id]<$bMin) { \$R[$id] = $bMin; }"; - } - if (isset($tabBornes[1]) && trim(@$tabBornes[1])<>'') { - $bMax =trim($tabBornes[1])*1; - $formule1.= "\t" . "if (\$R[$id]>$bMax) { \$R[$id] = $bMax; }"; - } - } - - /** Bornage des résultats en cas de dépassement **/ - if (preg_match('/;LIM\((.*)\)/U', $formule1, $matches)) { - $formule1 = preg_replace('/(;LIM\(.*\))/U','', $formule1); - $bMax = trim($matches[1])*1; - $formule1.= "\t" . "if (\$R[$id]>$bMax) { \$R[$id] = $bMax; }"; - } - $formule2 = $formule1; - - fwrite($fp, "\t\t\t" . $formule2 . "\n"); - fwrite($fp, "\t\t\t" . "if (!isset(\$R[".$id."])) { \$R[".$id."] = 'NS'; }" . "\n\n"); - } - } - - fwrite($fp, "\n"); - fwrite($fp, "\t\t\t" . '$tabRatios[$numBil]=$R;'."\n"); - fwrite($fp, "\t\t\t" . '$numBil++;'."\n"); - fwrite($fp, "\t\t" . "}" ."\n\n"); - - foreach($tabMoy as $iRatio=>$tMoy) { - $irMoy=$tMoy['ratio']; - $nbExo=$tMoy['nbExo']; - fwrite($fp, "\t\t" . "for(\$i=0; \$i<\$numBil; \$i++) {" . "\n"); - fwrite($fp, "\t\t\t" . "\$tabRatios[\$i][".$iRatio."]=(\$tabRatios[\$i][".$irMoy."]"); - for($i=1; $i<$nbExo; $i++) { - fwrite($fp, '+$tabRatios[$i+'.$i.']['.$irMoy.']'); - } - fwrite($fp, ")/".$nbExo.";" . "\n"); - fwrite($fp, "\t\t" . "}" . "\n\n"); - } - - fwrite($fp, "\t\t" . "return \$tabRatios;" . "\n"); - fwrite($fp, "\t" . "}" . "\n"); - fwrite($fp, "}" . "\n"); - fclose ($fp); - - $strOutput=exec('php -l '.$configFile, $output); - if (preg_match('/^No syntax errors detected in /', $strOutput)) { - } else { - print_r($output); - return false; - } - return true; -} - -// --- Formules -if (isset($opts->formules)) { - - if ( isset($opts->type) && in_array($opts->type, array('score', 'valo')) ) { - $type = $opts->type; - } else { - $type = 'score'; - } - - $cycle = 2; - $version = $opts->formules; - - // Select the right table in database in function of type - switch ($type) { - case 'score': - $file = APPLICATION_PATH.'/../library/Metier/Scores/Formule/Score_'.$version.'.php'; - $tableFormu = 'jo.scores_formules_'.$version; - $tableComment = 'jo.scores_commentaires_'.$version; - break; - - case 'valo': - $file = APPLICATION_PATH.'/../library/Metier/Scores/Formule/Valo_'.$version.'.php'; - $tableFormu = 'jo.valo_formules_'.$version; - $tableComment = 'jo.valo_commentaires_'.$version; - break; - } - - // Read comments - $stmt = $conn->executeQuery("SELECT code, langue, cycle, ligne, commentaire, tri, deleted - FROM $tableComment - WHERE deleted=0 AND cycle=$cycle AND ligne NOT LIKE '%*%' AND commentaire NOT LIKE '.*%' - ORDER BY langue ASC, cycle ASC, code ASC, ligne ASC"); - $tabCommentaires = $tabTri = $tabTriAff = array(); - while ($commentaire = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $id = $commentaire['code']*1; - $ligne = $commentaire['ligne']*1; - $tabCommentaires[$id][$ligne] = str_replace('"','\"',$commentaire['commentaire']); - if ($commentaire['tri']) { - //$tabTri[$id] = $commentaire['tri']; - $tabTriAff[$id] = ($commentaire['tri'].'.'.(10000000+(1*$commentaire['code'])))*1; - } - } - - // Read formulas - $stmt = $conn->executeQuery("SELECT code, ligne, remarque, operande, ope1, operation, valeur - FROM $tableFormu - WHERE deleted=0 AND code>1 AND ligne NOT LIKE '%*%' ORDER BY code ASC, ligne ASC"); - $idPre = $strFormule = false; - $debugFormule = ''; - $fp = fopen($file,'w'); - fwrite($fp,'fetch(\PDO::FETCH_ASSOC)) { - $id = $formule['code']*1; - if ($idPre != $id && $idPre != false) { - $debugFormule.= $strFormule.') { $C['.$idPre."]=true; $strAction } \t"; - $strFormule = preg_replace('/\|([A-Z0-9\. \$\[\]]{1,12})\|/Ui', 'abs($1)', $strFormule); - $strFormule = preg_replace('/\$R\[0+/', '$R[', $strFormule); - $strFormule = preg_replace('/\$Ra\[0+/', '$Ra[', $strFormule); - $strFormule = preg_replace('/\$Rap\[0+/', '$Rap[', $strFormule); - $strFormule = preg_replace('/\$Rp\[0+/', '$Rp[', $strFormule); - $strFormule = preg_replace('/\$Rs\[0+/', '$Rs[', $strFormule); - $strFormule = preg_replace('/\$Rsp\[0+/', '$Rsp[', $strFormule); - $strFormule = preg_replace('/\$Revol\[0+/', '$Revol[', $strFormule); - $strFormule = preg_replace('/\$Revolp\[0+/', '$Revolp[', $strFormule); - $strFormule = preg_replace('/\$Revols\[0+/', '$Revols[', $strFormule); - $strFormule = preg_replace('/\$Rdiff\[0+/', '$Rdiff[', $strFormule); - for ($j=2; $j<5; $j++) { - $strFormule = preg_replace('/\$Rp'.$j.'\[0+/', '$Rp'.$j.'[', $strFormule); - $strFormule = preg_replace('/\$Rs'.$j.'\[0+/', '$Rs'.$j.'[', $strFormule); - $strFormule = preg_replace('/\$Rsp'.$j.'\[0+/', '$Rsp'.$j.'[', $strFormule); - $strFormule = preg_replace('/\$Revol'.$j.'\[0+/', '$Revol'.$j.'[', $strFormule); - $strFormule = preg_replace('/\$Revolp'.$j.'\[0+/', '$Revolp'.$j.'[', $strFormule); - } - $strAction = preg_replace('/\|([A-Z0-9\. \$\[\]]{1,12})\|/Ui', 'abs($1)', $strAction); - $strAction = preg_replace('/\$R\[0+/', '$R[', $strAction); - $strAction = preg_replace('/\$Ra\[0+/', '$Ra[', $strAction); - $strAction = preg_replace('/\$Rap\[0+/', '$Rap[', $strAction); - $strAction = preg_replace('/\$Rp\[0+/', '$Rp[', $strAction); - $strAction = preg_replace('/\$Rs\[0+/', '$Rs[', $strAction); - $strAction = preg_replace('/\$Rsp\[0+/', '$Rsp[', $strAction); - $strAction = preg_replace('/\$Revol\[0+/', '$Revol[', $strAction); - $strAction = preg_replace('/\$Revolp\[0+/', '$Revolp[', $strAction); - $strAction = preg_replace('/\$Rdiff\[0+/', '$Rdiff[', $strAction); - - fwrite($fp, $remarque."\n"); - // Remplace "$" par "$this->" - fwrite($fp, str_replace('$', '$this->', $strFormule.') { $C['.$idPre."]=true; $strAction } ")."\n"); - - eval( $strFormule.') { $C['.$idPre."]=true; $strAction } " ); - $debugFormule.= '$C['.$idPre.']='.$C[$idPre]."\r\n"; - $remarque = "// $id-".$formule['ligne'].' : '.$formule['remarque']; - $strAction = ''; - } elseif (!$idPre) { - $remarque = "// $id-".$formule['ligne']; - } else { - $remarque.= ' '.strtr($formule['remarque'],array("\r"=>' ',"\n"=>' ')); - } - $ligne = $formule['ligne']*1; - - $operande = trim(strtr(strtoupper($formule['operande']),array(':'=>''))); - $ope1 = trim($formule['ope1']); - - // PROJECTAUX PROJECCOEF PROJEC - if (preg_match("/(PROJECTAUX|PROJECCOEF|PROJEC)\((.*)\)/Ui", $ope1, $matches)) { - $ope1 = $matches[1].'($'.preg_replace('/R\[0+/', 'regR[', str_replace('+', '', $matches[2])).')'; - } - // Gestion du mot clef LONG - elseif (preg_match('/^LONG\(([A-Z0-9\_]{1,30})\)$/i', $ope1, $matches)) { - $ope1 = preg_replace('/^LONG\(([A-Z0-9\_]{1,30})\)$/i','strlen(\$$1)', $ope1); - } - // Gestion du substr - else { - $ope1 = preg_replace('/([A-Z0-9\_]{1,30})\((.*)\)$/i','substr(\$$1,$2)', $ope1); - } - - $operation = trim($formule['operation']); - if ($operation=='=') $operation='=='; - - $valeur = trim(strtr($formule['valeur'], array('"'=>"'"))); - - if (preg_match("/^MOY\(R(.*),(.*)\)/Ui", $valeur, $matches)) { - $valeur = '( (R'.$matches[1]; - for($iMoy=0; $iMoy<$matches[2]; $iMoy++) { - if ($iMoy == 1) { - $valeur.= '+Rp'.$matches[1]; - } else { - $valeur.= '+Rp'.$iMoy.$matches[1]; - } - } - $valeur.= ')/'.$matches[2].')'; - } - else { - $valeur = preg_replace('/([A-Z\_]{1,30})\((.*)\)$/i','substr(\$$1,$2)', $valeur); - } - - if ( !empty($valeur) && substr($valeur,0,1) != "'" && !preg_match('/\(.*;.*\)/', $valeur) - && substr($valeur,0,6) != 'substr' && !in_array($valeur, array('vrai', 'faux')) ) { - //file_put_contents('test.log', $valeur, FILE_APPEND); - //$valeur = preg_replace('/([A-Z][A-Za-z0-9\_]{1,29}|[A-Za-z0-9]{1,30}\[[0-9]+\])/', '\$$1' , $valeur); - $valeur = preg_replace('/([A-Z][A-Za-z0-9\_]{0,29}|[A-Za-z0-9]{1,30}\[[0-9]+\])/', '\$$1' , $valeur); - //file_put_contents('test.log', " = ".$valeur."\n", FILE_APPEND); - } - - if (preg_match("/^substr|^projec|^strlen|^\||^'/i", $ope1)) { - $ope1deb = ''; - $ope1 = strtr($ope1, array( - '|R[' => '|$R[', - '|Rp[' => '|$Rp[', - '|Rp2[' => '|$Rp2[', - '|Rp3[' => '|$Rp3[', - '|Rs[' => '|$Rs[', - '|Rsp[' => '|$Rsp[', - '|Revol[' => '|$Revol[', - '|Revolp[' => '|$Revolp[', - '|Revols[' => '|$Revols[', - '|Rdiff[' => '|$Rdiff[', - )); - } - else { - $ope1deb = '$'; - $ope1 = strtr($ope1, array( - '/R[' => '/$R[', - '/Rp[' => '/$Rp[', - '/Rp2[' => '/$Rp2[', - '/Rp3[' => '/$Rp3[', - '/Rs[' => '/$Rs[', - '/Rsp[' => '/$Rsp[', - '/Revol[' => '/$Revol[', - '/Revolp[' => '/$Revolp[', - '/Revols[' => '/$Revols[', - '/Rdiff[' => '/$Rdiff[', - )); - } - - //(C[5000100]àC[5000998]) - if (preg_match('/^C\[(.*)\]àC\[(.*)\]$/', $ope1, $matches)) { - // On veut savoir si des commentaires Cxx à Cyy sont chargés - $tabTmp4 = array(); - foreach ($tabTri as $idxC=>$t) { - if ($idxC>=$matches[1] && $idxC<=$matches[2]) - $tabTmp4[]=' isset($C['.$idxC.']) '; - } - $tmpFormule='true'; - if (count($tabTmp4)>0) - $tmpFormule=' ('.implode(' || ', $tabTmp4).') '; - } elseif (preg_match_all('/^\((C\[(.*)\];?)+\)$/', $ope1, $matches)) { - $tabTmp5=explode(';', $matches[1][0]);// C[3255000];C[3260000];C[3265000] - $tabTmp4=array(); - foreach ($tabTmp5 as $t) - $tabTmp4[]=' isset($'.$t.') '; - $tmpFormule='true'; - if (count($tabTmp4)>0 && preg_match('/NON/i',$operande)) - $tmpFormule=' ('.implode(' && ', $tabTmp4).') '; - elseif (count($tabTmp4)>0) - $tmpFormule=' ('.implode(' || ', $tabTmp4).') '; - } elseif (($operation=='==' || $operation=='<>') && preg_match('/\(.*;.*\)/', $valeur)) { - /** Gestion du point-virgule (correspond à un IN dans WHERE sql **/ - $tabTmp3=explode(';', $valeur); - $tabTmp4=array(); - foreach ($tabTmp3 as $i3=>$svaleur) - $tabTmp4[]=$ope1deb.$ope1.$operation.strtr($svaleur,array('('=>'', ')'=>'', ','=>'.')); - if ($operation=='==') $tmpFormule=' ('.implode(' || ', $tabTmp4).') '; - else $tmpFormule=implode(' && ', $tabTmp4); - } elseif ($operande=='ET' && preg_match('/\(.*;.*\)/', $ope1)) { - /** Gestion du point-virgule (correspond à un IN dans WHERE sql **/ - $tabTmp3=explode(';', $ope1); - $tabTmp4=array(); - foreach ($tabTmp3 as $i3=>$ope1val) - $tabTmp4[]=$ope1deb.strtr($ope1val,array('('=>'', ')'=>'', ','=>'.')); - $tmpFormule=' ('.implode(' && ', $tabTmp4).') '; - } elseif (preg_match('/(.*)à(.*)/', $valeur, $matches)) { - /** Gestion du 'à' (correspond à min < xxx < max **/ - $tmpFormule=' ('.$ope1deb.$ope1.' >= '.$matches[1].' && '.$ope1deb.$ope1.' <= '.$matches[2].') '; - } else { - if (!preg_match("/^substr/", $valeur)) { - $valeur = strtr($valeur,array(','=>'.')); - } - if ($operation=='' && $valeur=='') { - $tmpFormule=$ope1deb.$ope1; - } elseif ($operation<>'' && $valeur=='') { - $tmpFormule=$ope1deb.$ope1.$operation."''"; - } elseif (strtoupper($valeur)==strtolower($valeur) && $valeur<>'') { - $tmpFormule=$ope1deb.$ope1.$operation.$valeur; - } elseif (strtolower($valeur)=='vrai') { - $tmpFormule=$ope1deb.$ope1.$operation.'true'; - } elseif (strtolower($valeur)=='faux') { - $tmpFormule=$ope1deb.$ope1.$operation.'false'; - } elseif (strtolower($valeur)=='nmp') { - $tmpFormule=$ope1deb.$ope1.$operation.'$nmp'; - } else { - $tmpFormule=$ope1deb.$ope1.$operation.$valeur; - } - } - - $strParentDeb=$strParentFin=''; - if (preg_match_all('/(\()/',$operande,$matches)) { - $strParentDeb=implode(' ', $matches[1]); - $operande=trim(strtr($operande,array('('=>''))); - } elseif (preg_match_all('/(\))/',$operande,$matches)) { - $strParentFin=implode(' ', $matches[1]); - $operande=trim(strtr($operande,array(')'=>''))); - } - - switch ($operande) { - case 'SI': $strFormule= "if ( $strParentDeb $tmpFormule $strParentFin"; break; - case 'SI NON': $strFormule= "if ( $strParentDeb !($tmpFormule) $strParentFin"; break; - case 'ET': $strFormule.= " && $strParentDeb $tmpFormule $strParentFin"; break; - case 'ET NON': $strFormule.= " && $strParentDeb !($tmpFormule) $strParentFin"; break; - case 'OU': $strFormule.= " || $strParentDeb $tmpFormule $strParentFin"; break; - case 'OU NON': $strFormule.= " || $strParentDeb !($tmpFormule) $strParentFin"; break; - case 'ACTION': $strAction.= str_replace('==','=', " $tmpFormule; "); break; - case 'ECHANGE': $ECHANGE[] = $tmpFormule; break; - default: - echo 'Indiscore '.$id.' OPERANDE INCONNUE '.$operande."\n"; - break; - } - $idPre = $id; - //echo $strFormule."\n"; - } - - // --- Gestion de la dernière ligne de commentaire - $debugFormule.= $strFormule.') ) $C['.$idPre.']=true;'."\t"; - $strFormule = preg_replace('/\|([A-Z0-9\. \$\[\]]{1,12})\|/Ui', 'abs($1)', $strFormule); - $strFormule = preg_replace('/\$R\[0+/', '$R[', $strFormule); - $strFormule = preg_replace('/\$Ra\[0+/', '$Ra[', $strFormule); - $strFormule = preg_replace('/\$Rap\[0+/', '$Rap[', $strFormule); - $strFormule = preg_replace('/\$Rp\[0+/', '$Rp[', $strFormule); - $strFormule = preg_replace('/\$Rs\[0+/', '$Rs[', $strFormule); - $strFormule = preg_replace('/\$Rsp\[0+/', '$Rsp[', $strFormule); - $strFormule = preg_replace('/\$Revol\[0+/', '$Revol[', $strFormule); - $strFormule = preg_replace('/\$Revolp\[0+/', '$Revolp[', $strFormule); - $strFormule = preg_replace('/\$Revols\[0+/', '$Revols[', $strFormule); - $strFormule = preg_replace('/\$Rdiff\[0+/', '$Rdiff[', $strFormule); - for ($j=2;$j<5;$j++) { - $strFormule = preg_replace('/\$Rp'.$j.'\[0+/', '$Rp'.$j.'[', $strFormule); - $strFormule = preg_replace('/\$Rs'.$j.'\[0+/', '$Rs'.$j.'[', $strFormule); - $strFormule = preg_replace('/\$Rsp'.$j.'\[0+/', '$Rsp'.$j.'[', $strFormule); - $strFormule = preg_replace('/\$Revol'.$j.'\[0+/', '$Revol'.$j.'[', $strFormule); - $strFormule = preg_replace('/\$Revolp'.$j.'\[0+/', '$Revolp'.$j.'[', $strFormule); - } - $strAction = preg_replace('/\|([A-Z0-9\. \$\[\]]{1,12})\|/Ui', 'abs($1)', $strAction); - $strAction = preg_replace('/\$R\[0+/', '$R[', $strAction); - $strAction = preg_replace('/\$Ra\[0+/', '$Ra[', $strAction); - $strAction = preg_replace('/\$Rap\[0+/', '$Rap[', $strAction); - $strAction = preg_replace('/\$Rp\[0+/', '$Rp[', $strAction); - $strAction = preg_replace('/\$Rs\[0+/', '$Rs[', $strAction); - $strAction = preg_replace('/\$Rsp\[0+/', '$Rsp[', $strAction); - $strAction = preg_replace('/\$Revol\[0+/', '$Revol[', $strAction); - $strAction = preg_replace('/\$Revolp\[0+/', '$Revolp[', $strAction); - $strAction = preg_replace('/\$Rdiff\[0+/', '$Rdiff[', $strAction); - - eval ($strFormule.') $C['.$idPre.']=true;'); - - // Remplace "$" par "$this->" - fwrite($fp, str_replace('$', '$this->', $strFormule.') $C['.$idPre.']=true;')."\n"); - fwrite($fp, str_replace('$', '$this->', $strFormule.') $C['.$idPre.']=true;')."\n"); - fwrite($fp, "\n".'$ECHANGE=\''.serialize($ECHANGE)."';"."\n"); - fwrite($fp, "\n".'?>'."\n"); - fclose($fp); - $debugFormule.='$C['.$idPre.']='.$C[$idPre]."\r\n"; - - $strOutput=exec('php -l '.$file, $output); - if (preg_match('/^No syntax errors detected in /', $strOutput)) { - echo "Aucune erreur\n"; - } else { - echo "Erreur : $strOutput\n"; - print_r($output); - } -} - -// --- Commentaires -if ( isset($opts->comments) ) { - if ( isset($opts->type) && in_array($opts->type, array('score', 'valo')) ) { - $type = $opts->type; - } else { - $type = 'score'; - } - - $cycle = 2; - if (isset($opts->niveau)) { - $cycle = $opts->niveau; - } - $version = $opts->comments; - - // Select the right table in database in function of type - switch ($type) { - case 'score': - $tableComment = 'jo.scores_commentaires_'.$version; - break; - case 'valo': - $tableComment = 'jo.valo_commentaires_'.$version; - break; - } - $path = APPLICATION_PATH.'/../library/Metier/Scores/Comment'; - - // Read comments text - $stmt = $conn->executeQuery("SELECT code, langue, cycle, ligne, commentaire, tri, deleted - FROM $tableComment - WHERE deleted=0 AND cycle=$cycle AND ligne NOT LIKE '%*%' AND commentaire NOT LIKE '.*%' - ORDER BY langue ASC, cycle ASC, code ASC, ligne ASC"); - $tabCommentaires = $tabTri = $tabTriAff = array(); - while ($commentaire = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $id = $commentaire['code']*1; - $ligne = $commentaire['ligne']*1; - $tabCommentaires[$id][$ligne] = str_replace('"','\"',$commentaire['commentaire']); - if ($commentaire['tri']) { - //$tabTri[$id] = $commentaire['tri']; - $tabTriAff[$id] = ($commentaire['tri'].'.'.(10000000+(1*$commentaire['code'])))*1; - } - } - - // Table Tri Aff - $fp = fopen($path.'/'.ucfirst($type).'Tri'.$version.'N'.$cycle.'.php', 'w'); - fwrite($fp, ' $idVal) { - fwrite($fp, "\t" . $id." => ".$idVal."," . "\n"); - } - fwrite($fp, ");" . "\n"); - fclose($fp); - - // Table commentaires - $fp = fopen($path.'/'.ucfirst($type).'Txt'.$version.'N'.$cycle.'.php', 'w'); - fwrite($fp, ' $idVal) { - fwrite($fp, "\t" . $id." => array(" . "\n"); - foreach ($idVal as $ligne => $ligneVal) { - fwrite($fp, "\t\t" . $ligne." => \"".$ligneVal."\"," . "\n"); - } - fwrite($fp, "\t" . ")," . "\n"); - } - fwrite($fp, ");" . "\n"); - fclose($fp); - - echo "Code généré. \n"; -} - -// --- Gestion des éléments de cache -if ( $opts->tabcache) { - - $pathCache = APPLICATION_PATH . '/../library/Metier/Scores/Data'; - - // Variables - $fp = fopen($pathCache . '/Variables.php','w'); - fwrite($fp, "executeQuery("SELECT code, codeType, libelleCase, libelle, article FROM insee.insee_tabAutres WHERE zone='TU'"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'TU' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"".str_replace('$', $item->libelle, $item->article)."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - /** REGIMP - RPEN */ - $stmt = $conn->executeQuery("SELECT REGION AS code, 'int' AS type, NCCENR AS libelle FROM insee.regions"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'REGIMP' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". $item->libelle ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - fwrite($fp, "\t'RPEN' => array(\n"); - $stmt->closeCursor(); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". $item->libelle ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - /** ZEMET */ - $stmt = $conn->executeQuery("SELECT codZEMET AS code, libZEMET AS libelle, article FROM insee.insee_tabZemet WHERE anneeZemet='1994'"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'ZEMET1994' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - if( in_array(strtoupper(substr($item->libelle,0,1)),array('A','E','I','O','U')) ) { - $prefix = "d'"; - } else { - $prefix = "de "; - } - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". $prefix . $item->libelle."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - $stmt = $conn->executeQuery("SELECT codZEMET AS code, libZEMET AS libelle, article FROM insee.insee_tabZemet WHERE anneeZemet='2010'"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'ZEMET2010' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - if( in_array(strtoupper(substr($item->libelle,0,1)),array('A','E','I','O','U')) ) { - $prefix = "d'"; - } else { - $prefix = "de "; - } - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". $prefix . $item->libelle."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - - /** DEPSIE */ - $stmt = $conn->executeQuery("SELECT numdep AS code, libdep AS libelle FROM insee.departements"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'DEPSIE' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". $item->libelle ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - /** LIEUACT */ - $stmt = $conn->executeQuery("SELECT code, codeType, libelleCase, libelle, article FROM insee.insee_tabAutres WHERE zone='LIEUACT'"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'LIEUACT' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". preg_replace('/\$1?/', $item->libelle, $item->article) ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - /** ACTISURF */ - $stmt = $conn->executeQuery("SELECT code, codeType, libelleCase, libelle, article FROM insee.insee_tabAutres WHERE zone='ACTISURF'"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'ACTISURF' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". str_replace('$', $item->libelle, $item->article) ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - /** ACTIVNAT */ - $stmt = $conn->executeQuery("SELECT code, codeType, libelleCase, libelle, article FROM insee.insee_tabAutres WHERE zone='ACTIVNAT'"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'ACTIVNAT' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". str_replace('$', $item->libelle, $item->article) ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - /** FJUR - FJURINSEE - FJURRNCS*/ - $stmt = $conn->executeQuery("SELECT code, libelle FROM jo.tabFJur"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'FJUR' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . str_replace('"','\"',$item->libelle) . "\", 'art'=>\"". str_replace('"','\"',$item->libelle) ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - fwrite($fp, "\t'FJURINSEE' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . str_replace('"','\"',$item->libelle) . "\", 'art'=>\"". str_replace('"','\"',$item->libelle) ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - fwrite($fp, "\t'FJURRNCS' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . str_replace('"','\"',$item->libelle) . "\", 'art'=>\"". str_replace('"','\"',$item->libelle) ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - /** APEENT - APEINSEE - APERNCS */ - $stmt = $conn->executeQuery("SELECT codNaf700 AS code, libNaf700 AS libelle FROM jo.tabNaf4 UNION SELECT codNaf5 AS code, libNaf5 AS libelle FROM jo.tabNaf5"); - if ($stmt->rowCount() > 0 ) { - fwrite($fp, "\t'APEENT' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". $item->libelle ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - fwrite($fp, "\t'APEINSEE' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". $item->libelle ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - fwrite($fp, "\t'APERNCS' => array(\n"); - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t\t'".$item->code."' => array("); - fwrite($fp, "'lib'=>\"" . $item->libelle . "\", 'art'=>\"". $item->libelle ."\""); - fwrite($fp, "),\n"); - } - fwrite($fp, "\t),\n"); - } - - fwrite($fp, ");\n"); - fclose($fp); - - /** Taux d'inflation **/ - $fp = fopen($pathCache . '/Infla.php','w'); - fwrite($fp, "executeQuery("SELECT annee, infla FROM sdv1.inflation WHERE annee>1990 ORDER BY annee"); - if ($stmt->rowCount() > 0 ) { - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t" . $item->annee . " => " . $item->infla . ",\n"); - } - } - - fwrite($fp, ");\n"); - fclose($fp); - - /** Taux de rendement des actions **/ - $fp = fopen($pathCache . '/RendObli.php','w'); - fwrite($fp, "executeQuery("SELECT annee, txMoinsInfla FROM sdv1.txRendObli WHERE annee>1990 ORDER BY annee ASC"); - if ($stmt->rowCount() > 0 ) { - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t" . $item->annee . " => " . $item->txMoinsInfla . ",\n"); - } - } - fwrite($fp, ");\n"); - fclose($fp); - - /** Formules **/ - $fp = fopen($pathCache . '/Formules.php','w'); - fwrite($fp, "executeQuery("SELECT id, libelle, formule, unite, commentaires, borneMin, borneMax, calcul, deleted FROM jo.ratios_formules WHERE deleted=0"); - if ($stmt->rowCount() > 0 ) { - $i = 0; - while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) { - fwrite($fp, "\t".$i." => array(\n"); - fwrite($fp, "\t\t'id' => ".intval($item->id).",\n"); - fwrite($fp, "\t\t'libelle' => \"".trim(str_replace('"','\"',$item->libelle))."\",\n"); - fwrite($fp, "\t\t'commentaires' => \"".trim(str_replace('"','\"',$item->commentaires))."\",\n"); - fwrite($fp, "\t\t'unite' => '".$item->unite."',\n"); - fwrite($fp, "\t\t'borneMin' => '".$item->borneMin."',\n"); - fwrite($fp, "\t\t'borneMax' => '".$item->borneMax."',\n"); - fwrite($fp, "\t\t'formule' => '".$item->formule."',\n"); - fwrite($fp, "\t),\n"); - - $i++; - } - } - - fwrite($fp, ");\n"); - fclose($fp); -} diff --git a/bin/buildCodeSfr.php b/bin/buildCodeSfr.php deleted file mode 100644 index cd16d087..00000000 --- a/bin/buildCodeSfr.php +++ /dev/null @@ -1,47 +0,0 @@ - "Aide.", - 'compile-s' => "Génére le cache des règles, sans paramètres (tout), avec paramètres (VORD, VORP, PO)", - 'version=s' => "Version des régles", - )); - $opts->parse(); - $optionsNb = count($opts->getOptions()); -} catch (Zend_Console_Getopt_Exception $e) { - $displayUsage = true; -} - -// --- Aide / Options -if ($optionsNb == 0 || isset($opts->help)) { - $displayUsage = true; -} - -// --- Usage -if ($displayUsage) { - echo "\nRegles SFR\n\n"; - echo $opts->getUsageMessage(); - exit; -} - -$types = array('VORD', 'VORP', 'PO'); - -if ( $opts->compile!='' && in_array($opts->compile, $types) ) { - $types = array($opts->compile); -} - -if ( count($types) > 0 ) { - - foreach ( $types as $type ) { - $ruleSfrM = new Metier_Sfr_Compile($conn); - $ruleSfrM->setVersion($opts->version); - $ruleSfrM->construct($type); - } - -} - - - diff --git a/bin/buildLog.php b/bin/buildLog.php deleted file mode 100644 index 32bba05b..00000000 --- a/bin/buildLog.php +++ /dev/null @@ -1,57 +0,0 @@ - "Aide.", - 'log' => "", - )); - $opts->parse(); - $optionsNb = count($opts->getOptions()); -} catch (Zend_Console_Getopt_Exception $e) { - $displayUsage = true; -} - -// --- Aide / Options -if ($optionsNb == 0 || isset($opts->help)) { - $displayUsage = true; -} - -// --- Usage -if ($displayUsage) { - echo "\nLog\n\n"; - echo $opts->getUsageMessage(); - exit; -} - -if ($opts->log) { - $sql = "SELECT * FROM sdv1.logs_item"; - $stmt = $conn->prepare($sql); - $stmt->execute(); - - $outPath = APPLICATION_PATH . '/../library/Scores/Account/Log/List.php'; - $outFile = $outPath . '/Config.php'; - if ($stmt->rowCount() > 0) { - $result = $stmt->fetchAll(\PDO::FETCH_OBJ); - file_put_contents($outFile, "Code . "' => array(,\n", FILE_APPEND); - file_put_contents($outFile, "\t\t'Label' => ". $c->Label . ",\n", FILE_APPEND); - file_put_contents($outFile, "\t\'Description' => ". $c->Description . ",\n", FILE_APPEND); - file_put_contents($outFile, "\t\t'Category' => ". $c->Category . ",\n", FILE_APPEND); - file_put_contents($outFile, "\t),\n", FILE_APPEND); - } - file_put_contents($outFile, ");\n", FILE_APPEND); - } -} - - - - - - - diff --git a/bin/loadCodeRatios.php b/bin/loadCodeRatios.php deleted file mode 100644 index 0c09032c..00000000 --- a/bin/loadCodeRatios.php +++ /dev/null @@ -1,632 +0,0 @@ - "Aide.", - 'fichier=s' => "Nom du fichier complet : version ", - 'affiche=s' => "Affiche resultat traitement " - )); - $opts->parse(); - $optionsNb = count($opts->getOptions()); -} -catch (Zend_Console_Getopt_Exception $e) -{ - $displayUsage = true; -} - -// --- Aide / Options -if ($optionsNb == 0 || isset($opts->help)) { - $displayUsage = true; -} - -// --- Usage -if ($displayUsage) { - echo "Charge les commentaires ratios à partir de CSV."; - echo "\n\n"; - echo $opts->getUsageMessage(); - echo "\n"; - exit; -} - - - ######################################################### - ##### Presence te taille du fichier ##### - ######################################################### - - $fichier = $opts->fichier; // $fichier contient chemin/qqchose.csv - $nomfichier = basename($fichier); // $nomfichier contient qqchose.csv, basename retourne un array donc un tableau ayant comme valeur chacun des - - // fichiers (chemain absolu) contenu dans le repertoir $directory, ici le repertoir contient normalement une seul fichier a la fois , donc $fichier[] - $fic = $fichier ; // On definti notre variable $fic comme etant notre fichier. - - ######################################################### - ##### Teste de validité du nom du fichier ##### - ######################################################### - - $detect1 = strstr($nomfichier, 'valo_commentaires_'); - $detect2 = strstr($nomfichier, 'valo_formules_'); - $detect3 = strstr($nomfichier, 'scores_formules_'); - $detect4 = strstr($nomfichier, 'scores_commentaires_'); - - - if ($detect1 !== false or $detect2 !== false or $detect3 !== false or $detect4 !== false) - { - echo "\n"." Nom du fichier ok"."\n" ; - } - else - { - echo "\n" . "le nom du fichier est incorrect" . "\n"; - echo "\n" . "le nom du fichier doit obliqatoirement etre compose de la sorte :" . "\n"; - echo "\n" . 'valo_commentaires_' . "\n"; - echo "\n" ."ou"."\n"; - echo "\n" . 'valo_formules_' . "\n"; - echo "\n" ."ou"."\n"; - echo "\n" . 'scores_formules_' . "\n"; - echo "\n" ."ou"."\n"; - echo "\n" . 'scores_commentaires_' . "\n"; - - Exit; - } - - - ######################################################### - ##### On indique si le fichier est present ou non ##### - ######################################################### - - if ((file_exists($fichier))) - { - echo "\n Fichier $nomfichier au format csv trouve a l'emplacement prevu : \n"; - echo "\n"." La taille du fichier est de :".filesize($fic)." octets"."\n"; - $file = true; - } - else - { - echo "\n". "Pas de fichier .csv present a l'endroit indique"."\n"; - $file = false; - exit; - } - - ######################################################### - ##### taille du contenu du fichier ##### - ######################################################### - - # déclaration variables : - - $fileopen = fopen($fic, 'r'); - $contenufichier = fgetcsv($fileopen); - $nblignes=0; - $cnbl = count($nblignes); - $fific = file($fic); // retourner le contenu du fichier dans une chaîne de caractères. - - - foreach ($fific as $line_num => $line) - { - $nblignes++; - } - echo "\n"." le fichier contient " . $nblignes . " lignes."."\n" ; - - - ######################################################### - ##### Routage vers commentaires ou formules ##### - ######################################################### - - #variables : - - $doublon = 0; // On initialise la variable doublon. - $row = 0 ; // On initialise les lignes. - $verif = array() ; // creation d'un tableau - $nom_fic = basename($fic) ; - $col3= 0; - - ######################################################### - ##### Identification du type de fichier ##### - ######################################################### - - //On commance rechercher si le nom du fichier contient "COMMENTAIRE" pour 4 colonnes sinon 2 colonnes - if (strstr($nom_fic, 'commentaires')) - { - $nbcol_cle = 4; - } - else - { - $nbcol_cle = 2; - } - - // Si $fic est bien ouvert on commence le traitement. - if ($file = true ) - { - $fileopen2 = fopen($fic, "r+"); - - if($fileopen2) - { - $contenufichier=fgetcsv($fileopen2); - $nblignes = file($fic); - - // Tant qu'il y a des lignes, lis les et fait en un tableau. - while (($data = fgetcsv($fileopen2,0,';','"')) !== FALSE) - { - $num = count($row); //compte nombre de partits dans la phrase - $row++; - - // On fait une concatenation des colonnes de $fic dans un nouveau tableau nomme $cle. - // Cela nous permettera de dedoublonner par la suite. - - if ($nbcol_cle == 4) // si nbcol = 4 alors notre clé sera composée de 4 colonnes sinon 3 - { - $cle = $data[0].$data[1].$data[2].$data[3]; - } - else - { - $cle = $data[0].$data[1].$data[2]; - } - - ######################################################### - ##### Dédoublonnage ##### - ######################################################### - - // On regarde si on retrouve les valeurs de $verif dans $cle - if (in_array($cle, $verif, TRUE)) - { - $doublon = $doublon + 1; // On définit un compteur qui nous indiquera le nombre de doublons - echo "\n"."Attention vous avez $doublon doublon(s) dans votre fichier !\n"; - echo "\n"."il semblerait qu'il soit present a la ligne $row contenant $cle "."\n"; - } - else - { - // Ajout de la cle au tableau indexe numeriquement - $verif[] = $cle ; - } - ######################################################### - ##### Routage commentaires ou formules ##### - ##### et verification des champs ##### - ######################################################### - if (strstr ($nom_fic , 'commentaires'))// le nom du fichier contient 'commentaires' alors ... - { - // On teste les champs vide - if (strlen($data[0])== 0 or strlen($data[1]) == 0 - or strlen($data[2]) == 0 or strlen($data[3]) == 0) - { - echo "\n"."Erreur ! Vous avez des champs vides commentaires , sur la ligne $num"."\n"."contenant $data[1].$data[2].$data[3].$data[4].$data[5].$data[6].$data[7]"; - } - - if ($data[0] == 0) - { - echo "\n"."erreur code commentaire ". $data[0] ." null"."\n"; - exit; - } - - if($data[2] < 0) - { - echo "\n"."erreur code ligne " . $data[2] . "null"."\n"; - exit; - } - } - elseif (strstr ($nom_fic , 'formules')) - { - if (strlen($data[0]) == 0 or strlen($data[1]) == 0 ) - { - echo "\n"." Erreur vous avez des champs vides formules , sur la ligne $row"."\n"."contenant $data[0].$data[1]. . "; - exit; - } - - if ($data[0] == 0) - { - echo "\n"."erreur code commentaire " . $data[0] . " null"."\n"; - exit; - } - - if($data[1] < 0) - { - echo "\n"."erreur code code ligne". $data[1] ."null"."\n"; - exit; - } - } - } - } - } - if ($doublon >= 1) - { - $ok = false; - echo "\n"." $doublon Doublons détectés dans le fichier."."\n"; - // Quitte avec un code d'erreur: doublon détecté. - exit(1); - - } - elseif ($doublon == 0 && !file_exists($fic)) - { - $ok = false; - exit; - } - else - { - - // le script appelant continue. - $ok = true; // petit marqueur de fonctionnement du script jusqu'a présent - echo "\n Le fichier ne comporte pas de doublon. \n"; - } - - fclose($fileopen); - - - echo "\n Bon, maintenant on va passer a la base de donnee \n"; - - ######################################################### - ##### ________ ____ ____ ##### - ### | __ \ | \ | \ ### - # | / | |\ \ | |\ \ # - ### | __ \ | |/ / | |/ / ### - ##### |_______/ |___/ |___/ ##### - ######################################################### - - // si notre scripte est bon on passe a la suite - $c = new Zend_Config($application->getOptions()); - try { - $db = Zend_Db::factory($c->profil->db->metier); - $db->getConnection(); - // print_r (get_class_methods($db)); - } - catch (Zend_Exception $e) - { - echo $e->getMessage(); - } - -if ($db->isConnected()) - { - echo "\n***********************************************\n"; - echo "\n Connection a la BDD ok \n"; - echo "\n***********************************************\n"; - } -else - { - echo "\n***********************************************\n"; - echo "\n !!!! Erreur / ! Pas connecte a la BDD !!!! \n"; - echo "\n***********************************************\n"; - } - - $pathCache = APPLICATION_PATH . '/../library/Metier/Scores/Variables'; - $copy_fic = $nomfichier; - - if($nomfichier) // Si le nom du fichier comprend 'scores' ou 'valo'... - { - // On découpe la chaine de caractère à chaque "/" et on fait un array. - $token = basename($copy_fic); - - // On prend ce qui se trouve avant le point - $token1 = strtok($token, "."); - - // On effece '_utf8' et '.csv' - $nomtabletemp =(str_replace('_utf8', '', $token)); - $nomtable =(str_replace('.csv','', $nomtabletemp)); - - // Affichage du nom de la table - echo "\n Le nom de la table est : $nomtable . \n"; - } - - #################################################### - ##### // Création de la Table Ccmmentaires \\ ##### - #################################################### - - if (strstr($nomtable,"commentaires")) - { - - try - { - // Création d'une table "TEXTE" - $sql_ctc_query = $db->query("CREATE TABLE $nomtable - ( - code int(8) NOT NULL, - langue char(2) NOT NULL, - cycle smallint(3) NOT NULL, - ligne char(4) NOT NULL, - commentaire longtext, - tri varchar(5) DEFAULT NULL, - deleted varchar(2) DEFAULT NULL, - idUser varchar(0) DEFAULT NULL, - dateInsert varchar(15) DEFAULT NULL, - dateUpdate varchar(0) DEFAULT NULL, - PRIMARY KEY (code,langue,cycle,ligne) - ) - ENGINE = MyISAM DEFAULT CHARSET=latin1 COMMENT= 'Commentaires Valorisation - Liste des commentaires';"); - } - catch (Zend_Exception $e) - { - echo $e->getMessage()."\n"; - echo "\n"."!!!!! ERREUR ! / CHARGEMENT ARRETE !!!!!"."\n"."\n"; - - } - echo "\n" . " Table $nomtable cree." ."\n"; - } - - // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - $fileopen2 = fopen($fic, "r+"); - $nbr=0; - - if($fileopen2) - { - $contenufichier=fgetcsv($fileopen2); - $nblignes = file($fic); - $vide = ""; - $null = null; - $zero = 0; - } - else - { - exit; - echo "\n"."Erreur a l'ouverture du fichier"."\n"; - } - - if(strstr($nomtable,"commentaires")) - { - // Tant qu'il y a des lignes, lis les et fait en un tableau. - while (($data = fgetcsv($fileopen2,0,';','"')) !== FALSE) - { - - #################################################### - ##### encodage et remplacement du contenu ##### - #################################################### - - $data[4] = str_replace(chr(93), "]", $data[4]); // crochet fermant - $data[4] = str_replace(chr(92), "\\" , $data[4]); // anti slash - $data[4] = str_replace(chr(128), '€', $data[4]); // devise euros - $data[4] = str_replace(chr(130), ',', $data[4]); // baseline single quote - $data[4] = str_replace(chr(132), '"', $data[4]); // baseline double quote - $data[4] = str_replace(chr(133), '...', $data[4]); // ellipsis - $data[4] = str_replace(chr(145), "'", $data[4]); // left single quote - $data[4] = str_replace(chr(146), "'", $data[4]); // right single quote - $data[4] = str_replace(chr(147), '"', $data[4]); // left double quote - $data[4] = str_replace(chr(148), '"', $data[4]); // right double quote - $data[4] = str_replace(chr(150), '–', $data[4]); // tiret du 6 - - - $data[5] = str_replace(chr(93), "]", $data[5]); // crochet fermant - $data[5] = str_replace(chr(92), "\\" , $data[5]); // anti slash - $data[5] = str_replace(chr(128), '€', $data[5]); // devise euros - $data[5] = str_replace(chr(130), ',', $data[5]); // baseline single quote - $data[5] = str_replace(chr(132), '"', $data[5]); // baseline double quote - $data[5] = str_replace(chr(133), '...', $data[5]); // ellipsis - $data[5] = str_replace(chr(145), "'", $data[5]); // left single quote - $data[5] = str_replace(chr(146), "'", $data[5]); // right single quote - $data[5] = str_replace(chr(147), '"', $data[5]); // left double quote - $data[5] = str_replace(chr(148), '"', $data[5]); // right double quote - $data[5] = str_replace(chr(150), '–', $data[5]); // tiret du 6 - - $encode = mb_detect_encoding($data[4]); // detection de l'encodage. - $encode = mb_detect_encoding($data[5]); // detection de l'encodage. - $data[4] = mb_convert_encoding($data[4], $encode, 'UTF-8'); - $data[5] = mb_convert_encoding($data[5], $encode, 'UTF-8'); - - // $Zdata4 = '"'.$db->->real_escape_string($data[4]); - // $Zdata4 = $db->quote($data[4]); - - //$Zdata4 = mysqli_real_escape_string($db, $data[4]); - - if ($data[5] == null) - { - $data[5] = 0; - } - - $zdata4= $db->quote($data[4]); - $nbr++; - - // ESSAI 1 - $sql_insert = array - ( - 'code' => "$data[0]", - 'langue' => "$data[1]", - 'cycle' => "$data[2]", - 'ligne' => "$data[3]", - 'commentaire' => "$data[4]", - 'tri' => "$data[5]", - 'deleted' => "$null", - 'idUser' => "$null", - 'dateInsert' => "$null", - 'dateUpdate' => "$null" - ); - - try - { - # $num = count($row); // On compte nombre de parti dans la phrase - # $row++; // à chaques tour de boucle j'ajoute 1 à $row - - - // ESSAI 2 - /* - $sql_itc = $db->query("INSERT INTO $nomtable - ( - code, langue, cycle, ligne, commentaire, tri, deleted, idUser, dateInsert, dateUpdate) - VALUES - ( - ".$data[0].",".$data[1].",".$data[2].",".$data[3].",".$Zdata4.",".$data[5].",'','','',) - "); - */ - - $db->insert($nomtable, $sql_insert); - - //` - // Astuce !! La structure de $data[0] étant un int on retire les " - // Astuce !! La colonne 5 contenant des apostrophs étant interprété par le sql comme un nouveau champ il est necessaire de protéger ce champs, du coup in ajoute la fonction mysql_real_escape_string() pour insérer un antislash devant les caractères " NULL, \x00, \n, \r, \, ', " et \x1a. " - } - - // Renseignement sur les erreurs possibles - #echo ("$sql_itt"); - catch(Zend_Exception $e) - { - echo "\n" . $e->getMessage()."\n"; - - //echo "\n"."!!!!!!!!!!!!!!!!!!!!! Import de la table $nomtable echouee. !!!!!!!!!!!!!!!!!!!!!"."\n"."\n"; - //$sql_erase = $db->query("DROP TABLE $nomtable;"); - //echo "La table $nomtable a ete effacee !! \n "; - } - } - - echo "\n"."Import de la table $nomtable . ok". "\n"; - - // comptage sql - $comptage = count($sql_itc_query); - echo "\n"."Nombre de lignes importees : "."$nbr"."\n"; - - exit; - } - - - - elseif(strstr($nomtable,"formules")) - { - #################################################### - // Création de la Table formules \\ - #################################################### - try{ - $sql_ctf_query = $db->query("CREATE TABLE $nomtable - ( - code int(8) NOT NULL DEFAULT '0', - ligne char(4) NOT NULL DEFAULT '', - remarque varchar(120) DEFAULT NULL, - operande varchar(7) DEFAULT NULL, - ope1 varchar(255) DEFAULT NULL, - operation varchar(9) DEFAULT NULL, - valeur varchar(255) DEFAULT NULL, - tri varchar(0) DEFAULT NULL, - deleted varchar(0) DEFAULT NULL, - idUser varchar(0) DEFAULT NULL, - dateInsert varchar(0) DEFAULT NULL, - dateUpdate varchar(0) DEFAULT NULL, - PRIMARY KEY (code,ligne) - ) - ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Criteres Valorisation - Formules de calculs' ;"); - - } - catch (Zend_Exception $e) - { - echo $e->getMessage()."\n"; - echo "\n"."!!!!!!!!!!!!!!!!!!!!! CHARGEMENT ARRETE !!!!!!!!!!!!!!!!!!!!!"."\n"."\n"; - } - echo "\n Table $nomtable cree.\n"; - - - // Tant qu'il y a des lignes, lis les et fait en un tableau. - while (($data = fgetcsv($fileopen2,0,';','"')) !== FALSE) - { - - - #################################################### - ##### encodage et remplacement du contenu ##### - #################################################### - - $data[2] = str_replace(chr(93), "]", $data[2]); // crochet fermant - $data[2] = str_replace(chr(92), "\\" , $data[2]); // anti slash - $data[2] = str_replace(chr(128), '€', $data[2]); // devise euros - $data[2] = str_replace(chr(130), ',', $data[2]); // baseline single quote - $data[2] = str_replace(chr(132), '"', $data[2]); // baseline double quote - $data[2] = str_replace(chr(133), '...', $data[2]); // ellipsis - $data[2] = str_replace(chr(145), "'", $data[2]); // left single quote - $data[2] = str_replace(chr(146), "'", $data[2]); // right single quote - $data[2] = str_replace(chr(147), '"', $data[2]); // left double quote - $data[2] = str_replace(chr(148), '"', $data[2]); // right double quote - $data[2] = str_replace(chr(150), '–', $data[2]); // tiret du 6 - - - $data[4] = str_replace(chr(93), "]", $data[4]); // crochet fermant - $data[4] = str_replace(chr(92), "\\" , $data[4]); // anti slash - $data[4] = str_replace(chr(128), '€', $data[4]); // devise euros - $data[4] = str_replace(chr(130), ',', $data[4]); // baseline single quote - $data[4] = str_replace(chr(132), '"', $data[4]); // baseline double quote - $data[4] = str_replace(chr(133), '...', $data[4]); // ellipsis - $data[4] = str_replace(chr(145), "'", $data[4]); // left single quote - $data[4] = str_replace(chr(146), "'", $data[4]); // right single quote - $data[4] = str_replace(chr(147), '"', $data[4]); // left double quote - $data[4] = str_replace(chr(148), '"', $data[4]); // right double quote - $data[4] = str_replace(chr(150), '–', $data[4]); // tiret du 6 - - - $data[5] = str_replace(chr(93), "]", $data[5]); // crochet fermant - $data[5] = str_replace(chr(92), "\\" , $data[5]); // anti slash - $data[5] = str_replace(chr(128), '€', $data[5]); // devise euros - $data[5] = str_replace(chr(130), ',', $data[5]); // baseline single quote - $data[5] = str_replace(chr(132), '"', $data[5]); // baseline double quote - $data[5] = str_replace(chr(133), '...', $data[5]); // ellipsis - $data[5] = str_replace(chr(145), "'", $data[5]); // left single quote - $data[5] = str_replace(chr(146), "'", $data[5]); // right single quote - $data[5] = str_replace(chr(147), '"', $data[5]); // left double quote - $data[5] = str_replace(chr(148), '"', $data[5]); // right double quote - $data[5] = str_replace(chr(150), '–', $data[5]); // tiret du 6 - - $data[6] = str_replace(chr(93), "]", $data[6]); // crochet fermant - $data[6] = str_replace(chr(92), "\\" , $data[6]); // anti slash - $data[6] = str_replace(chr(128), '€', $data[6]); // devise euros - $data[6] = str_replace(chr(130), ',', $data[6]); // baseline single quote - $data[6] = str_replace(chr(132), '"', $data[6]); // baseline double quote - $data[6] = str_replace(chr(133), '...', $data[6]); // ellipsis - $data[6] = str_replace(chr(145), "'", $data[6]); // left single quote - $data[6] = str_replace(chr(146), "'", $data[6]); // right single quote - $data[6] = str_replace(chr(147), '"', $data[6]); // left double quote - $data[6] = str_replace(chr(148), '"', $data[6]); // right double quote - $data[6] = str_replace(chr(150), '–', $data[6]); // tiret du 6 - - $encode = mb_detect_encoding($data[2]); // detection de l'encodage. - $encode = mb_detect_encoding($data[5]); // detection de l'encodage. - $encode = mb_detect_encoding($data[4]); // detection de l'encodage. - $encode = mb_detect_encoding($data[6]); // detection de l'encodage. - - $data[2] = mb_convert_encoding($data[2], $encode, 'UTF-8'); - $data[4] = mb_convert_encoding($data[4], $encode, 'UTF-8'); - $data[5] = mb_convert_encoding($data[5], $encode, 'UTF-8'); - $data[6] = mb_convert_encoding($data[6], $encode, 'UTF-8'); - - -$sql_insert = array( - 'code' => "$data[0]", - 'ligne' => "$data[1]", - 'remarque' => "$data[2]", - 'operande' => "$data[3]", - 'ope1' => "$data[4]", - 'operation' => "$data[5]", - 'valeur' => "$data[6]", - 'tri' => "$null", - 'deleted' => "$null", - 'idUser' => "$null", - 'dateInsert' => "$null", - 'dateUpdate' => "$null" - ); - $nbr++; - try{ - $db->insert($nomtable, $sql_insert); - } - catch (Zend_Exception $e) - { - echo $e->getMessage()."\n"; - echo "\n"."!!!!! ERREUR ! / CHARGEMENT ARRETE !!!!!"."\n"."\n"; - } - } - - echo "\n"." Import de la table $nomtable ok."."\n"; - - // comptage sql - $comptage = count($sql_insert); - echo "\n"." Nombre de lignes importees : "."$nbr"."\n"; - fclose($fileopen2); - exit; - } - - - // Exécution de la requête - //$result = $db->query($sql_ctt); - // Renseignement sur les erreurs possibles - - - - - -// echo "" . $Erreur . "

\n"; -// -// if ($sql_ctt_query) // si code retour OK -// { -// echo "Création de la table $nomtable ok.
"; -// } -// else -// { -// echo "Création de la table $nomtable échouée.
"; -// } \ No newline at end of file diff --git a/composer-develop.json b/composer-develop.json new file mode 100644 index 00000000..acf72690 --- /dev/null +++ b/composer-develop.json @@ -0,0 +1,33 @@ +{ + "name": "scores/webservice", + "description": "Webservice API", + "require": { + "zendframework/zendframework1": "^1.12", + "geshi/geshi": "dev-master", + "league/csv": "^8.1", + "doctrine/dbal": "^2.5", + "mikehaertl/phpwkhtmltopdf": "^2.2", + "guzzlehttp/guzzle": "^6.2", + "monolog/monolog": "^1.22", + "scores/library": "dev-develop" + }, + "repositories": [ + { + "type": "git", + "url": "git@gitlab.factory.insight.doubletrade.com:scores/library.git" + } + ], + "include-path": ["library/"], + "autoload": { + "classmap": [ + "application/", + "library/Application/" + ] + }, + "authors": [ + { + "name": "Scores et Decisions", + "email": "supportdev@scores-decisions.com" + } + ] +} diff --git a/composer.json b/composer.json index db21b09e..171e230e 100644 --- a/composer.json +++ b/composer.json @@ -8,15 +8,20 @@ "doctrine/dbal": "^2.5", "mikehaertl/phpwkhtmltopdf": "^2.2", "guzzlehttp/guzzle": "^6.2", - "monolog/monolog": "^1.22" + "monolog/monolog": "^1.22", + "scores/library": "dev-master" }, + "repositories": [ + { + "type": "git", + "url": "git@gitlab.factory.insight.doubletrade.com:scores/library.git" + } + ], "include-path": ["library/"], "autoload": { "classmap": [ "application/", - "library/Application/", - "library/Metier/", - "library/Scores/" + "library/Application/" ] }, "authors": [ diff --git a/composer.lock b/composer.lock index 7da30f8b..4795e9e5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "1b530fbc9321c88cb523070b302fe495", + "content-hash": "4342ba201ccc8d66da9b9034e512bc99", "packages": [ { "name": "doctrine/annotations", @@ -285,16 +285,16 @@ }, { "name": "doctrine/dbal", - "version": "v2.5.11", + "version": "v2.5.12", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "1b1effbddbdc0f40d1c8f849f44bcddac4f52a48" + "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/1b1effbddbdc0f40d1c8f849f44bcddac4f52a48", - "reference": "1b1effbddbdc0f40d1c8f849f44bcddac4f52a48", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/7b9e911f9d8b30d43b96853dab26898c710d8f44", + "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44", "shasum": "" }, "require": { @@ -352,7 +352,7 @@ "persistence", "queryobject" ], - "time": "2017-02-04T21:20:13+00:00" + "time": "2017-02-08T12:53:47+00:00" }, { "name": "doctrine/inflector", @@ -481,14 +481,17 @@ "source": { "type": "git", "url": "https://github.com/GeSHi/geshi-1.0.git", - "reference": "57e2186cea10332de1e59d03834a0863f981e1a4" + "reference": "6b2973d145ac9b20b4f3df1dc98bda3f13066e90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GeSHi/geshi-1.0/zipball/57e2186cea10332de1e59d03834a0863f981e1a4", - "reference": "57e2186cea10332de1e59d03834a0863f981e1a4", + "url": "https://api.github.com/repos/GeSHi/geshi-1.0/zipball/6b2973d145ac9b20b4f3df1dc98bda3f13066e90", + "reference": "6b2973d145ac9b20b4f3df1dc98bda3f13066e90", "shasum": "" }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, "type": "library", "autoload": { "classmap": [ @@ -510,25 +513,25 @@ ], "description": "Generic Syntax Highlighter", "homepage": "http://qbnz.com/highlighter/", - "time": "2016-10-09 19:25:28" + "time": "2017-04-09 14:44:44" }, { "name": "guzzlehttp/guzzle", - "version": "6.2.2", + "version": "6.2.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60" + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60", - "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006", + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006", "shasum": "" }, "require": { "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.3.1", + "guzzlehttp/psr7": "^1.4", "php": ">=5.5" }, "require-dev": { @@ -572,7 +575,7 @@ "rest", "web service" ], - "time": "2016-10-08T15:01:37+00:00" + "time": "2017-02-28T22:50:30+00:00" }, { "name": "guzzlehttp/promises", @@ -627,16 +630,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.3.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", "shasum": "" }, "require": { @@ -672,29 +675,36 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "PSR-7 message implementation", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", "message", + "request", + "response", "stream", - "uri" + "uri", + "url" ], - "time": "2016-06-24T23:00:38+00:00" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "league/csv", - "version": "8.2.0", + "version": "8.2.1", "source": { "type": "git", "url": "https://github.com/thephpleague/csv.git", - "reference": "ef7eef710810c8bd0cf9371582ccd0123ff96d4b" + "reference": "43fd8b022815a0758d85e925dd92a43fe0d41bb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/csv/zipball/ef7eef710810c8bd0cf9371582ccd0123ff96d4b", - "reference": "ef7eef710810c8bd0cf9371582ccd0123ff96d4b", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/43fd8b022815a0758d85e925dd92a43fe0d41bb4", + "reference": "43fd8b022815a0758d85e925dd92a43fe0d41bb4", "shasum": "" }, "require": { @@ -738,20 +748,20 @@ "read", "write" ], - "time": "2017-01-25T13:32:07+00:00" + "time": "2017-02-23T08:25:03+00:00" }, { "name": "mikehaertl/php-shellcommand", - "version": "1.2.3", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/mikehaertl/php-shellcommand.git", - "reference": "a628505cd99b201375dd6bcd0b062ee07c8ba556" + "reference": "b0c0bf3ce49a01bd7ddbe07a9bed4ba85b869fa4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mikehaertl/php-shellcommand/zipball/a628505cd99b201375dd6bcd0b062ee07c8ba556", - "reference": "a628505cd99b201375dd6bcd0b062ee07c8ba556", + "url": "https://api.github.com/repos/mikehaertl/php-shellcommand/zipball/b0c0bf3ce49a01bd7ddbe07a9bed4ba85b869fa4", + "reference": "b0c0bf3ce49a01bd7ddbe07a9bed4ba85b869fa4", "shasum": "" }, "type": "library", @@ -774,7 +784,7 @@ "keywords": [ "shell" ], - "time": "2017-01-26T08:29:31+00:00" + "time": "2017-02-09T18:28:47+00:00" }, { "name": "mikehaertl/php-tmpfile", @@ -814,16 +824,16 @@ }, { "name": "mikehaertl/phpwkhtmltopdf", - "version": "2.2.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/mikehaertl/phpwkhtmltopdf.git", - "reference": "318aed9ad8d7622c6d00a0fdf3b199e71d48e47e" + "reference": "877dd0b13d7006cbaa4a272d62152e07310f4bd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mikehaertl/phpwkhtmltopdf/zipball/318aed9ad8d7622c6d00a0fdf3b199e71d48e47e", - "reference": "318aed9ad8d7622c6d00a0fdf3b199e71d48e47e", + "url": "https://api.github.com/repos/mikehaertl/phpwkhtmltopdf/zipball/877dd0b13d7006cbaa4a272d62152e07310f4bd3", + "reference": "877dd0b13d7006cbaa4a272d62152e07310f4bd3", "shasum": "" }, "require": { @@ -859,20 +869,20 @@ "wkhtmltoimage", "wkhtmltopdf" ], - "time": "2016-06-02T08:06:45+00:00" + "time": "2017-03-16T10:45:28+00:00" }, { "name": "monolog/monolog", - "version": "1.22.0", + "version": "1.22.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "bad29cb8d18ab0315e6c477751418a82c850d558" + "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558", - "reference": "bad29cb8d18ab0315e6c477751418a82c850d558", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0", + "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0", "shasum": "" }, "require": { @@ -937,7 +947,7 @@ "logging", "psr-3" ], - "time": "2016-11-26T00:15:39+00:00" + "time": "2017-03-13T07:08:03+00:00" }, { "name": "psr/http-message", @@ -1036,6 +1046,49 @@ ], "time": "2016-10-10T12:19:37+00:00" }, + { + "name": "scores/library", + "version": "dev-master", + "source": { + "type": "git", + "url": "git@gitlab.factory.insight.doubletrade.com:scores/library.git", + "reference": "c130f972acc31cf1fc97902832840f273c248834" + }, + "require": { + "doctrine/dbal": "^2.5", + "monolog/monolog": "^1.22", + "zendframework/zendframework1": "^1.12" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "2.*" + }, + "bin": [ + "bin/library-cache.php", + "bin/library-log.php", + "bin/library-ratios.php", + "bin/library-ratiosload.php", + "bin/library-sfr.php" + ], + "type": "library", + "autoload": { + "classmap": [ + "src/Metier/", + "src/Scores/" + ] + }, + "include-path": [ + "src/" + ], + "authors": [ + { + "name": "Scores et Decisions", + "email": "supportdev@scores-decisions.com" + } + ], + "description": "library", + "time": "2017-04-11 08:46:47" + }, { "name": "zendframework/zendframework1", "version": "1.12.20", @@ -1088,7 +1141,8 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "geshi/geshi": 20 + "geshi/geshi": 20, + "scores/library": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/library/Metier/Bodacc/BodaccCJ.php b/library/Metier/Bodacc/BodaccCJ.php deleted file mode 100644 index e4245142..00000000 --- a/library/Metier/Bodacc/BodaccCJ.php +++ /dev/null @@ -1,3351 +0,0 @@ -5499, // 3710704 - 'SARL'=>5499, // 3092997 - 'SOCIETEPARACTIONSSIMPLIFIEE'=>5710, // 654984 - 'SCI'=>6540, // 314805 - 'SARLASSOCIUNIQUE'=>5498, // 298825 - 'SOCITCIVILEIMMOBILIRE'=>6540, // 236045 - 'SA'=>5599, // 253688 - 'SAS'=>5710, // 278864 - 'SOCITANONYME'=>5599, // 181557 - 'SOCIETEARESPONSABILITELIMITEEAASSOCIEUNIQUE'=>5498, // 141779 - 'SC'=>6599, // 140824 - 'ENTREPRISEUNIPERSONNELLEARESPONSABILITELIMITEE'=>5488, // 125081 - 'SOCITCIVILE'=>6599, // 107132 - 'SOCITRESPONSABILITLIMITEUNIPERSONNELLE'=>5498, // 76627 - 'SOCITENNOMCOLLECTIF'=>5202, // 73878 - 'EURL'=>5488, // 99851 - 'SNC'=>5202, // 75309 - 'SOCITANONYMECONSEILDADMINISTRATION'=>5599, // 61016 - 'SACONSEILDADMINISTRATION'=>5599, // 55159 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITE'=>5485, // 46107 - 'SARLCAPITALVARIABLE'=>5499, // 30846 - 'EARL'=>6598, // 38235 - 'SOCITPARACTIONSSIMPLIFIEUNIPERSONNELLE'=>5720, // 25570 - 'SOCIETEARESPONSABILITELIMITEESOCIETEAASSOCIEUNIQUE'=>5498, // 24011 - 'SOCITPARACTIONSSIMPLIFIEASSOCIUNIQUE'=>5720, // 21846 - 'EXPLOITATIONAGRICOLERESPONSABILITLIMITE'=>6598, // 20618 - 'SELARL'=>5485, // 26159 - 'SOCITARESPONSABILITELIMITEEACAPITALVARIABLE'=>5499, // 17633 - 'SOCITANONYMEDIRECTOIREETCONSEILDESURVEILLANCE'=>5699, // 26674 - 'SOCITCIVILEDEMOYENS'=>6589, // 14777 - 'SCM'=>6589, // 14931 - 'SOCITDEDROITTRANGER'=>3120, // 13147 - 'SOCITRESPONSABILITLIMITECONSTITUEDUNASSOCIUNIQUE'=>5498, // 11681 - 'SADIRECTOIREETCONSEILDESURVEILLANCE'=>5699, // 12181 - 'SCDECONSTRUCTIONVENTE'=>0, // 11933 - 'SOCIETEPARACTIONSSIMPLIFIEESAS'=>5710, // 10486 - 'ASSOCIATION'=>9220, // 10020 - 'SASU'=>5720, // 12019 - 'SCEA'=>0, // 13267 - 'GIE'=>0, // 9268 - 'GROUPEMENTDINTRTCONOMIQUE'=>0, // 8118 - 'SARLSOCIETEAASSOCIEUNIQUE'=>0, // 7981 - 'SASUNIPERSONNELLE'=>0, // 7615 - 'SARLACAPITALVARIABLE'=>0, // 7322 - 'SOCITCIVILEDEXPLOITATIONAGRICOLE'=>0, // 6741 - 'ASSOCIATIONRGIESELONLALOIDE'=>9220, // 6314 - 'SOCIETECIVILEPROFESSIONNELLE'=>0, // 6139 - 'SOCITANONYMEDIRECTOIRE'=>0, // 6011 - 'SADIRECTOIRE'=>0, // 7171 - 'SOCITCOOPRATIVEAGRICOLE'=>0, // 5399 - 'SARLCONSTITUEDUNASSOCIUNIQUE'=>0, // 5061 - 'GROUPEMENTFONCIERAGRICOLE'=>0, // 4978 - 'SOCITDEXERCICELIBRALARL'=>0, // 4880 - 'SCPROFESSIONNELLE'=>0, // 4560 - 'SICAV'=>0, // 4423 - 'GFA'=>0, // 4617 - 'ENTREPRISEUNIPERSONNELLEARESPONSABILITELIMITEEEURL'=>0, // 4040 - 'SASASSOCIUNIQUE'=>0, // 3813 - 'SOCITCIVILEDECONSTRUCTIONVENTE'=>0, // 3878 - 'SOCITCOOPRATIVEAGRICOLECAPITALVARIABLE'=>0, // 3195 - 'SOCIETEDEXERCICELIBERALPARACTIONSSIMPLIFIEE'=>0, // 3155 - 'SOCITCIVILEAYANTPOUROBJETLACONSTRUCTIONDIMMEUBLESVENTE'=>0, // 3058 - 'SARLU'=>0, // 3714 - 'NONPRCISE'=>0, // 2906 - 'SCP'=>0, // 3513 - 'SOCIETECIVILEDECONSTRUCTIONVENTE'=>0, // 4263 - 'SARLDEPRESSE'=>0, // 4469 - 'SOCITDINVESTISSEMENTSCAPITALVARIABLE'=>0, // 2668 - 'SOCITENCOMMANDITEPARACTIONS'=>0, // 2598 - 'SRVA'=>0, // 2457 - 'GROUPEMENTFORESTIER'=>0, // 2442 - 'SOCITENCOMMANDITESIMPLE'=>0, // 2386 - 'ELRL'=>0, // 2308 - 'SOCIETEDEXERCICELIBERALARESPONSABILITELIMITEESELARL'=>0, // 3025 - 'SOCITCOOPRATIVE'=>0, // 2236 - 'UNIPERSONNELLERESPONSABILITLIMITE'=>0, // 2108 - 'SOCIETEPARACTIONSSIMPLIFIEEACAPITALVARIABLE'=>0, // 2087 - 'SACOOPRATIVECAPITALVARIABLE'=>0, // 2036 - 'GIECOMMERCIAL'=>0, // 1787 - 'SOCITANONYMEDCONOMIEMIXTE'=>0, // 1675 - 'SOCITCIVILEPARTICULIRE'=>0, // 1594 - 'SCPARTICULIRE'=>0, // 1556 - 'GAEC'=>0, // 2386 - 'GROUPEMENTAGRICOLEDEXPLOITATIONENCOMMUN'=>0, // 1477 - 'SOCIETEENNOMCOLLECTIFSNC'=>5202, // 1437 - 'GIESANSBUTLUCRATIF'=>0, // 1373 - 'SOCIETECIVILEACAPITALVARIABLE'=>0, // 1360 - 'SCA'=>0, // 1610 - 'SOCITANONYMECOOPRATIVECAPITALVARIABLE'=>0, // 1325 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITEUNIPERSONNELLE'=>0, // 1236 - 'SOCITDINVESTISSEMENTSCAPITALVARIABLECONSEIL'=>0, // 1223 - 'SOCITDEXERCICELIBRALARLUNIPERSONNELLE'=>0, // 1200 - 'SOCITANONYMEDCONOMIEMIXTELOCALE'=>0, // 1199 - 'SADCONOMIEMIXTE'=>0, // 1391 - 'COOPRATIVEOUVRIREDEPRODUCTIONRESPONSABILITLIMITE'=>0, // 1078 - 'SELARLASSOCIUNIQUE'=>0, // 1078 - 'SCCAPITALVARIABLE'=>0, // 1050 - 'ETABLISSEMENTPUBLICCARACTREINDUSTRIELETCOMMERCIAL'=>0, // 1026 - 'SARLUNIPERSONNELLE'=>0, // 1326 - 'SCS'=>0, // 989 - 'SARLMEMBREDELUE'=>0, // 961 - 'SOCITARESPLIMEXERCICELIBERAL'=>0, // 924 - 'SOCITRESPONSABILITLIMITEMEMBREDELACOMMUNAUTEUROPENNEOUPARTIELACCORDSURLESPAC'=>0, // 905 - 'SOCITCOOPRATIVECAPITALVARIABLE'=>0, // 1047 - 'UNIONDECOOPRATIVESAGRICOLES'=>0, // 882 - 'SOCIETEARESPONSABILITELIMITEEDEPRESSE'=>0, // 873 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 884 - 'SOCIETECIVILEDECONSTRUCTIONVENTELOIDETITRE'=>0, // 842 - 'SELAS'=>0, // 972 - 'SRL'=>0, // 819 - 'ANOSAACONSEILDADMINISTRATION'=>0, // 798 - 'SAEM'=>0, // 855 - 'SOCITDINVESTISSEMENTCAPITALVARIABLE'=>0, // 762 - 'SARLEURL'=>0, // 777 - 'SOCITCOOPRATIVERESPONSABILITLIMITE'=>0, // 740 - 'SOCIETEANONYMECOOPERATIVE'=>0, // 705 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITEETASSOCIUNIQUE'=>0, // 679 - 'SOCITDCONOMIEMIXTE'=>0, // 676 - 'SARLDEXERCICELIBRE'=>0, // 669 - 'SOCITCIVILEAGRICOLE'=>0, // 659 - 'SARLCOOPRATIVECAPITALVARIABLE'=>0, // 896 - 'SOCIETEPARACTIONSSIMPLIFIEEUNIPERSONNELLESASU'=>0, // 643 - 'SCIDECONSTRUCTIONVENTE'=>0, // 797 - 'SASCAPITALVARIABLE'=>0, // 630 - 'SOCITCOOPRATIVERESPONSABILITLIMITECAPITALVARIABLE'=>0, // 612 - 'CACV'=>0, // 905 - 'COOPRATIVEDUTILISATIONDEMATRIELAGRICOLEENCOMMUN'=>0, // 591 - 'SCCV'=>0, // 891 - 'SOCITDEXERCICELIBRALFORMEANONYME'=>0, // 584 - 'SOCITDINTRTCOLLECTIFAGRICOLE'=>0, // 557 - 'SOCITCIVILEIMMOBILIRECAPITALVARIABLE'=>0, // 536 - 'SOCIETEARESPONSABILITELIMITEEDEXERCICELIBERAL'=>0, // 533 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 532 - 'SERL'=>0, // 582 - 'SOCITCIVILEPROFESSIONNELLEDAVOCATS'=>0, // 516 - 'SNCSOCIETEENNOMCOLLECTIF'=>5202, // 509 - 'ASSOCIATIONLOI'=>9220, // 496 - 'SOCIETEPARACTIONSIMPLIFIEE'=>0, // 480 - 'SOCIETEANONYMESPORTIVEPROFESSIONNELLE'=>0, // 475 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITLIMITE'=>0, // 458 - 'SARLAASSOCIEUNIQUEETACAPITALVARIABLE'=>0, // 457 - 'SCPROFESSIONNELLEDAVOCATS'=>0, // 450 - 'SARLCOOPERATIVEACAPITALVARIABLE'=>0, // 431 - 'SOCITDEXPLOITATIONAGRICOLERESPONSABILITELIMITE'=>0, // 427 - 'SACOOPRATIVE'=>0, // 431 - 'SOCITRESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 480 - 'SAD'=>0, // 530 - 'SOCITCIVILEDEPLACEMENTIMMOBILIER'=>0, // 403 - 'SCOPSARL'=>0, // 625 - 'SOCITANONYMEMEMBREDELACOMMUNAUTEUROPENNEOUPARTIELACCORDSURLESPACECONOMIQUEEURO'=>0, // 392 - 'SOCIT'=>0, // 420 - 'ENTREPRISEUNIPERSONNELLERESPONSABILITLIMITEDEXERCICELIBRAL'=>0, // 379 - 'SOCIETEARESPONSABILITELIMITEEMEMBREDELACEE'=>0, // 379 - 'SICA'=>0, // 644 - 'SCDEPLACEMENTIMMOBILIER'=>0, // 357 - 'SAEMLOCALE'=>0, // 356 - 'SCAGRICOLE'=>0, // 352 - 'SCOPRESPONSABILITLIMITE'=>0, // 354 - 'UNIONDECOOPRATIVESAGRICOLESCAPITALVARIABLE'=>0, // 345 - 'SARLCOOPRATIVE'=>0, // 340 - 'EPIC'=>0, // 356 - 'SAMEMBREDELUE'=>0, // 344 - 'SARLASSOCIUNIQUEETCAPITALVARIABLE'=>0, // 549 - 'SCICAPITALVARIABLE'=>0, // 326 - 'SOCIETEDECAUTIONMUTUELLE'=>0, // 321 - 'SOCITRESPONSABILITLIMITECOOPRATIVE'=>0, // 321 - 'SOCITCIVILEDECONTRUCTIONVENTE'=>0, // 318 - 'SEM'=>0, // 379 - 'SELAFA'=>0, // 360 - 'EURLASSOCIUNIQUE'=>0, // 327 - 'SOCITCIVILEDEXPLOITATIONVITICOLE'=>0, // 311 - 'ELUP'=>0, // 316 - 'SOCITCOOPRATIVEARLCAPITALVARIABLE'=>0, // 298 - 'SOCITCOOPRATIVEDEPRODUCTIONARLCAPITALVARIABLE'=>0, // 297 - 'SOCIETEANONYMECOOPERATIVEDEPRODUCTIONDHLM'=>0, // 296 - 'GROUPEMENTFONCIERRURAL'=>0, // 295 - 'SOCITCIVILEDEXPLOITATIONAGRICOLERESPONSABILITELIMITE'=>0, // 294 - 'SOCITCIVILEIMMOBILIREDECONSTRUCTIONVENTE'=>0, // 385 - 'SOCITTRANGREIMMATRICULEAURCS'=>0, // 309 - 'SOCITANONYMEFAISANTAPPELPUBLICLPARGNE'=>0, // 271 - 'SOCITPARACTIONSSIMPLIFIEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 270 - 'SCDECONSTRUCTION'=>0, // 268 - 'SOCITDEXERCICELIBRALENCOMMANDITEPARACTIONS'=>0, // 266 - 'SOCITCIVILEDECONSTRUCTIONVENTELOIDETITREER'=>0, // 266 - 'EARLCAPITALVARIABLE'=>0, // 260 - 'SOCITDEPLACEMENTPRPONDRANCEIMMOBILIRECAPITALVARIABLE'=>0, // 257 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTION'=>0, // 253 - 'SOCITCIVILECOOPRATIVE'=>0, // 247 - 'SOCITDEXERCICELIBRALUNIPERSONNELLERESPONSABILITLIMITE'=>0, // 241 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONANONYME'=>0, // 239 - 'SOCITDACTIONSSIMPLIFIECAPITALVARIABLE'=>0, // 238 - 'SOCITCOOPRATIVEDEPRODUCTIONANONYMECAPITALVARIABLE'=>0, // 238 - 'SACAPITALVARIABLE'=>0, // 274 - 'ETABLISSEMENTPUBLICINDUSTRIELETCOMMERCIAL'=>0, // 236 - 'SOCITCOOPRATIVEANONYMEDINTRTCOLLECTIFAGRICOLE'=>0, // 233 - 'SOCIETECIVILEIMMOBILIEREDECONSTRUCTIONVENTE'=>0, // 232 - 'UNIONDESCOOPRATIVESAGRICOLES'=>0, // 357 - 'SOCIETEANONYMEDHLM'=>0, // 228 - 'GROUPEMENTEUROPENDINTRTCONOMIQUE'=>0, // 227 - 'COOPERATIVEACAPITALVARIABLEENARL'=>0, // 231 - 'SDE'=>0, // 243 - 'SCACAPITALVARIABLE'=>0, // 221 - 'SCOPSA'=>0, // 265 - 'SOCITDEXERCICELIBRALUNIPERSONNELLE'=>0, // 215 - 'EUARL'=>0, // 215 - 'SADHLM'=>0, // 378 - 'SOCITCOOPRATIVEDECRDITCAPITALVARIABLE'=>0, // 209 - 'SOCITRESPONSABILITLIMITECOOPRATIVEOUVRIREDEPRODUCTION'=>0, // 207 - 'COOPRATIVEOUVRIREDEPRODUCTIONENSARL'=>0, // 207 - 'COOPERATIVEAGRICOLE'=>0, // 204 - 'SOCIETECOOPERATIVEDEPRODUCTIONENARLACAPITALVARIABLE'=>0, // 274 - 'SOCIETEARESPONSABILITELIMITEEDARCHITECTURE'=>0, // 195 - 'SCDECONTRUCTIONVENTE'=>0, // 200 - 'SOCIETEANONYMECOOPERATIVEDECOMMERCANTSDETAILLANTS'=>0, // 190 - 'SOCITCOOPRATIVEDINTRTCOLLECTIF'=>0, // 190 - 'SARLCOOPERATIVEARTISANALE'=>0, // 189 - 'GEIE'=>0, // 196 - 'SOCITCIVILECOOPRATIVEAGRICOLE'=>0, // 183 - 'CUMA'=>0, // 337 - 'SOCITCOOPRATIVEDECRDIT'=>0, // 182 - 'COOPRATIVEAGRICOLECAPITALVARIABLE'=>0, // 182 - 'STANONYMECOOPRATIVE'=>0, // 179 - 'SOCIETEANONYMEMEMBREDELACEE'=>0, // 216 - 'SOCIETEDEXERCICELIBERALAFORMEANONYMESELAFA'=>0, // 174 - 'SELARLUNIPERSONNELLE'=>0, // 174 - 'COOPRATIVEDEPRODUCTIONARLCAPITALVARIABLE'=>0, // 172 - 'SCOP'=>0, // 212 - 'STCIVILECAPITALVARIABLE'=>0, // 171 - 'COOPERATIVEOUVRIEREDEPRODUCTARESPLIM'=>0, // 169 - 'SOCITTRANGREISSUEDELESPACEECONOMIQUEEUROPEN'=>0, // 166 - 'SOCITCOOPRATIVEDEPRODUCTION'=>0, // 167 - 'SOCITCIVILEPROFESSIONNELLEDENOTAIRES'=>0, // 165 - 'SOCITCOOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 168 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONANONYMECAPITALVARIABLE'=>0, // 160 - 'SOCITRESPONSABILITLIMITEOUVRIREDEPRODUCTIONCAPITALVARIABLE'=>0, // 157 - 'SOCIETEANONYMECOOPERATIVEARTISANALE'=>0, // 157 - 'SOCITCIVILEDATTRIBUTION'=>0, // 155 - 'SOCITCOOPRATIVERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 306 - 'SOCIETEDEXERCICELIBERALPARACTIONSSIMPLIFIEESELAS'=>0, // 171 - 'SEARL'=>0, // 170 - 'SADCONOMIEMIXTELOCALE'=>0, // 149 - 'SOCITEUROPENNE'=>0, // 147 - 'ENTREPRISEUNIPERSONELLEARESPONSABILITELIMITEE'=>0, // 144 - 'SCCOOPRATIVE'=>0, // 146 - 'SOCITANONYMECAPITALVARIABLE'=>0, // 142 - 'SOCITCOOPRATIVECAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 143 - 'SOCITANONYMEDCONOMIEMIXTECONSEILADMINISTRATION'=>0, // 140 - 'SCDEXPLOITATIONVINICOLE'=>0, // 139 - 'SOCITANONYMECOOPRATIVEDINTRTCOLLECTIFPOURLACCESSIONLAPROPRIT'=>0, // 193 - 'SOCITANONYMECOOPRATIVECAPITALETPERSONNELVARIABLE'=>0, // 138 - 'EARLASSOCIUNIQUE'=>0, // 143 - 'SOCITCOOPRATIVEMARITIME'=>0, // 159 - 'SACOOPRATIVEDECOMMERANTSDTAILLANTS'=>0, // 171 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFANONYME'=>0, // 132 - 'SOCITANONYMEDECONOMIEMIXTECONSEILDADMINISTRATION'=>0, // 132 - 'SICASOUSFORMEDESOCIETEANONYME'=>0, // 129 - 'SANONMEMBREDELUE'=>0, // 130 - 'CETTESOCIETEESTUNESASUNIPERSONNELLE'=>0, // 128 - 'SCDEPORTEFEUILLE'=>0, // 130 - 'SACA'=>0, // 149 - 'SCDATTRIBUTION'=>0, // 127 - 'SCEV'=>0, // 143 - 'SELARLU'=>0, // 192 - 'SARLNONMEMBREDELUE'=>0, // 128 - 'SACOOPRATIVEARTISANALECAPITALVARIABLE'=>0, // 152 - 'SARLCOOPRATIVEDECRDITCAPITALVARIABLE'=>0, // 124 - 'SOCITANONYMECOOPRATIVEOUVRIREDEPRODUCTION'=>0, // 120 - 'SOCITANONYMECOOPRATIVEDEPRODUCTIONCAPITALVARIABLE'=>0, // 120 - 'SOCIETECIVILEDECONSTRUCTION'=>0, // 119 - 'COLLECTIVITTERRITORIALE'=>0, // 116 - 'SARLASSOCIUNIQUECAPITVAR'=>0, // 132 - 'SOCITANONYMEDHLM'=>0, // 121 - 'SOCITCOOPRATIVECAPITALETPERSONNELVARIABLES'=>0, // 113 - 'MUTUELLE'=>0, // 111 - 'COOPRATIVECAPITALVARIABLEENSARL'=>0, // 111 - 'SASDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 112 - 'SARLCAPITALVARIABLEETASSOCIUNIQUE'=>0, // 164 - 'SACO'=>0, // 121 - 'SARLMEMBREDELACEE'=>0, // 134 - 'SOCIETEDECONOMIEMIXTEACONSEILDADMINISTRATION'=>0, // 109 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFRESPONSABILITLIMITE'=>0, // 108 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 145 - 'SOCIETEDEXERCICELIBERALARESPONSABILITELIMITEEETASSOCIEU'=>0, // 107 - 'COOPERATIVEOUVRIEREDEPRODUCTIONANONYME'=>0, // 107 - 'SOCITCOOPERATIVEDEPRODUCTIONSARL'=>0, // 185 - 'SCDEMOYENS'=>0, // 106 - 'CPAV'=>0, // 106 - 'SOCITRESPONSABILITLIMITENONMEMBREDELACOMMUNAUTEUROPENNEOUNONPARTIELACCORDSUR'=>0, // 105 - 'SACOOPRATIVECAPITALETPERSONNELVARIABLES'=>0, // 195 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONSA'=>0, // 105 - 'SASPORTIVEPROFESSIONNELLE'=>0, // 114 - 'SOCITCIVILEDEGESTIONDEPORTEFEUILLE'=>0, // 103 - 'SOCITDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALERESPONSABILITLIMITE'=>0, // 103 - 'SOCIETEDINTERETCOLLECTIFAGRICOLEARL'=>0, // 103 - 'ENTREPRISEUNIPERSONNELLEARESPONSABILITELIMITEEACAPITALVARIABLE'=>0, // 103 - 'SRLEL'=>0, // 153 - 'SOCITPARACTIONSIMPLIFIECAPITALVARIABLE'=>0, // 138 - 'SARLASSOCIEUNIQUECAPITVAR'=>0, // 102 - 'SCPROFESSIONNELLEDENOTAIRES'=>0, // 103 - 'COOPERATIVEOUVRIEREDEPRODUCTIONENSARL'=>0, // 100 - 'TABLISSEMENTPUBLIC'=>0, // 101 - 'SCMCAPITALVARIABLE'=>0, // 98 - 'SNCCAPITALVARIABLE'=>5202, // 97 - 'URLV'=>0, // 103 - 'SOCITPARACTIONSSIMPLIFIEASSOCIUNIQUEETCAPITALVARIABLE'=>0, // 95 - 'GFRURAL'=>0, // 96 - 'SOCIETEDEXERCICELIBERALUNIPERSONNELLEARESPONSABILITELIMIT'=>0, // 94 - 'BANQUECOOPRATIVE'=>0, // 93 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITCAPITALVARIABLE'=>0, // 93 - 'SOCITANONYMENONMEMBREDELACOMMUNAUTEUROPENNEOUNONPARTIELACCORDSURLESPACECONOMI'=>0, // 92 - 'SOCITANONYMECOOPRATIVECONSEILDADMINISTRATIONCAPITALVARIABLE'=>0, // 92 - 'SOCIETEANONYMENONMEMBREDELACEE'=>0, // 90 - 'UNIONDECOOPRATIVEAGRICOLE'=>0, // 90 - 'SOCITANONYMECOOPRATIVECAPITALETPERSONNELVARIABLES'=>0, // 89 - 'SARLCOOPRATIVEOUVRIREDEPRODUCTIONETDECRDITCAPITALVARIABLE'=>0, // 92 - 'ELAS'=>0, // 89 - 'SOCITANONYMECOOPRATIVEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 88 - 'SOCITCOOPRATIVECAPITALVARIABLEENLAFORMESARL'=>0, // 88 - 'TABLISSEMENTPUBLICCARRACTREINDUSTRIELOUCOMMERCIAL'=>0, // 88 - 'SARLUN'=>0, // 87 - 'SCCOOPRATIVEDECONSTRUCTION'=>0, // 87 - 'SACOOPRATIVEDEPRODUCTIONDHLM'=>0, // 88 - 'SARLCOOPRATIVEARTISANALE'=>0, // 88 - 'SOCIETECOOPERATIVEDEPRODUCTIONARESPONSABILITELIMITEEACAP'=>0, // 85 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFSOUSFORMEANONYMECONSEILDADMINISTRATION'=>0, // 83 - 'SAFAISANTAPPELPUBLICLPARGNE'=>0, // 81 - 'ANOSOCIETEANONYMEADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 81 - 'SOCIETEANONYMECOOPERATIVEDEBANQUEPOPULAIRE'=>0, // 79 - 'SOCITCIVILEDEPORTEFEUILLE'=>0, // 79 - 'SCCOOPRATIVEAGRICOLE'=>0, // 79 - 'SELEURL'=>0, // 113 - 'SCOPRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 122 - 'SOCITCIVILEENCONSTRUCTIONVENTELOIDETITRE'=>0, // 105 - 'SOCITDEXERCICELIBRALDENTREPRISEUNIPERSONNELLERESPONSABILITLIMITE'=>0, // 77 - 'SOCIETEARESPONSABILITELIMITEEAASSOCIEUNIQUEETACAPITALVARIABLE'=>0, // 75 - 'SOCITCIVILEDEMOYENSCAPITALVARIABLE'=>0, // 75 - 'SARLCV'=>0, // 115 - 'SOCITCOOPRATIVEDECAUTIONMUTUELLECAPITALVARIABLE'=>0, // 75 - 'SARLSOUSFORMEDEEURL'=>0, // 74 - 'SCEACAPITALVARIABLE'=>0, // 73 - 'SOCITDEXERCICELIBRAL'=>0, // 74 - 'SOCITCIVILECOOPRATIVEDECONSTRUCTION'=>0, // 73 - 'SACOOPRATIVEDEPERSONNESCAPITALVARIABLE'=>0, // 73 - 'SCPDAVOCATS'=>0, // 75 - 'SOCITRESPONSABILITLIMITECOOPRATIVECAPITALVARIABLE'=>0, // 72 - 'SARLENLIQUIDATION'=>0, // 100 - 'SCIDATTRIBUTION'=>0, // 72 - 'TABLISSEMENTPUBLICNATIONAL'=>0, // 71 - 'COLLECTIVITLOCALE'=>0, // 70 - 'SOCIETEPARACTIONSSIMPLIFIEEADIRECTOIREETCONSEILDESURVEI'=>0, // 69 - 'SOCITCOOPRATIVEARTISANARLCAPITALVARIABLE'=>0, // 69 - 'SASPLURIPERSONNELLE'=>0, // 71 - 'SOCITCIVILEPROFESSIONNELLEDHUISSIERSDEJUSTICE'=>0, // 68 - 'SCOPFORMEANONYME'=>0, // 67 - 'ENTREPRISEUNIPERSONNELLERESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 116 - 'SOCITCOOPRATIVEARTISANALERESPONSABILITLIMITE'=>0, // 67 - 'AS'=>0, // 77 - 'SOCIETEDEXERCICELIBERALPARACTIONSSIMPLIFIEEUNIPERSONNELLE'=>0, // 65 - 'SOCIETEANONYMECOOPERATIVEMARITIMEACAPITALVARIABLE'=>0, // 65 - 'VOIRRUBRIQUEOBSERVATIONS'=>0, // 64 - 'SOCITANONYMECOOPRATIVEDINTRTCOLLECTIFAGRICOLE'=>0, // 63 - 'SARLCAPITALPERSONNELVARIABLE'=>0, // 71 - 'SACOOPRATIVEDECONSOMMATIONCAPITALVARIABLE'=>0, // 63 - 'SCDEGESTIONDEPORTEFEUILLE'=>0, // 63 - 'SARLENDISSOLUTION'=>0, // 68 - 'SARLASSOCIUNIQUECAPITALVARIABLE'=>0, // 65 - 'GFR'=>0, // 72 - 'SOCIETEARESPONSABILITELIMITEENONMEMBREDELACEE'=>0, // 61 - 'SCCONSTRUCTIONVENTE'=>0, // 105 - 'SOCIETEARESPONSABILITELIMITEECOOPERATIVEOUVRIEREDEPRODUCTIONETDECREDIT'=>0, // 61 - 'SOCITANONYMEDCONOMIEMIXTEDIRECTOIRE'=>0, // 60 - 'SOCITTRANGRE'=>0, // 60 - 'SOCITDINTRTCOLLECTIFAGRICOLERESPONSABILITLIMITE'=>0, // 60 - 'SOCITCOOPRATIVEDEPRODUCTIONFORMESARL'=>0, // 60 - 'SELCA'=>0, // 62 - 'SCPARTICULIREDEXPLOITATIONAGRICOLE'=>0, // 59 - 'SELURL'=>0, // 71 - 'SOCITCOOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 58 - 'CAISSEDECRDITMUTUEL'=>0, // 58 - 'SOCIETEANONYMEAOBJETSPORTIF'=>0, // 57 - 'STEUNIPERSONNELLEARESPONSABILITELIMITEE'=>0, // 56 - 'SOCITCOOPRATIVEDECONSOMMATIONANONYMECAPITALVARIABLE'=>0, // 56 - 'UNIONCOOPRATIVE'=>0, // 55 - 'SCC'=>0, // 64 - 'SACOOPRATIVEMARITIMECAPITALVARIABLE'=>0, // 55 - 'SCOPANONYMECAPITALVARIABLE'=>0, // 54 - 'SOCITCOOPRATIVECAPITALETPERSONNELVARIABLE'=>0, // 53 - 'SOCITENCOMMANDITEPARACTIONSCAPITALVARIABLE'=>0, // 53 - 'TABLISSEMENTPUBLICDELTATCARACTREINDUSTRIELETCOMMERCIAL'=>0, // 52 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFARL'=>0, // 78 - 'SOCITCOOPRATIVEARTISANALERESPLIMITEETCAPITALVARIABLE'=>0, // 51 - 'SACONSEILDESURVEILLANCE'=>0, // 51 - 'SARLCOOPERATIVEOUVRIEREDEPRODUCTION'=>0, // 50 - 'SACOOPRATIVEARTISANALE'=>0, // 50 - 'EURLDEXERCICELIBRAL'=>0, // 50 - 'SOCITCIVILEPROFESSIONNELLEDEVTRINAIRES'=>0, // 49 - 'SOCIETEANONYMEEXERCICELIBERAL'=>0, // 49 - 'ENTREPRISEUNIPERSONNELLEARESPONSABILITELIMITEEETACAPITALVARIABLE'=>0, // 49 - 'SOCITCOOPRATIVEAGRICOLELAITIRECAPITALVARIABLE'=>0, // 49 - 'GF'=>0, // 75 - 'SOCITCOOPRATIVEARTISANALECAPITALVARIABLE'=>0, // 82 - 'SOCITRESPONSABILITLIMITEMEMBREDELACEE'=>0, // 48 - 'COOPRATIVECAPITALVARIABLEENARL'=>0, // 48 - 'SOCITCIVILEPROFESSIONNELLEDARCHITECTES'=>0, // 48 - 'SOCITCIVILEPROFESSIONNELLEDINFIRMIERS'=>0, // 47 - 'AUTREFORMEJURIDIQUE'=>0, // 47 - 'SOCIETEANONYMEDEPRESSE'=>0, // 47 - 'SOCITCIVILEPROFESSIONNELLEDEMDECINS'=>0, // 47 - 'SAEML'=>0, // 82 - 'GIECAPITALVARIABLE'=>0, // 47 - 'SCOPANONYME'=>0, // 47 - 'SOCITRESPONSABILITLIMITECAPITALVARIABLEASSOCIUNIQUE'=>0, // 46 - 'SOCITANONYMEDINTRTCOLLECTIFAGRICOLECONSEILDADMINISTRATION'=>0, // 46 - 'SOCITCOOPRATIVEARTISANALEARLCAPITALVARIABLE'=>0, // 49 - 'SOCIETEANONYMEACONSEILDESURVEILLANCE'=>0, // 45 - 'SOCITCOOPRATIVEARTISANALERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 46 - 'COOPERATIVEMARITIME'=>0, // 45 - 'SOCITDEXERCICELIBRALDEFORMEANONYME'=>0, // 44 - 'SOCIETEANONYMECOOPERATIVEACAPITALVARIABLEADIRECTOIRE'=>0, // 44 - 'TABLISSEMENTPUBLICADMINISTRATIF'=>0, // 44 - 'SACOOPRATIVEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 51 - 'SOCIETEANOMYMECOOPERATIVE'=>0, // 43 - 'SARLDARCHITECTURE'=>0, // 64 - 'SEMCONSEILDADMINISTRATION'=>0, // 43 - 'COOPRATIVEDECRDITCAPITALVARIABLE'=>0, // 43 - 'SACOOPRATIVEDEBANQUEPOPULAIRE'=>0, // 42 - 'SOCITCIVILEVITICOLE'=>0, // 42 - 'SPAS'=>0, // 46 - 'STCIVILEAYANTPOUROBJETLACONSTRUCTIONDIMMEUBLESVENTE'=>0, // 42 - 'UNIONDECOOPRATIVE'=>0, // 42 - 'SOCIETECOOPERATIVEACAPITALVARIABLEETARESPONSABILITELIMIT'=>0, // 42 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONENLAFORMESARL'=>0, // 42 - 'SOCIETEARESPONSABILITELIMITEEDETYPEEURL'=>0, // 41 - 'SOCIETECOOPERATIVEOUVRIEREDEPRODUCTIONANONYMEACAPITALVAR'=>0, // 41 - 'SOCITCIVILECONSTITUEENVUEDELATTRIBUTIONDUNIMMEUBLE'=>0, // 41 - 'SACOOPRATIVEDECONSOMMATEURSCAPITALVARIABLE'=>0, // 66 - 'SOCIETEANONYMEADIRECTOIREETCONSEILDORIENTATIONETDESURVEILLANCE'=>0, // 41 - 'SCFAISANTAPPELPUBLICLPARGNE'=>0, // 40 - 'SCOPFORMEANONYMEETCAPITALVARIABLE'=>0, // 52 - 'SARLACAPITALETPERSONNELVARIABLE'=>0, // 40 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLESA'=>0, // 40 - 'SOCITANONYMECOOPRATIVEDEPRODUCTIONDHABITATIONLOYERMODRDELOCATIONCONSEILDADMINI'=>0, // 39 - 'SARLSOCITENLIQUIDATION'=>0, // 63 - 'SCDEPERSONNES'=>0, // 39 - 'SACOOPRATIVEDEPRODUCTIONCAPITALVARIABLE'=>0, // 39 - 'COOPERATIVEOUVRIEREDEPRODUCTIONENARL'=>0, // 39 - 'STANONYMECOOPRATIVEDINTRTCOLLECTIFPOURLACCESSIONLAPROPRIT'=>0, // 39 - 'COOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 40 - 'SAPERSONNELETCAPITALVARIABLES'=>0, // 45 - 'SOCITCOOPRATIVEDECONSOMMATIONRESPONSABILITLIMITE'=>0, // 38 - 'SARU'=>0, // 41 - 'COOPRATIVEDECONSOMMATIONENSOCITANONYME'=>0, // 38 - 'COOPERATIVEAGRICOLEAUCAPITALVARIABLE'=>0, // 38 - 'SOCITENNOMCOLLECTIFCAPITALVARIABLE'=>5202, // 38 - 'SOCIETECIVILEDEPARTICIPATION'=>0, // 38 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLERESPONSABILITLIMITE'=>0, // 38 - 'SOCITCIVILEDEPLACEMENTIMMOBILIERCAPITALVARIABLE'=>0, // 38 - 'ELFA'=>0, // 41 - 'SOCIETEANONYMECOOPERATIVEADIRECTOIRE'=>0, // 38 - 'COOPRATIVEDUTILISATIONDUMATRIELAGRICOLE'=>0, // 37 - 'SOCITCOOPRATIVEDEBANQUE'=>0, // 37 - 'ENTREPRISEUNIPERSONNELLEARESPONSABLITELIMITEE'=>0, // 37 - 'SOCITANONYMECOOPRATIVEARTISANALECAPITALVARIABLE'=>0, // 37 - 'SAPERSONNELETCAPITALVARIABLE'=>0, // 38 - 'UNIONDESOCITSCOOPRATIVESDIRECTOIRE'=>0, // 37 - 'STEDEXERCICELIBERALARESPONSABILITELIMITEE'=>0, // 37 - 'SCEARESPONSABILITLIMITE'=>0, // 38 - 'COOPRATIVERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 39 - 'SYNDICAT'=>0, // 36 - 'SICAANONYMEADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 35 - 'SOCITNATIONALE'=>0, // 35 - 'SACOOPRATIVECAPITALETPERSONNELVARIABLE'=>0, // 38 - 'SOCITCOOPRATIVEDECRDITRESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 35 - 'COOPRATIVEDUTILISATIONDEMATRIELAGRICOLE'=>0, // 34 - 'SOCIETEANONYMESIMPLIFIEE'=>0, // 34 - 'SOCITCOOPRATIVEDEPRODUCTIONFORMEANONYMECAPITALVARIABLE'=>0, // 34 - 'SOCITDEPLACEMENTPRPONDRANCEIMMOBILIRECAPITALVARIABLEETCONSEILDADMINISTRATION'=>0, // 33 - 'SCCOOPRATIVEPERSONNELETCAPITALVARIABLES'=>0, // 35 - 'SOCIETEANONYMEACAPITALETPERSONNELVARIABLE'=>0, // 33 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 33 - 'SARLDEXERCICELIBRAL'=>0, // 34 - 'GROUPEMENTFONCIER'=>0, // 32 - 'SCPROFESSIONNELLEDEVTRINAIRES'=>0, // 32 - 'UNIONDECONOMIESOCIALESTECOOPERATIVESARL'=>0, // 32 - 'SOCITANONYMESOCITDHABITATIONDELOYERMMODR'=>0, // 32 - 'ASSOCIATIONRGIEPARLALOIDUERJUILLET'=>9220, // 32 - 'SARLASSOCIEUNIQUE'=>0, // 53 - 'COOPRATIVE'=>0, // 31 - 'SOCITCOOPRATIVEANONYMEDEBANQUEPOPULAIRECAPITALVARIABLE'=>0, // 31 - 'SOCITCIVILEDEPERSONNES'=>0, // 31 - 'SOCITANONYMEAPARTICIPATIONOUVRIERE'=>0, // 30 - 'SOCITCIVILEIMMOBILIREDATTRIBUTION'=>0, // 30 - 'SCOPCAPITALVARIABLE'=>0, // 30 - 'SOCIETEANONYMECOOPERATIVEDECOMMERCANTDETAILLANTS'=>0, // 30 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONRESPONSABILITLIMITE'=>0, // 30 - 'SASP'=>0, // 64 - 'CAISSEMUTUELLEDECRDIT'=>0, // 30 - 'SAMEMBREDELACEE'=>0, // 41 - 'SAPERSONNELCAPITALVARIABLE'=>0, // 29 - 'SOCIETEANONYMECAPITALFIXECOOPDEBANQUE'=>0, // 29 - 'SACOOPRATIVEDEPRODUCTIONDEHLMCAPITALVARIABLE'=>0, // 29 - 'COMMUNEDE'=>0, // 29 - 'SOCIETECOOPERATIVEDETRAVAILLEURSSARL'=>0, // 29 - 'SOCIETEENCOMMANDITEPARACTIONACAPITALVARIABLE'=>0, // 28 - 'COOPRATIVEDECRDITRESPONSABILITSTATUTAIREMENTLIMITEETCAPITALVARIABLE'=>0, // 28 - 'SCVITICOLE'=>0, // 28 - 'SOCITDINTRTCOLLECTIFAGRICOLEFORMESAS'=>0, // 28 - 'SOCITPUBLIQUELOCALEDAMNAGEMENT'=>0, // 28 - 'SEL'=>0, // 38 - 'CUMAENCOMMUN'=>0, // 28 - 'SASUCAPITALVARIABLE'=>0, // 31 - 'SOCITANONYMEDHLMCONSEILDADMINISTRATION'=>0, // 28 - 'SOCITANONYMECOOPRATIVEDEBANQUECAPITALVARIABLE'=>0, // 28 - 'SK'=>0, // 36 - 'SCPROFESSIONNELLEDINFIRMIERS'=>0, // 28 - 'SRLV'=>0, // 29 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITEDARCHITECTURE'=>0, // 27 - 'SAOUVRIRECOOPRATIVEDEPERSONNESCAPITALVARIABLE'=>0, // 27 - 'SOCIETEARESPONSABILITELIMITEDEXERCICELIBERAL'=>0, // 27 - 'SCDEPLACEMENTIMMOBILIERCAPITALVARIABLE'=>0, // 27 - 'COOPERATIVEOUVRIEREDEPRODUCTIONACAPITALVARIABLESARL'=>0, // 27 - 'SAOUVRIRECOOPRATIVEPERSONNELETCAPITALVARIABLES'=>0, // 54 - 'SOCIETECIVILECOOPERATIVEACAPITALETPERSONNELVARIABLE'=>0, // 27 - 'SCIC'=>0, // 59 - 'SCDEXPLOITATIONAGRICOLE'=>0, // 27 - 'NONRENSEIGNE'=>0, // 26 - 'SARLENLIQUIDATIONAMIABLE'=>0, // 28 - 'CRDITMUTUEL'=>0, // 26 - 'SACOOPRATIONCONSOMCAPITALVARIABLE'=>0, // 26 - 'SELRL'=>0, // 28 - 'GAECCAPITALVARIABLE'=>0, // 26 - 'SCPROFESSIONNELLEDEMDECINS'=>0, // 27 - 'GICO'=>0, // 27 - 'COOPRATIVEDECRDITCAPITALVARRESPSTATUTAIREMENTLIMITE'=>0, // 26 - 'SCDEPLACEMENTCOLLECTIFIMMOBILIERCAPITALVARIABLE'=>0, // 26 - 'SOCITCIVILECOOPRATIVECAPITALVARIABLE'=>0, // 26 - 'SOCITRESPONSABILITLIMITECAPITALPERSONNELVARIABLE'=>0, // 26 - 'SOCITANONYMEOUVRIRECOOPRATIVEPERSCAPITALVARIABLE'=>0, // 27 - 'SCDEGESTION'=>0, // 27 - 'SCCOOPRATIVEDECRDITCAPITALVARIABLE'=>0, // 25 - 'NONPRCIS'=>0, // 25 - 'SCIDEGESTION'=>0, // 26 - 'COOPRATIVEDEPRODUCTIONANONYMECAPITALVARIABLE'=>0, // 25 - 'COOPRATIVEDECOMMERANTSDTAILLANTS'=>0, // 25 - 'SOCITENCOMMANDITEPARACTIONSMEMBREDELACOMMUNAUTEUROPENNEOUPARTIELACCORDSURLESPA'=>0, // 25 - 'SCPROFESSIONNELLEDHUISSIERS'=>0, // 25 - 'SOCITDEDROITANGLAIS'=>0, // 24 - 'ASSOCIATIONRGIEPARLALOIDE'=>9220, // 24 - 'EU'=>0, // 24 - 'SOCITCOOPRATIVECRDITCAPITALVARIABLEARL'=>0, // 24 - 'SOCITDEPRESSE'=>0, // 24 - 'SKA'=>0, // 45 - 'SOCIETEANOMYMEDECONOMIEMIXTE'=>0, // 24 - 'SOCITDEFAIT'=>0, // 24 - 'COOPRATIVEDEPRODUCTIONRESPONABILITLIMITEETCAPITALVARIABLE'=>0, // 24 - 'SANONMEMBREDELACEE'=>0, // 30 - 'SAEMCONSEILDADMINISTRATION'=>0, // 24 - 'COOPRATIVEDECONSOMMATIONENSA'=>0, // 44 - 'SAR'=>0, // 28 - 'SCIDELOCATION'=>0, // 25 - 'SICAVCAPITALVARIABLE'=>0, // 23 - 'SOCIETEPARACTIONSSIMPLIFIEECOOPERATIVEACAPITALVARIABLE'=>0, // 23 - 'SACOOPDINTRTCOLLECTIFPOURLACCESSIONLAPROPRIT'=>0, // 31 - 'RL'=>0, // 23 - 'SOCITTRANGRENONISSUEDELESPACEECONOMIQUEEUROPEN'=>0, // 23 - 'SOCITDASSURANCEMUTUELLE'=>0, // 23 - 'SCPATRIMONIALE'=>0, // 23 - 'SOCITENPARTICIPATION'=>0, // 23 - 'SCASSOCIUNIQUE'=>0, // 23 - 'SCPROFESSIONNELLEDHUISSIERSDEJUSTICE'=>0, // 23 - 'UNIONDECONOMIESOCIALECOOPERATIVEARESPONSABILITELIMITEE'=>0, // 23 - 'SAADIRECTOIRE'=>0, // 23 - 'SOCITDEGROUPEDASSURANCEMUTUELLE'=>0, // 23 - 'SOCIETEANONYMEAUCAPITALETPERSONNELVARIABLE'=>0, // 23 - 'SOCIETEPARACTIONS'=>0, // 23 - 'SACOOPRATIVEOUVRIREDEPRODUCTIONETDECRDITCONSEILDADMINISTRATION'=>0, // 23 - 'SRCP'=>0, // 23 - 'UNIONDCONOMIESOCIALESARLCOOPRATIVE'=>0, // 25 - 'STECOOPERATOUVRIEREDEPRODUCTIONANONYMEACAPITALVARIABLE'=>0, // 22 - 'SACOOPRATIVEDEPRODUCTIONDHLMCAPITALVARIABLE'=>0, // 24 - 'GROUPEMENTAGRICOLEFONCIER'=>0, // 22 - 'SOCITANONYMEDIRECTOIREDECONOMIEMIXTE'=>0, // 22 - 'SOCITANONYMECONSEILDADMINISTRATIONDHABITATIONLOYERMODRDELOCATION'=>0, // 22 - 'SARLCAPITALETPERSONNELVARIABLES'=>0, // 39 - 'SRLELU'=>0, // 26 - 'SOCITCIVILEAYANTPOUROBJETLACONSTRUCTIONDIMMEUBLES'=>0, // 22 - 'SACOOPRATIVEOUVRIREDEPRODUCTION'=>0, // 43 - 'SICAFORMEANONYME'=>0, // 22 - 'SOCITPARACTIONSSIMPLIFIECAPITALVARIABLEETASSOCIUNIQUE'=>0, // 22 - 'STEDEXERCICELIBERALARESPONSABILITELIMITEEUNIPERSONNELLE'=>0, // 21 - 'SICAVCONSEIL'=>0, // 21 - 'SOCIETECIVILECONSTRUCTIONVENTE'=>0, // 21 - 'EURLACAPITALVARIABLE'=>0, // 37 - 'SAC'=>0, // 27 - 'SAOS'=>0, // 22 - 'SACAPITALETPERSONNELVARIABLES'=>0, // 21 - 'COOPRATIVEARTISANALE'=>0, // 21 - 'ADMINISTRATIONPUBLIQUE'=>0, // 20 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONRESPLIMITEETCAPITALVARIABLE'=>0, // 20 - 'SOCIETEANONYMEACONSEILDADMINISTRATION'=>0, // 20 - 'ADMINTERDITAURCS'=>0, // 20 - 'SOCIETEANONYMECOOPERATIVEMARITIME'=>0, // 20 - 'SOCIETEARESPONSABILITELIMITEEARTISANALE'=>0, // 20 - 'SADC'=>0, // 20 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFESSIONLIBRALEPARACTIONSIMPLIFIE'=>0, // 20 - 'SCCOOPRATIVEAGRICOLECAPITALVARIABLE'=>0, // 20 - 'COMMUNE'=>0, // 20 - 'UNIONDCONOMIESOCIALESOCITANONYMECOOPRATIVECAPITALVARIABLE'=>0, // 20 - 'UNIONCOOPRATIVEAGRICOLECAPITALVARIABLE'=>0, // 20 - 'SOCITCAUTIONMUTUELLE'=>0, // 28 - 'SACOOPRATIVEOUVRIREDEPRODETCRDITCONSEILDADMCAPITALVARIABLE'=>0, // 19 - 'ASARL'=>0, // 19 - 'OFFICEPUBLIC'=>0, // 19 - 'SOCITANONYMECOOPRATIVEDECRDITCAPITALETRESPONSABILITSTATUTAIREMENTLIMITECONSEI'=>0, // 19 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFANONYMECAPITALVARIABLE'=>0, // 19 - 'SICACAPITALVARIABLE'=>0, // 19 - 'SADIRECTOIRECONSEILSURVEILL'=>0, // 20 - 'STECIVILEDEPLACEMENTCOLLECTIFIMMOBILIERCAPITALVARIABLE'=>0, // 19 - 'SOCITCIVILECOOPRATIVEDECRDIT'=>0, // 19 - 'SCENCONSTRUCTIONVENTE'=>0, // 19 - 'SOCIETEANONYMECOOPERATIVEDEBANQUEPOPULAIREACAPITALVARIABLE'=>0, // 19 - 'SCEARL'=>0, // 40 - 'SASACTIONNAIREUNIQUE'=>0, // 19 - 'SOCITDASSURANCESMUTUELLES'=>0, // 19 - 'UCA'=>0, // 20 - 'SADIRECTOIREETCONSEILDORIENTATIONETDESURVEILLANCE'=>0, // 18 - 'SOCITDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALE'=>0, // 18 - 'EXPLOITATIONAGRICOLERESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 24 - 'SELARLETASSOCIUNIQUE'=>0, // 20 - 'SARLK'=>0, // 37 - 'ORGANISMEAUTONOME'=>0, // 18 - 'GFVITICOLE'=>0, // 18 - 'SOCITCIVILEPARTICULIREDEXPLOITATIONAGRICOLE'=>0, // 18 - 'SOCITCOOPRATIVEDETRAVAILLEURSRESPONSABILITLIMITE'=>0, // 18 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFESSIONLIBRALEDAVOCATSPARACTIONSSIMPLIFIE'=>0, // 18 - 'SOCITANONYMECOOPRATIVEDINTRTCOLLECTIFCAPITALVARIABLE'=>0, // 18 - 'SACOOPRATIVEDINTRTCOLLECTIFPOURACCESSIONLAPROPRIT'=>0, // 18 - 'SCPROFESSIONNELLEDARCHITECTES'=>0, // 18 - 'SCACOOPRATIVE'=>0, // 17 - 'COOPERATIVEOUVRIEREDEPRODUCTIONANONYMEACAPITALVARIABLE'=>0, // 17 - 'SOCIETEANONYMEDECONOMIEMIXTEADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 17 - 'SACOOPRATIVEDECOMMERANTSDTAILLANTSCAPITALVARIABLE'=>0, // 21 - 'SCPDENOTAIRES'=>0, // 17 - 'SARLLIMITE'=>0, // 18 - 'SACOOPRATIVEDENTREPRISESCAPITALVARIABLE'=>0, // 31 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONFORMEANONYMECAPITALVARIABLE'=>0, // 17 - 'SOCITCOOPRATIVEDECRDITRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 22 - 'SARLASSOCIUNIQUECAPVAR'=>0, // 17 - 'SOCITDEPLACEMENTPRPONDRANCEIMMOBILIRECAPITALVARIABLEETDIRECTOIREETCONSEILDESU'=>0, // 17 - 'SASPORTIVEPROFESSIONNELLEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 17 - 'SOCIETEPARACTIONSSIMPLIFIEESAASSOCIEUNIQUE'=>0, // 17 - 'SOCITCOOPRATIVEDECAUTIONMUTUELLECAPITALVARIABLELOI'=>0, // 17 - 'SOCIETEPARACTIONSSIMPLIF'=>0, // 17 - 'SOCITCIVILECOOPRATIVECONSTPERSCAPITALVARIABLE'=>0, // 17 - 'SOCITCOOPRATIVEPARTICIPATIONOUVRIRE'=>0, // 16 - 'SDDI'=>0, // 17 - 'SADIRECTOIREDCONOMIEMIXTE'=>0, // 26 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONENLAFORMESA'=>0, // 16 - 'COOPRATIVEDEPRODUCTIONRESPONSABILITLIMITE'=>0, // 16 - 'STEASSURANCESCARACTEREMUTUE'=>0, // 16 - 'SCMU'=>0, // 16 - 'ENTREPRISEUNIPERSONNELLESPORTIVERESPONSABILITLIMITE'=>0, // 16 - 'SOCITCIVILECOOPRATIVEDECONSOMMATIONCAPITALVARIABL'=>0, // 16 - 'UNIONDESCOOPRATIVESAGRICOLESCAPITALVARIABLE'=>0, // 16 - 'SOCITNATIONALISE'=>0, // 16 - 'SACOOPRATIVEDEBANQUECAPITALVARIABLE'=>0, // 16 - 'PERSONNEMORALEDEDROITPUBLIC'=>0, // 16 - 'SCCOOPRATIVECAPITALVARIABLE'=>0, // 16 - 'SOCITDEXERCICELIBRALPARACTIONSSIMPLIFIEASSOCIUNIQUE'=>0, // 16 - 'SOCIETEDEXERCICELIBERALARESPONSABILITELIMITEEDARCHITECTU'=>0, // 16 - 'SOCITANONYMEDHLMDIRECTOIRE'=>0, // 16 - 'SOCITANONYMECOOPRATIVEDEPRODUCTIONDHLMCAPITALVARIABLE'=>0, // 16 - 'COOPRATIVEDUTILISATIONDEMATRIELAGRICOLECUMA'=>0, // 16 - 'SELASSOCIUNIQUE'=>0, // 16 - 'SOCITCOOPRATIVEDEBANQUEPOPULAIRE'=>0, // 16 - 'SOCITCOOPRATIVEDETRAVAILLEURSANONYME'=>0, // 15 - 'COOPRATIVEDEPRODUCTIONRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 15 - 'UNIONDCONOMIESOCIALECOOPRATIVERESPONSABILITLIMITE'=>0, // 16 - 'SOCIETECOOPERATIVEMARITIMEARESPONSABILITELIMITEE'=>0, // 15 - 'SICARESPONSABILITLIMITE'=>0, // 15 - 'SOCITCIVILEPROFESSIONNELLEDEMASSEURSKINSITHRAPEUTES'=>0, // 17 - 'SOCITTANONYMECONSEILDADMINISTRATIONDHLM'=>0, // 15 - 'SCDEPARTICIPATIONS'=>0, // 15 - 'SOCIETEANONYMENATIONALISEEACONSEILDADMINISTRATION'=>0, // 15 - 'SAK'=>0, // 20 - 'SYNDICATPROFESSIONNEL'=>0, // 15 - 'SCKCON'=>0, // 15 - 'SADIRECTOIREETCONSEILDADMINISTRATION'=>0, // 18 - 'SOCITCIVILEDEPLACEMENTCOLLECTIFIMMOBILIER'=>0, // 15 - 'GROUPEMENTDINTERETECONOMIQUEACAPITALVARIABLE'=>0, // 15 - 'SOCITCIVILEFAISANTAPPELPUBLICLPARGNE'=>0, // 15 - 'SCDEPLACEMENTSIMMOBILIERS'=>0, // 15 - 'SOCITANONYMECOOPRATIVEDENTREPRISECAPITALVARIABLE'=>0, // 15 - 'COOPRATIVEDECRDITCAPITALVARIABLEENSARL'=>0, // 18 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFRESPONSLIMITEETCAPITALVARIABLE'=>0, // 15 - 'SAACONSEILDADMINISTRATION'=>0, // 15 - 'SCPROFESSIONNELLEDAVOCAT'=>0, // 15 - 'FORMEJURIDIQUEINDTERMINE'=>0, // 15 - 'SADHABITATIONLOYERMODR'=>0, // 15 - 'SAPARTICIPATIONOUVRIRE'=>0, // 15 - 'SACD'=>0, // 21 - 'SOCITANONYMECOOPRATIVEDEBANQUECAPITALFIXE'=>0, // 14 - 'COOPRATIVEDECRDITCAPITALVARIABLEETRESPSTATUAIREMENTLIMITE'=>0, // 14 - 'EUARLASSOCIUNIQUE'=>0, // 16 - 'SKP'=>0, // 14 - 'SCISOCITENLIQUIDATION'=>0, // 20 - 'MONSIEUR'=>0, // 14 - 'SOCITCOOPRATIVECAPITALVARIABLEAMPRESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 17 - 'UNIONDCONOMIESOCIALE'=>0, // 14 - 'SCIENLIQUIDATION'=>0, // 15 - 'SKACV'=>0, // 16 - 'COOPERATIVEOUVRIEREDEPRODUCTIONENARLETCAPITALVARIABLE'=>0, // 14 - 'SCPARTICULIRECAPITALVARIABLE'=>0, // 14 - 'SADEXERCICELIBRAL'=>0, // 14 - 'SARLASSOCI'=>0, // 15 - 'SOCITCIVILEIMMOBILIREDEGESTION'=>0, // 14 - 'SOCITDINTRTCOLLECTIFAGRICOLECIVIL'=>0, // 14 - 'SOCITANONYMECOOPRATIVEDECOMMERANTSDTAILLANTSCAPITALVARIABLE'=>0, // 14 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFFORMESARLCAPITALVARIABLE'=>0, // 14 - 'SOCITENCOMMANDITEPARACTIONSMEMBREDELUE'=>0, // 14 - 'SOCITCIVILEFONCIRE'=>0, // 14 - 'SADEPRODUCTIONCAPITALVARIABLE'=>0, // 14 - 'GISL'=>0, // 15 - 'SARLPLURIPERSONNELLE'=>0, // 13 - 'STE'=>0, // 13 - 'SARLASSOCIUNIQUESOCITENLIQUIDATION'=>0, // 14 - 'SOCITCIVILEDEXPLOITATION'=>0, // 13 - 'ASSOCIATIONLOIMETTANTDESOBLIGATIONS'=>9220, // 13 - 'COOPRATIVECAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 13 - 'UNIONDECONOMIESOCIALESOCIETECOOPERATIVEANONYME'=>0, // 13 - 'SCPROFESSIONNELLEDEDIRECTEURSDELABORATOIRESDANALYSESDEBIOLOGIEMDICALE'=>0, // 13 - 'SU'=>0, // 13 - 'SADI'=>0, // 30 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLESAS'=>0, // 13 - 'SOCITRESPONSABILITLIMITEDEPRESSECAPITALVARIABLE'=>0, // 13 - 'STEANONYMEDECONOMIEMIXTE'=>0, // 13 - 'UNIONDESOCITSCOOPRATIVESCONSEILDADMINISTRATION'=>0, // 13 - 'SOCIETEARESPONSABILITELIMITEECOOPERATIVEDECONSOMMATION'=>0, // 13 - 'EUROS'=>0, // 131 - 'SCPROFESSIONNELLEDAVOUS'=>0, // 13 - 'GFACAPITALVARIABLE'=>0, // 14 - 'N'=>0, // 13 - 'SOCITCIVILEPROFESSIONNELLEDECHIRURGIENSDENTISTES'=>0, // 13 - 'SRCV'=>0, // 13 - 'SOCIETEARESPONSABILITELIMITEEASSOCIEUNIQUEEURL'=>0, // 13 - 'SADIRECTOIREETCONSEILDESURVEILLANCECAPITALVARIABLE'=>0, // 13 - 'SACOOPRATIVEDINTRTCOLLECTIFAGRICOLECONSEILDADMINISTRATION'=>0, // 13 - 'SOCIETECOOPERATIVEDECAUTIONMUTUELLELOI'=>0, // 12 - 'COOPRATIVEPRODUCTIONARLCAPITALVARIABLE'=>0, // 12 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 13 - 'SACOOPRATIVEDECONSOMMATION'=>0, // 13 - 'SARLCOOPRATIVEOUVRIREDEPRODUCTION'=>0, // 12 - 'SOCIETEANONYMEADIRECTOIREETCONSEILDESURV'=>0, // 12 - 'SOCITCIVILEPROFESSIONNELLEDAVOCATSAUCONSEILDETATETLACOURDECASSATION'=>0, // 12 - 'SCSOCITENLIQUIDATION'=>0, // 15 - 'SOCIETECOOPERATIVEDINTERETCOLLECTIFAGRICOLEAFORMECIVILE'=>0, // 12 - 'STEANONYMESPORTIVEPROFESSIONNELLEACONSEILDADMINISTRATION'=>0, // 12 - 'SOCITAGRICOLE'=>0, // 12 - 'SARLUNIPERSONELLE'=>0, // 19 - 'SOCITANONYMEEUROPENNE'=>0, // 12 - 'SARLCOOPRATIVEMARITIME'=>0, // 19 - 'SARLSOCITENDISSOLUTION'=>0, // 15 - 'SARLASSOCIUNIQUECAPVARIAB'=>0, // 12 - 'SELARLCAPITALVARIABLE'=>0, // 12 - 'SACH'=>0, // 13 - 'SOCITANONYMECONSEILDESURVEILLANCE'=>0, // 12 - 'SOCITDEDROITEUROPEN'=>0, // 12 - 'SOCIETECOOPERATIVEARTISANALEARESPLIMITEEETACAPITALVARI'=>0, // 12 - 'SASV'=>0, // 15 - 'SELENCOMMANDITEPARACTIONS'=>0, // 11 - 'SCACV'=>0, // 11 - 'COOPERATIVEDECONSOMMATIONANONYMEACAPITALVARIABLE'=>0, // 11 - 'COMMUNAUTTERRITORIALE'=>0, // 11 - 'SOCIETECIVILEPARTICULIEREACAPITALVARIABLE'=>0, // 11 - 'AUTRESFORMESJURIDIQUES'=>0, // 11 - 'SOCITCOOPRATIVECAPITALVARIABLERESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 11 - 'SACOOPRATIVEDEBANQUE'=>0, // 11 - 'SOCITCOOPRATIVEDECONSOMMATIONENLAFORMESA'=>0, // 11 - 'SACONSEILDESURVEILLANCEETDIRECTOIRE'=>0, // 12 - 'SCPA'=>0, // 15 - 'SOCITPRIVEPARACTIONS'=>0, // 11 - 'SAEMDIRECTOIRE'=>0, // 11 - 'SOCIETEANONYMEDECONOMIEMIXTE'=>0, // 11 - 'SCPROFESSIONNELLEDECHIRURGIENSDENTISTES'=>0, // 11 - 'STEANONYMECOOPERATIVEDINTERETCOLLECTIFACAPITALVARIABLE'=>0, // 11 - 'SADCONOMIEMIXTECONSEILDADMINISTRATION'=>0, // 12 - 'SOCITANONYMECOOPRATIVEDINTRTCOLLECTIFPOURACCESSIONLAPROPRIT'=>0, // 11 - 'SAOBJETSPORTIF'=>0, // 11 - 'SOCIETEDEXERCICELIBERALARESPONSABILITELIMITEE'=>0, // 12 - 'ENTREPRISEUNIPERSONNELLEARESPONSABILITELIMITEEETACAPITAL'=>0, // 11 - 'SADHLMDIRECTOIRE'=>0, // 11 - 'SOCITCIVILEPROFESSIONNELLEDEGEOMTRESEXPERTS'=>0, // 11 - 'SOCITANONYMECOOPRATIVECONSEILDADMINISTRATION'=>0, // 11 - 'GROUPEMENTFONCIERVITICOLE'=>0, // 11 - 'SOCITCIVILECOOPRATIVEAGRICOLECAPITALVARIABLE'=>0, // 11 - 'SOCIETECOOPERATIVEDECONSOMMATIONANONYME'=>0, // 11 - 'BANQUECOOPRATIVERGIEPARLALOINDUJUIN'=>0, // 11 - 'SCPARTICULIREDINVESTISSEMENT'=>0, // 11 - 'SASUNIPERSONNELLEASSOCIUNIQUE'=>0, // 12 - 'SOCIETEANONYMEADIRECTOIREETCONSEILDORIENTATIONETSURVEIL'=>0, // 10 - 'SACOOPRATIVEDEBANQUEPOPULAIRECAPITALVARIABLE'=>0, // 10 - 'SOCITDEGESTIONPATRIMONIALE'=>0, // 10 - 'SOCITCOOPRATIVEDEBANQUECAPITALVARIABLE'=>0, // 10 - 'SASCOOPRATIVE'=>0, // 11 - 'SELASASSOCIUNIQUE'=>0, // 10 - 'SARLASSOCIUNIQUEUNIQUE'=>0, // 10 - 'SOCIETECOOPERATIVEDETRAVAILLEURSANONYME'=>0, // 10 - 'SACOOPRATIVEDIRECTOIREETCONSEILDESURVEILLANCECAPITALVARIABLE'=>0, // 10 - 'SARLCCV'=>0, // 11 - 'SOCITCIVILEPROFESSIONNELLEDEDIRECTEURSDELABORATOIRESDANALYSESDEBIOLOGIEMDICALE'=>0, // 10 - 'SOCIETEARESPONSABILITELIMITEEACARACTEREUNIPERSONNEL'=>0, // 10 - 'SARLOUVRIREDEPRODUCTIONCAPITALVARIABLE'=>0, // 10 - 'SCICV'=>0, // 14 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFCAPITALVARIABLE'=>0, // 10 - 'SOCIETEDEXERCICELIBERALPARACTIONSSIMPLIFIEESSELAS'=>0, // 10 - 'SP'=>0, // 10 - 'SOCITPARACTIONSSIMPLIFIEUNIPERSONNELLECAPITALVARIABLE'=>0, // 10 - 'COLR'=>0, // 12 - 'STECOOPERATIVESARLACAPITALVARIABLE'=>0, // 10 - 'CUMACAPITALVARIABLE'=>0, // 14 - 'SCCOOPRATIVECAPITALETPERSONNELVARIABLES'=>0, // 9 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 9 - 'SOCITCOOPRATIVEANONYMEDINTRTCOLLECTIFAGRICOLECAPITALVARIABLE'=>0, // 9 - 'SOCITCOOPRATIVEVINICOLE'=>0, // 9 - 'SACOOPRATIVEDINTRTCOLLECTIFCAPITALVARIABLE'=>0, // 9 - 'SOCITDCONOMIEMIXTEDIRECTOIRE'=>0, // 9 - 'COOPERATIVEDETRANSPORTSROUTIERS'=>0, // 9 - 'SELASU'=>0, // 10 - 'SOCITDEDROITALLEMAND'=>0, // 9 - 'SOCITCOOPRATIVEANONYMECAPITALVARIABLE'=>0, // 9 - 'SOCIETECOOPERATIVEDECAUTIONMUTUELLEACAPITALVARIABLELOI'=>0, // 9 - 'COOPRATIVEDECRDITRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 9 - 'SARLASSOCIUNIQUEENLIQUIDATION'=>0, // 15 - 'SCDECRDITCAPITALVARIABLE'=>0, // 9 - 'SASUNIPERSONELLE'=>0, // 9 - 'SOCITCOOPRATIVEMARITIMERESPONSABILITLIMITECAPITALVARIABLE'=>0, // 9 - 'SAASSOCIUNIQUE'=>0, // 10 - 'SOCITDINVESTISSEMENTSCAPITALVARIABLECONSEILDADMINISTRATION'=>0, // 9 - 'SNCASSOCIUNIQUE'=>5202, // 9 - 'SOCITRESPONSABILITLIMIT'=>0, // 9 - 'CRDITMARITIMECAPITALVARIABLE'=>0, // 9 - 'SOCIETECOOPERATIVEOUVRIEREDEPRODUCTIONASA'=>0, // 16 - 'SARLASSOCIUNQIUE'=>0, // 9 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLECAPITALVARIABLE'=>0, // 9 - 'SARLCOOPRATIVEDETRAVAILLEURS'=>0, // 9 - 'SOCITANONYMEPUBLIQUELOCALEDAMNAGEMENT'=>0, // 9 - 'SOCITCIVILEPROFESSIONNELLEDHUISSIERS'=>0, // 9 - 'UNIONDESOCITSCOOPRATIVESFORMEANONYME'=>0, // 9 - 'SCPI'=>0, // 9 - 'SCCOOPRATIVEDECONSOMMATEURSCAPITALVARIABLE'=>0, // 9 - 'SCARL'=>0, // 9 - 'TABLISSEMENTDECRDITBUTNONLUCRATIF'=>0, // 9 - 'SARLCARACTREUNIPERSONNEL'=>0, // 9 - 'STEDEXERCICELIBERALUNIPERSONNELLEARESPONSABILITELIMITEE'=>0, // 9 - 'SOCIETEANONYMEDHLMADIRECTOIRE'=>0, // 9 - 'RARL'=>0, // 14 - 'SCOPRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 9 - 'SOCITDEDROITANGLAISPRIVATELIMITEDCOMPANY'=>0, // 12 - 'SOCITCIVILECOOPRATIVEDECONSOMMATION'=>0, // 9 - 'SOCITDINVESTISSEMENTSCAPITALVARIABLEETCONSEIL'=>0, // 13 - 'SCDEXPLOITATIONVITICOLE'=>0, // 9 - 'SCDEPARTICIPATION'=>0, // 9 - 'SCV'=>0, // 11 - 'SOCITANONYMECOOPRATIVEDECOMMERANTSDTAILLANTSCONSEILDADMINISTATION'=>0, // 9 - 'SOCITCIVILEPROFESSIONNELLEDAVOUS'=>0, // 9 - 'SOCITCIVILEPROFESSIONNELLEDECOMMISSAIRESPRISEURS'=>0, // 15 - 'SCOPANONYMEPERSONNELETCAPITALVARIABLES'=>0, // 9 - 'SCPROFESSIONNELLEDECOMMISSAIRESPRISEURS'=>0, // 15 - 'SASUASSOCIUNIQUE'=>0, // 9 - 'UNIONDECOOPERATIVESACAPITALVARIABLELOI'=>0, // 9 - 'SOCIETECIVILEEXPLOITATIONAGRICOLEARESPONSABILITELIMITEE'=>0, // 9 - 'SCPCAPITALVARIABLE'=>0, // 8 - 'ASSOCIATIONLOIDE'=>9220, // 8 - 'SOCITCIVILEDEGESTION'=>0, // 8 - 'SOCITRRESPONSABILITLIMITE'=>0, // 8 - 'SCPRL'=>0, // 8 - 'SPAITALIENNE'=>0, // 8 - 'SN'=>0, // 8 - 'SCPROFESSIONELLE'=>0, // 8 - 'SCRL'=>0, // 12 - 'SUARL'=>0, // 8 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONCONSEILDADMINISTRATION'=>0, // 8 - 'TABLISSEMENTPUBLICCARACTREINDUSTRIELOUCOMMERCIAL'=>0, // 8 - 'COOPRATIVEDEPRODUCTIONRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 9 - 'SCPROFESSIONNELLEDEMASSEURSKINSITHRAPEUTES'=>0, // 11 - 'SCIFAMILIALE'=>0, // 8 - 'SCAMEMBREDELUE'=>0, // 8 - 'COOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 10 - 'SCIASSOCIUNIQUE'=>0, // 10 - 'SOCITPARACTIONSSIMPLIFIEUNIPERSONNELLEASSOCIUNIQUE'=>0, // 14 - 'SOCIETECIVILECOOPERATIVEVINICOLE'=>0, // 8 - 'SARLCOOPRATIVECONSOMCAPITALVARIABLE'=>0, // 8 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLE'=>0, // 8 - 'SOCITDEXERCICELIBRALPARACTIONSIMPLIFIE'=>0, // 8 - 'SCISCPSCM'=>0, // 16 - 'FDRATION'=>0, // 8 - 'GROUPEMENTDEMPLOYEURS'=>0, // 8 - 'STECIVILE'=>0, // 8 - 'SOCITCOOPRATIVEDEPRODUCTIONCAPITALVARIABLE'=>0, // 8 - 'MADAME'=>0, // 8 - 'SARLDEFAMILLE'=>0, // 8 - 'SCCOOPRATIVEDECRDIT'=>0, // 8 - 'SOCITMUTUELLECAPITALVARIABLE'=>0, // 8 - 'SCDECONSTRUCTIONVENTEDIMMEUBLES'=>0, // 8 - 'SCICA'=>0, // 9 - 'SOCITCOOPRATIVEDECAUTIONMUTUELLE'=>0, // 8 - 'SDCS'=>0, // 9 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFESSIONLIBRALEDAVOCATSRESPONSABILITLIMITE'=>0, // 8 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONSARLCAPITALVARIABLE'=>0, // 8 - 'SACOOPDIRECTCONSEILSURV'=>0, // 16 - 'COOPRATIVEOUVRIREDEPRODUCTIONANONYMECAPITALETPERSONNELVARIABLE'=>0, // 8 - 'SCCC'=>0, // 8 - 'SACOOPRATIVEPERSONNELETCAPITALVARIABLE'=>0, // 8 - 'SACOOPRATIVEDEPRODUCTION'=>0, // 8 - 'SAENDISSOLUTION'=>0, // 9 - 'SOCIETEANONYMEDHABITATIONALOYERMODERE'=>0, // 8 - 'SARLP'=>0, // 8 - 'COOPERATIVEOUVRIEREDEPRODUCTIONACAPITALVARIABLESA'=>0, // 8 - 'SOCITPARACTIONSSIMPLIFIEDARCHITECTURECAPITALVARIABLE'=>0, // 8 - 'SOCITCCOPRATIVEMARITIME'=>0, // 8 - 'SEML'=>0, // 11 - 'SOCIETEDINTERETCOLLECTIF'=>0, // 8 - 'STEDEPARTICIPATIONSFINANCIRESRESPONSABILITLIMITE'=>0, // 8 - 'ANONYMEACAPITALVARIABLE'=>0, // 8 - 'SOCITCOOPRATIVEAGRICOLECOOPRATIVE'=>0, // 9 - 'SARLCOOPRATIVEARTISANALECAPITALVARIABLE'=>0, // 8 - 'SACOOPRATIVEDIRECTIONETCONSEILDESURVEILLANCE'=>0, // 15 - 'SCOTARLSTCOOPRATIVETRAVAILLEURS'=>0, // 7 - 'UNIONDCONOMIESOCIALECOOPRATIVEFORMEANONYME'=>0, // 7 - 'COOPERATIVEDECONSOMMATIONENSAACAPITALVARIABLE'=>0, // 7 - 'OPAC'=>0, // 8 - 'SAMUTUELLEDIRECTION'=>0, // 7 - 'SOCITCOOPRATIVEDECONSOMMATIONCAPITALVARIABLE'=>0, // 7 - 'COOPRATIVEARTISANALERESPONSABILITLIMITE'=>0, // 7 - 'SARLCOOPERATIVEDEPRODUCTIONCAPITALVARIABLE'=>0, // 7 - 'BANQUECOOPRATIVERGIEPARLALOINODUJUIN'=>0, // 13 - 'SCOPANONYMEETCAPITALVARIABLE'=>0, // 7 - 'SARLEXERCICELIBRAL'=>0, // 7 - 'SRLKOP'=>0, // 13 - 'COOPRATIVEARTISANALECONSEIL'=>0, // 12 - 'SOCITPARACTIONSMEMBREDELACOMMUNAUTEUROPENNEOUPARTIELACCORDSURLESPACECONOMIQUE'=>0, // 7 - 'SARLC'=>0, // 12 - 'COOPERATIVEACAPITALVARIABLESOCIETEANONYME'=>0, // 7 - 'SACOOPDEBANQUEPOPULAIRE'=>0, // 7 - 'SACOOPRATIVEDEPRODUCTIONDHLMCONSEILDADMINISTRATION'=>0, // 7 - 'EURLSARL'=>0, // 7 - 'SARLCOOPRATIVEDECONSOMMATION'=>0, // 9 - 'SACV'=>0, // 7 - 'TABLISSEMENTPUBLICDECOOPRATIONCULTURELLECARACTREINDUSTRIELETCOMMERCIAL'=>0, // 7 - 'SOCITANONYMEDEPRODUCTIONCAPITALVARIABLE'=>0, // 7 - 'SICAVCONSEILDADMINISTRATION'=>0, // 9 - 'SOCITCIVILEPROFESSIONNELLEDECHIRURGIENDENTISTES'=>0, // 7 - 'SARLPERSONNELVARIABLE'=>0, // 9 - 'SOCITANONYMECOOPRATIVEMARITIMECAPITALETPERSONNELVARIABLES'=>0, // 7 - 'SOCIETEANONYMECOOPERATIVEADIRECTOIREETCONSEILDESURVEILLA'=>0, // 7 - 'SCIENLIQUIDATIONAMIABLE'=>0, // 7 - 'SACOOP'=>0, // 13 - 'SCOA'=>0, // 7 - 'SACOOPRATIVEMARITIME'=>0, // 7 - 'ASSOCIATIONRGIESELONLALOI'=>9220, // 7 - 'SOCITCOOPRATIVEDECRDITCAPVARIABLEETRESPSTATUTAIREMENTLIMITE'=>0, // 7 - 'SARLCOOPRATIVEDECONSOMMATIONCAPITALVARIABLE'=>0, // 7 - 'SELACA'=>0, // 7 - 'SELA'=>0, // 8 - 'SARLASSOCIUNIQUEENDISSOLUTION'=>0, // 7 - 'SAEL'=>0, // 10 - 'SOCITOUVRIREDEPRODUCTIONFORMESARLCAPITALVARIABLE'=>0, // 7 - 'SOCIETEANONYMECOOPOUVRIEREDEPRODUCTIONCAPITALETPERSONNELVARIABLES'=>0, // 7 - 'SACOOPRATIVEDIRECTOIRE'=>0, // 8 - 'CRDITMARITIME'=>0, // 7 - 'UNIONDCONOMIESOCIALESADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 10 - 'SAEXERCICELIBRAL'=>0, // 7 - 'SCOPFORMEANONYMECAPITALETPERSONNELVARIABLES'=>0, // 9 - 'SCOPARESPONSABILITELIMITEEETACAPITALVARIABLE'=>0, // 7 - 'SARLCONSEILDADMINISTRATION'=>0, // 7 - 'SCCVENTE'=>0, // 12 - 'SOCITDINVESTISSEMENTSCAPITALVARIABLEETCONSEILDESURVEILLANCE'=>0, // 8 - 'UNIONDECONOMIESOCIALESTECOOPERATIVEANONYME'=>0, // 7 - 'SACOOPRATIVECAPITALVARIABLEDIRECTOIRE'=>0, // 7 - 'SCCCON'=>0, // 7 - 'SOCITANONYMECOOPCAPITALVARIABLEDIRECTETCONSEILDESURVEILLANCE'=>0, // 7 - 'SOCITCIVILEDEPARTICIPATIONOUVRIRECAPITALVARIABLE'=>0, // 7 - 'SARLASOCIUNIQUE'=>0, // 9 - 'SCDEPERSONNESCAPITALVARIABLE'=>0, // 8 - 'SOCITCIVILEDINTRTCOLLECTIFAGRICOLE'=>0, // 7 - 'PF'=>0, // 9 - 'SCPROFESIONNELLE'=>0, // 7 - 'SCAYANTPOUROBJETLACONSTRUCTIONDIMMEUBLES'=>0, // 8 - 'SOCITCIVILEDEPORTEFEUILLESCAPITALVARIABLE'=>0, // 7 - 'SOCITRESPONSABILITLIMITECAPITALETPERSONNELVARIABLES'=>0, // 7 - 'SOCITCAPITALVARIABLE'=>0, // 6 - 'SOCITCIVILECOOPRATIVEDECRDITCAPITALVARIABLE'=>0, // 6 - 'ETABLISSEMENTPUBLICETRANGER'=>0, // 6 - 'STCIVCONSTRUCATTRIBUTION'=>0, // 6 - 'BACO'=>0, // 9 - 'SADINTRTCOLLECTIFAGRICOLECONSEILDADMINISTRATION'=>0, // 6 - 'SASENDISSOLUTION'=>0, // 6 - 'SOCIETECOOPERATIVEDINTERETCOLLECTIFAGRICOLEARESPONSABILIT'=>0, // 6 - 'STECOOPERATIVEAGRICOLE'=>0, // 6 - 'SACOOPRATIVEDEPRODUCTIONDHABITATIONSLOYERMODRETCAPITALVARIABLE'=>0, // 6 - 'SOCIETEANONYMECOOPERATIVEDENTREPRISESACAPITALVARIABLE'=>0, // 6 - 'SADIRECTOIREETACONSEILDESURVEILLANCE'=>0, // 6 - 'RUEDUMARCHALJOFFRE'=>0, // 6 - 'SELU'=>0, // 7 - 'STPARTFINDEPROFLIBRALES'=>0, // 6 - 'SACOOPRATIVEINTRTCOLLECTIFPOURLACCESSIONPROPRIT'=>0, // 6 - 'CHEMINDUMOULINNEUF'=>0, // 6 - 'COOPRATIVECAPITALVARIABLERESPONSABILITLIMITE'=>0, // 6 - 'SNCENLIQUIDATION'=>5202, // 6 - 'SOCITDASSURANCEMUTUELLEVIECAPITAL'=>0, // 8 - 'SARLCOOPRATIVEOUVRIREDEPRODUCTIONETDECRDIT'=>0, // 6 - 'GROUPEMENTPASTORAL'=>0, // 6 - 'SOCIETEECONOMIEMIXTE'=>0, // 6 - 'SASPORTIVEPROFESSIONNELLECONSEILDADMINISTRATION'=>0, // 7 - 'SAL'=>0, // 10 - 'SADHLMDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 6 - 'SOCITENCOMMANDITEDEDROITTRANGER'=>0, // 6 - 'SADCONOMIEMIXTEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 6 - 'ASSOCIUNIQUE'=>0, // 6 - 'SACPV'=>0, // 6 - 'SCCOOPRATIVEDECONSTRUCTIONPERSONNELETCAPITALVARIABLES'=>0, // 10 - 'SCPSOCITTITULAIREDOFFICENOTARIAL'=>0, // 8 - 'RGIEMUNICIPALE'=>0, // 6 - 'SARLAU'=>0, // 8 - 'STECOOPERATIVEAGRICOLEACAPITALVARIABLE'=>0, // 6 - 'SELARLDEXERCICELIBRE'=>0, // 6 - 'SOCITRESPONSABILITELIMITE'=>0, // 6 - 'SOCITDASSURANCE'=>0, // 6 - 'SOCIETEARESPONSABILITELIMITEEDINTERETCOLLECTIFAGRICOLE'=>0, // 6 - 'SOCITRESPONSABILITLIMITASSOCIUNIQUE'=>0, // 7 - 'SARLCONSTITUDUNASSOCIUNIQUE'=>0, // 6 - 'SOCIETEANONYMECOOPERATIVEDEPRODUCTION'=>0, // 6 - 'SOCITANONYMECOOPRATIVEDACHATENCOMMUNCAPITALETPERSONNELVARIABLES'=>0, // 6 - 'SOCITCIVILEDEDROITTRANGER'=>0, // 6 - 'SARLCOP'=>0, // 7 - 'COOPRATIVEOUVRIREDEPRODUCTIONFORMEANONYMECAPITALETPERSONNELVARIABLES'=>0, // 6 - 'SCPARTICIPATIONOUVRIRECAPITALVARIABLE'=>0, // 6 - 'SOCIETEPARACTIONSSIMPLIFIEESACAPITALVARIABLE'=>0, // 6 - 'SCF'=>0, // 6 - 'SOCITANONYMECONSEILDESURVEILLANCEETDIRECTOIRE'=>0, // 6 - 'SLA'=>0, // 6 - 'SASA'=>0, // 6 - 'SASSOCIETEPARACTIONSSIMPLIFIE'=>0, // 6 - 'SOCITCIVILEIMMOBILIRECONSTRUCTIONVENTE'=>0, // 6 - 'SOCITDECAUTIONMUTUELLECOOPRATIVE'=>0, // 6 - 'SCENLIQUIDATION'=>0, // 7 - 'COOPRATIVEARTISANALEDIRECTOIRE'=>0, // 6 - 'SOCITDECAUTIONMUTUELLELOIDUMARS'=>0, // 6 - 'SOCITECIVILECOOPRATIVEDECRDIT'=>0, // 6 - 'SOCITCIVILEIMMOBILIREFAMILIALE'=>0, // 6 - 'SOCITENCOMMANDITEPARACTION'=>0, // 6 - 'TETINDUSTRIE'=>0, // 6 - 'SOCIETEENCOMMANDITESIMPLEACAPITALVARIABLE'=>0, // 6 - 'SELR'=>0, // 6 - 'ENTUNIPERSONARESPLIMITEE'=>0, // 6 - 'STEDEDROITTRANGER'=>0, // 6 - 'SCDEXPLOITATIONOSTRICOLE'=>0, // 6 - 'TABLISSEMENTDECRDITCOOPRATIFETMUTUALISTE'=>0, // 6 - 'SACOOPERATIVEDECOMMERCANTSDETAILLANTSACAPITALVARIABLE'=>0, // 6 - 'SELEUARL'=>0, // 6 - 'SOCITANONYMEDECONSOMMATIONCAPITALVARIABLEDIRECTOIRE'=>0, // 6 - 'SG'=>0, // 6 - 'SOCITDEXERCICELIBRALDAVOCATSFORMEANONYME'=>0, // 6 - 'SOCITPARACTIONSSIMPLIFIES'=>0, // 6 - 'SADEDROITTRANGER'=>0, // 6 - 'SCPROFESSIONNELLEDINFIRMIRES'=>0, // 6 - 'SOCITCOOPRATIVEAGRICOLELAITIRE'=>0, // 6 - 'SCPDEMASSEURSKINSITHRAPEUTES'=>0, // 8 - 'SOCITANONYMESOCITDHABITATIONDELOYERMODR'=>0, // 5 - 'SARLRESPONSABILITLIMITE'=>0, // 6 - 'SARLCOOPRATIVEDEPRODUCTION'=>0, // 5 - 'SADEDROITSUISSE'=>0, // 5 - 'SE'=>0, // 5 - 'USRL'=>0, // 7 - 'SOCITANONYMECOOPRATIVEDEPRODUCTIONDHLMCONSEILDADMINISTRATION'=>0, // 9 - 'SCENDISSOLUTION'=>0, // 5 - 'SARLEL'=>0, // 5 - 'SKOPACV'=>0, // 5 - 'CREDITMARITIMEACAPITALVARIABLES'=>0, // 5 - 'SOCITDINVESTISSEMENTCAPITALVARIABLEDACTIONNARIATSALARIS'=>0, // 5 - 'SOCITCOOPRATIVEDETRAVAILLEURSFORMESARL'=>0, // 5 - 'SADIRECTOIRECONSEILDORIENTATIONETDESURVEILLANCE'=>0, // 6 - 'BANQUECOOPERATIVEREGIEPARLALOINDUJUIN'=>0, // 5 - 'SICAFANONYMECONSEIL'=>0, // 5 - 'STECOOPERATIVEOUVRIEREDEPRODUCTIONARESPONSABILITELIMITEE'=>0, // 5 - 'STEXLIBRALRESPONSABILITLIMITE'=>0, // 5 - 'SOCITCOOPRATIVEDECONSOMMATIONCAPITALETPERSONNELVARIABLES'=>0, // 5 - 'GP'=>0, // 5 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLEFORMESACAPITALVARIABLE'=>0, // 5 - 'SCOPETDECRDITRESPONSABILITLIMITE'=>0, // 5 - 'STECOOPERATIVEDINTERETCOLLECTIFARLACAPITALVARIABLE'=>0, // 5 - 'APM'=>0, // 5 - 'SOCITCIVILECOOPRATIVEENTREMDECINS'=>0, // 5 - 'SCPROFESSIONNELLEDECOMMISSAIRESAUXCOMPTES'=>0, // 5 - 'SOCITCIVILEPROFESSIONNELLEDARCHITECTURE'=>0, // 5 - 'SOCITDROITTRANGER'=>0, // 5 - 'SCPROFESSIONNELLEDAVOCATSAUXCONSEILS'=>0, // 5 - 'COOPRATIVEARTISANALEENSARL'=>0, // 5 - 'SLAS'=>0, // 5 - 'SARLASSOCIUNIQUEUNIPERSONNELLE'=>0, // 6 - 'SOCITCIVILEDEXPLOITATIONAGRICOLEETVITICOLE'=>0, // 5 - 'SELARLACAPITALVARIABLE'=>0, // 5 - 'BANQUECOOPRATIVEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 5 - 'COOPRATIVEOUVRIREDEPRODUCTIONANOMYNECAPITALETPERSONNELVARIABLE'=>0, // 5 - 'PERSONNEPHYSIQUE'=>0, // 5 - 'SACAPITALFIXECOOPRATIVEDEBANQUE'=>0, // 9 - 'SOCITANONYMECOOPRATIVEDINTRTCOLLECTIFDEHLM'=>0, // 5 - 'SOCITCOOPRATIVEAGRICOLECAPITALETPERSONNELVARIABLES'=>0, // 5 - 'SCOOP'=>0, // 9 - 'SOCITCOOPRATIVEDETRAVAILLEURSFORMEANONYME'=>0, // 5 - 'RARLASSOCIUNIQUE'=>0, // 9 - 'SCOPRESPONSABILITETCAPITALVARIABLE'=>0, // 5 - 'COMITDENTREPRISE'=>0, // 5 - 'SOCITCIVILEPROFESSIONNELLEDEDIRECTEURSDELABORATOIRES'=>0, // 5 - 'SELUNIPERSONNELLE'=>0, // 5 - 'SCPDEXPLOITATIONAGRICOLE'=>0, // 5 - 'SCPDHUISSIERS'=>0, // 5 - 'SOCITDETITRISATIONSOUSFORMEDESOCITANONYME'=>0, // 5 - 'SAKCV'=>0, // 5 - 'SACOOPRATIVEDENTREPRISECAPITALVARIABLE'=>0, // 5 - 'SCPROFESSIONNELLEDEDIRECTEURSDELABORATOIRES'=>0, // 5 - 'ASSOCIATIONRGIESELONLALOIDUERJUILLET'=>9220, // 5 - 'SARLDEDROITTRANGER'=>0, // 5 - 'STEDEXERCICELIBERALRESPONSABILITELIMITEE'=>0, // 5 - 'STEPARACTIONSSIMPLIFIEE'=>0, // 5 - 'CHEMINDESVERNESZONEINDUSTRIELLE'=>0, // 5 - 'ASSOCIATIONDEDROITLOCALSANSBUTLUCRATIF'=>9220, // 5 - 'SICARESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 7 - 'SOCITCOOPRATIVEANONYEDINTRTCOLECTIFAGRICOLEETCAPITALVARIABLE'=>0, // 5 - 'SACOOPRATIVEDETRAVAILLEURS'=>0, // 5 - 'SCPTITULAIREDOFFICENOTARIAL'=>0, // 5 - 'SARLDEDROITALLEMAND'=>0, // 5 - 'STCOOPDECRDITCAPITALVARIABLEETRESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 5 - 'SACICAPSACOOPINTRTCOLLPOURACCESSIONLAPROPRIT'=>0, // 5 - 'EURLRESPONSABILITLIMITE'=>0, // 5 - 'SOCIETECOOPERATIVEMARITIMEARESPONSABILITELIMITEEACAPITAL'=>0, // 5 - 'SARLRDUITEUNASSOCIUNIQUE'=>0, // 5 - 'SACOOPRATIVEINTRETCOLLECTIFACCESSIONLAPROPRIT'=>0, // 5 - 'SCAC'=>0, // 6 - 'SCDECOOPRATIVEAGRICOLE'=>0, // 5 - 'SOCITPARACTIONSSIMPLIFIEPLURIPERSONNELLE'=>0, // 5 - 'SOCITCIVILEAGRICOLECOOPRATIVE'=>0, // 5 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITETCAPITALVARIABLE'=>0, // 5 - 'SOCITCIVILEDEGESTIONDEBIENSIMMOBILIERS'=>0, // 5 - 'SADCS'=>0, // 6 - 'SARO'=>0, // 5 - 'SOCIETEANONYMEDEXPERTISECOMPTABLE'=>0, // 5 - 'SARLCOOPRATIVEDETRANSPORT'=>0, // 5 - 'SCCA'=>0, // 10 - 'REPRSENTATIONCOMMERCIALEDTABLISSEMENTPUBLICTRANGER'=>0, // 5 - 'SACOOPRATIVECAPITALVARIABLEETDIRECTOIRE'=>0, // 6 - 'SOCITCIVILEIMMOBILRE'=>0, // 5 - 'NONINSCRIT'=>0, // 5 - 'SOCITCOOPRATIVEDETRAVAILLEURS'=>0, // 9 - 'SOCITCOOPRATIVEIC'=>0, // 5 - 'SICASOUSFORMEDESOCITANONYME'=>0, // 5 - 'SCAYANTPOUROBJETLACONSTRUCTIONDIMMEUBLESVENTE'=>0, // 7 - 'COOPERATIVEARESPONSABILITELIMITEEACAPITALVARIABLE'=>0, // 5 - 'SCPROFESSIONNELLEASSOCIUNIQUE'=>0, // 5 - 'SCICAA'=>0, // 5 - 'SALRL'=>0, // 5 - 'SAANONYMEACONSEILDADMINISTRATION'=>0, // 5 - 'SOCIETECOOPERATIVEARTISANALEARESPONSABILITELIMITEEETACAP'=>0, // 5 - 'CM'=>0, // 5 - 'STECIVILECAPITALRIABLE'=>0, // 5 - 'SACS'=>0, // 6 - 'SOCITRESPONSABILITLIMITEDEPRESSEASSOCIUNIQUE'=>0, // 5 - 'SRLCOP'=>0, // 5 - 'SCPROFESSIONNELLEDARCHITECTURE'=>0, // 5 - 'SCAL'=>0, // 5 - 'UNIONDECOOPRATIVESCAPITALVARIABLE'=>0, // 4 - 'SOCITAGRICOLESAUFCOOPR'=>0, // 4 - 'SOCITANONYMECOOPRATIVEDECONSOMMATION'=>0, // 4 - 'SOCITDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALEPARACTIONSSIMPLIFIE'=>0, // 4 - 'SARLNONMEMBREDELACEE'=>0, // 5 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 4 - 'SCPOANONYME'=>0, // 4 - 'COMITDTABLISSEMENT'=>0, // 4 - 'SOCITAGRICOLESAUFCOOPRATIVE'=>0, // 4 - 'SELPARACTIONSSIMPLIFIE'=>0, // 4 - 'SOCITDINTRTCOLLECTIFAGRICOLECOOPRATIVE'=>0, // 4 - 'CICV'=>0, // 5 - 'SACM'=>0, // 8 - 'STDEXLIBRALRESPLIMITE'=>0, // 4 - 'SOCITRESPONSABILITLIMITEUNIPERSONNELLECAPITALVARIABLE'=>0, // 4 - 'CHEZMMEFERRIERARLETTE'=>0, // 4 - 'SOCITANONYMEDHLMCONSEIL'=>0, // 4 - 'SARLCOOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 4 - 'SICACOOPRATIVEANONYMECAPITALVARIABLE'=>0, // 4 - 'SACOOPRATIVEDECOMMERANTDTAILLANTS'=>0, // 4 - 'SELPARACTIONSSIMPLIFIES'=>0, // 4 - 'RLV'=>0, // 4 - 'SOCITCOOPRATIVEDUTILISATIONDEMATRIELAGRICOLEENCOMMUN'=>0, // 4 - 'SOCITCOOPRATIVEAGRICOLECAPITALVARIALE'=>0, // 4 - 'SOCITDEDROITESPAGNOL'=>0, // 4 - 'EARLENLIQUIDATION'=>0, // 4 - 'SARLSOCITENLIQUIDATIONAMIABLE'=>0, // 8 - 'EPCIC'=>0, // 5 - 'SOCITDECAUTIONMUTUELLECAPITALVARIABLE'=>0, // 4 - 'SARLCOOPERATIVEOUVRIEREDEPRODUCTIONETDECREDIT'=>0, // 4 - 'SOCITCIVILEDECONSTRUCTIONETDATTRIBUTION'=>0, // 4 - 'SCASSOCIUNIQUEETCAPITALVARIABLE'=>0, // 6 - 'SARLDINTRTCOLLECTIFETAGRICOLECAPITALVARIABLE'=>0, // 4 - 'SCO'=>0, // 4 - 'SOCITPARACTIONSSIMPLIFIE'=>0, // 5 - 'SEARLASSOCIUNIQUE'=>0, // 4 - 'SKOP'=>0, // 4 - 'SOCITCOMMANDITESIMPLE'=>0, // 4 - 'SOCITANONYMEDINTRTCOLLECTIFAGRICOLECONSEILDADMINIS'=>0, // 4 - 'SCCAPITALETPERSONNELVARIABLES'=>0, // 4 - 'UDC'=>0, // 4 - 'SRLELI'=>0, // 4 - 'SOCITCOOPRATIVEARTISANALERESPLIMITEETCAPVARIABLE'=>0, // 4 - 'SOCITRESPONSABILITLIMITEPLURIPERSONNELLE'=>0, // 4 - 'SAEMLOCALEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 4 - 'SARLCOOP'=>0, // 4 - 'ENTREPRISEUNIPERSONNELLEARLDEXERCICELIBERAL'=>0, // 4 - 'SOCIETEANONYMEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 4 - 'SPFRL'=>0, // 4 - 'SCPROFESSIONNELLEDAVOCATFORMECOOPRATIVE'=>0, // 4 - 'NN'=>0, // 4 - 'UCACAPITALVARIABLE'=>0, // 4 - 'VILLEDE'=>0, // 4 - 'UNIONDESSOCITSCOOPRATIVESAGRICOLESCAPITALETPERSONNELVARIABLE'=>0, // 4 - 'RUEVICTORHUGO'=>0, // 5 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLEFORMECIVILEAUCAPITALVARIABLE'=>0, // 4 - 'SARLASSOCIUNIQUEDEXERCICELIBRAL'=>0, // 4 - 'SOCITANONYMEMEMBREDELUE'=>0, // 4 - 'SOCITANONYMEDIRECTOIREETCONSEILDORIENTATIONETSURVEILLANCE'=>0, // 4 - 'COOPRATIVEARTISANALEFORMEANONYME'=>0, // 4 - 'SACOOPRATIVECONSEILDADMINISTRATION'=>0, // 4 - 'ANOCOOPDACHATENCOMMUNACAPITALETPERSONNELVARIABLES'=>0, // 4 - 'EUREX'=>0, // 4 - 'ANA'=>0, // 4 - 'SELARLUE'=>0, // 4 - 'SOCIETEDEXERCICELIBERALENCOMMANDITEPARACTIONSSELCA'=>0, // 4 - 'SAEMDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 4 - 'GROUPEMENTINTERETECONOMIQUE'=>0, // 4 - 'SCPROFESSIONNEL'=>0, // 4 - 'SCE'=>0, // 7 - 'CABI'=>0, // 4 - 'SARLCAPITALVARIABE'=>0, // 4 - 'QUARTIERLESCONDAMINES'=>0, // 4 - 'SOCITCIVILEIMMOBILIREDELOCATION'=>0, // 4 - 'SARLAVECASSOCIEUNIQUE'=>0, // 4 - 'COOPRATIVEDECONSOMMATIONANONYME'=>0, // 4 - 'SELFORMEANONYME'=>0, // 4 - 'SADCONOMIEMIXTEDIRECTOIRE'=>0, // 4 - 'SACOOPRATIVEOUVRIREDEPRODUCTIONCAPITALVARIABLE'=>0, // 4 - 'SCAGRICOLECAPITALVARIABLE'=>0, // 4 - 'FONDATION'=>0, // 4 - 'SOCITCIVILEDEXPLOITATIONOSTRICOLE'=>0, // 4 - 'SELRESPONSABILITLIMITE'=>0, // 4 - 'STDEPARTICIPATIONSFINANCIRESDEPROFLIBRALEDAVOCATSSOUSFORMEDESAS'=>0, // 4 - 'SARLCAPITALETPERSONNELVARIABLE'=>0, // 5 - 'COOPERATIVEDEPRODUCTIONARLACAPITALVARIABLE'=>0, // 4 - 'COOPERATIVEOUVRIEREDEPRODUCTIONANONYMEACAPITALETPERSONNE'=>0, // 4 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONSOUSFORMESARLCAPITALVARIABLE'=>0, // 4 - 'SRAL'=>0, // 4 - 'SOCITDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 4 - 'SADCONOMIEMIXTECONSEIL'=>0, // 4 - 'SCOPACAPITALVARIABLE'=>0, // 4 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLESICA'=>0, // 4 - 'SOCITDEPLACEMENTCOLLECTIFIMMOBILIER'=>0, // 4 - 'SASCONSEILDADMINISTRATION'=>0, // 4 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFLIBRALEDAVOCATSSOUSFORMEDESAS'=>0, // 4 - 'NP'=>0, // 4 - 'UNIONDESSOCITSCOOPRATIVESAGRICOLES'=>0, // 4 - 'SCPACV'=>0, // 6 - 'ORGANISMEMUTUALISTE'=>0, // 4 - 'SACOOPACAPITALVARIABLEADIRECTCONSEILDESURVEILLANCE'=>0, // 4 - 'SCIA'=>0, // 5 - 'SOCITCOOPRATIVEDECONSTRUCTION'=>0, // 4 - 'AUTRESOCITRESPONSABILITLIMITE'=>0, // 4 - 'SCDINTRTCOLLECTIFAGRICOLECAPITALVARIABLE'=>0, // 4 - 'SCCOOPRATIVEDECONSOMMATION'=>0, // 4 - 'ASSOCIATON'=>9220, // 4 - 'UNIONDECOOPRATIVESMARITIMESANONYMECAPITALVARIABLE'=>0, // 4 - 'SAPR'=>0, // 4 - 'SME'=>0, // 4 - 'SACOOPRATIVEDECONSOMMATIONCONSEILDADMINISTRATIONCAPITALVARIABLE'=>0, // 4 - 'RUEDUGNRALDEGAULLE'=>0, // 4 - 'URL'=>0, // 4 - 'SCPROFESSIONNELLECAPITALVARIABLE'=>0, // 4 - 'UNIONDESOCITSCOOPRATIVESFORMEANONYMEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 4 - 'SOCITDASSURANCEMUTUELLEVIE'=>0, // 4 - 'SACC'=>0, // 4 - 'BANQUECOOPRATIVERGIEPARLALOINDU'=>0, // 5 - 'COMAC'=>0, // 4 - 'SOCITRESPONSABILITLIMITESOCITUNIQUE'=>0, // 4 - 'SOCITANONYMESPORTIVEPROFESSIONNELLEDIRECTOIREETCONSEIL'=>0, // 4 - 'LV'=>0, // 4 - 'SCOV'=>0, // 4 - 'SACONSEILDADMINSITRATION'=>0, // 4 - 'SOCITDEXERCICELIBRALPARACTIONSSIMPLIFIES'=>0, // 4 - 'SOCITCIVILEIMMOBILIREAGRICOLE'=>0, // 4 - 'SACONOMIEMIXTE'=>0, // 4 - 'STEANONYMECOOPERATIVEACAPITALVARIABLE'=>0, // 4 - 'AVENUEDUMARCHALFOCH'=>0, // 4 - 'RLU'=>0, // 4 - 'SOCITDEDROITBELGE'=>0, // 4 - 'SADIRECCONSEILDESURVEIL'=>0, // 4 - 'SOCITANONYMECOOPRATIVEDEPRODUCTIONDHLMCONSEIL'=>0, // 4 - 'SACONSEILDADMINISTRATIONDHLM'=>0, // 5 - 'SOCITDEDROITBRITANNIQUE'=>0, // 4 - 'SAMONGASQUE'=>0, // 4 - 'SCOPSARLACAPITALVARIABLE'=>0, // 4 - 'SRLAAU'=>0, // 4 - 'SASD'=>0, // 9 - 'SARCL'=>0, // 4 - 'SICAANONYMEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 4 - 'CENTREDAFFAIREEUROCARABESRUEFRBAULT'=>0, // 4 - 'SKPRL'=>0, // 5 - 'RLCV'=>0, // 4 - 'UNIONECONSOCSARLCAPITALVARIABLE'=>0, // 4 - 'GAF'=>0, // 4 - 'SOCITRESPONSABILITLIMITEASSOCIUNIQUEASSOCIUNIQUE'=>0, // 7 - 'UNIONDECOOPRATIVESLAITIRES'=>0, // 4 - 'SOCITCOOPRATIVECAPITALETPERSONNELVARIABLESCOOPRATIVE'=>0, // 5 - 'SCKC'=>0, // 4 - 'SCIMMOBILIREDECONSTRUCTIONVENTE'=>0, // 5 - 'SOCIETEDINTERETCOLLECTIFAGRICOLESOUSFORMEDESAS'=>0, // 4 - 'CRDITMUTUELCOOPRATIVE'=>0, // 4 - 'SAEC'=>0, // 4 - 'SARLE'=>0, // 5 - 'SAVCOOPRATIVEDEBANQUEPOPULAIRECAPITALVARIABLE'=>0, // 4 - 'SASCAPITALVARIABLEETASSOCIUNIQUE'=>0, // 5 - 'SASUNIPERSONNELLECAPITALVARIABLE'=>0, // 3 - 'STECOOPERATIVERESPLIMITEE'=>0, // 3 - 'UNIONDECRDITMARITIMEMUTUEL'=>0, // 3 - 'EL'=>0, // 3 - 'SCDINTRTCOLLECTIFAGRICOLE'=>0, // 3 - 'EURLCV'=>0, // 3 - 'STECOOPERATIVEDEPRODUCTIONANONYMEACAPITALVARIABLE'=>0, // 3 - 'SOCITCOOPRATIVEDEPRODUCTIONFORMEANONYMEETCAPITALVARIABLE'=>0, // 4 - 'SCCACAPITALVARIABLE'=>0, // 3 - 'SCSCAPITALVARIABLE'=>0, // 3 - 'SCCPV'=>0, // 3 - 'SOCIETECOOPERATIVEDEPRODUCTIONANONYME'=>0, // 3 - 'SACOOPRATIVEOUVRIREDEPRODUCTIONETDECRDIT'=>0, // 3 - 'ETABLISSEMENTPUBLICETRGIE'=>0, // 3 - 'ASSOCIATIONRGIEPARLALOI'=>9220, // 3 - 'SASPDIRECTOIRE'=>0, // 3 - 'SELUARL'=>0, // 7 - 'SOCITREPONSABILITLIMITE'=>0, // 3 - 'SOCITANONYMYECONSEILDADMINISTRATIONDHLM'=>0, // 3 - 'SARLEURLACAPITALVARIABLE'=>0, // 3 - 'CUMAC'=>0, // 3 - 'CAISSEDERASSURANCESMUTUELLESAGRICOLES'=>0, // 3 - 'SCG'=>0, // 6 - 'SCOPRESPONSABILITLIMITEETCAPITALETPERSONNELVARIABLES'=>0, // 3 - 'PERSONNEMORALEAGENTCIAL'=>0, // 3 - 'SOCITCOOPRATIVEFORMEANONYME'=>0, // 3 - 'UKACV'=>0, // 5 - 'SARLCAPITALVARIABLEENDISSOLUTION'=>0, // 3 - 'SARLCOOPRATIVEDINTRTCOLLECTIFAGRICOLECAPITALVARIABLE'=>0, // 3 - 'LOTISSEMENTSODEGSECCAF'=>0, // 3 - 'SICARL'=>0, // 4 - 'SELARLASSCIUNIQUE'=>0, // 3 - 'SOCITCOOPRATIVERESPONSABILITLIMITETCAPITALVARIABLE'=>0, // 3 - 'SCEAPARTICULIRE'=>0, // 3 - 'CONFDRATION'=>0, // 3 - 'SOCITCIVILEDEPATRIMOINE'=>0, // 3 - 'SOCITCOOPRATIVEMARITIMECIVILECAPITALETPERSONNELVARIABLES'=>0, // 3 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLEANONYME'=>0, // 3 - 'SASCOOPRATIVECAPITALVARIABLE'=>0, // 3 - 'SOCITSIMPLIFIE'=>0, // 3 - 'SOCIETEARESPONSABILITELIMITEEAGRICOLEDEFAMILLE'=>0, // 3 - 'SOCITRESPONSABILITLIMITECOOPRATIVECAPITALETPERSONNELVARIABLES'=>0, // 4 - 'SOCIETEANONYMECOOPERATIVEDECOMMERCANTSDETAILLANTSACAPITALVARIABLE'=>0, // 3 - 'ASSOCIATIONDCLARE'=>9220, // 3 - 'SCPDHUISSIERSDEJUSTICE'=>0, // 3 - 'SARLCOOPRATIVEDECRDIT'=>0, // 3 - 'SOCITCOOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABITLIMITE'=>0, // 3 - 'ASSSOCIATION'=>0, // 3 - 'SADECONOMIEMIXTELOCALE'=>0, // 3 - 'SOCITCIVILEDECONSTRUCTIONGESTION'=>0, // 3 - 'SACOOPRATIVEDHLMCAPITALVARIABLE'=>0, // 3 - 'SOCIETEANONYMEDHLMACONSEIL'=>0, // 3 - 'SCCOOPDECONSTRUCTIONPERSONNELETCAPITALVARIABLES'=>0, // 3 - 'UNIONCOOPERATIVEAGRICOLE'=>0, // 3 - 'SICADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 3 - 'SOCITCIVILEPROFESSIONNELLEDEDIRECTEURSDELABORATOIRESDANALYSESMDICALES'=>0, // 3 - 'SCISOCITENLIQUIDATIONAMIABLE'=>0, // 3 - 'SCK'=>0, // 3 - 'SANATIONALISECONSEILDADMINISTRATION'=>0, // 3 - 'SOCITAGRICOLEDEFAMILLE'=>0, // 3 - 'SOCITCIVILECOOPRATIVEDECONSOMMATIONCAPITALVARIABLE'=>0, // 3 - 'SCPDINFIRMIERS'=>0, // 3 - 'SARLDECOOPRATIVECAPITALVARIABLE'=>0, // 3 - 'SOCITCIVILEASSOCIUNIQUE'=>0, // 5 - 'SOCITCOOPRATIVEDEBANQUEPOPULAIRECAPITALVARIABLE'=>0, // 3 - 'SCDEPATRIMOINE'=>0, // 3 - 'SCOPCAPITALETPERSONNELVARIABLES'=>0, // 3 - 'SOCITENCOMMANDITEPARACTIONSMEMBREDELACEE'=>0, // 3 - 'SCDEPRODUCTIONANONYMECAPITALVARIABLE'=>0, // 3 - 'SACOOPRATIVEDIRECTOIREETCONSEILDORIENTATIONETDESURVEILLANCE'=>0, // 3 - 'SOCITCOOPRATIVEARTISANALERESPONSABILITLIMITECAPITALVARIABLE'=>0, // 3 - 'SOCITANONYMECONSEILDADMINISTRATIONDHLM'=>0, // 3 - 'SOCIETEDEXERCICELIBERALENCOMMANDITEPARACTIONSSELACA'=>0, // 4 - 'SASUE'=>0, // 3 - 'SCOPFORMEANONYMEETCAPITALETPERSONNELVARIABLES'=>0, // 3 - 'STCOOPPRODUCARLCPVARIA'=>0, // 3 - 'SADIRECTOIREETCAPITALVARIABLE'=>0, // 3 - 'SCOPCONSEILDADMINISTRATION'=>0, // 5 - 'COOPRATIVEDECRDITCAPITALVARIABLERESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 3 - 'SOCITDEXERCICELIBRALASSOCIUNIQUE'=>0, // 3 - 'SOCITCIVILEPATRIMONIALE'=>0, // 3 - 'SAPROFESSIONNELLE'=>0, // 3 - 'COOPRATIVEVINICOLE'=>0, // 3 - 'COOPERATIVEOUVRIEREDEPRODUCTIONSARL'=>0, // 3 - 'SARLDEPRESSEETCAPITALVARIABLE'=>0, // 3 - 'SACOOPRATIVEMARITIMECAPITALETPERSONNELVARIABLES'=>0, // 3 - 'SCCOOPRATIVEENTREMDECINS'=>0, // 3 - 'SAOUVRIRECOOPRATIVEPERSCAPITALVARIABLE'=>0, // 3 - 'SASI'=>0, // 4 - 'COOPRATIVEPROFESSIONNELLE'=>0, // 3 - 'UNIONDCONOMIESOCIALESASCOOPRATIVE'=>0, // 3 - 'SELARLDARCHITECTURE'=>0, // 3 - 'SOCITDINTRTCOLLECTIFAGRICOLECAPITALVARIABLE'=>0, // 3 - 'UNIONDCONOMIESOCIALESOCITCOOPRATIVERESPONSABILITL'=>0, // 3 - 'COOPERATIVECOMMERCIALEARLETACAPITALVARIABLE'=>0, // 3 - 'SAENLIQUIDATION'=>0, // 3 - 'STDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALEARL'=>0, // 3 - 'ATTR'=>0, // 3 - 'SEMDIRECTOIRE'=>0, // 3 - 'BQ'=>0, // 3 - 'SOCITCIVILECOOPRATIVEAGRICOLECOOPRATIVE'=>0, // 3 - 'SCPARL'=>0, // 4 - 'SCACCAPITALVARIABLE'=>0, // 3 - 'RGIE'=>0, // 3 - 'SOCITRESPONSABILITLIMITEASSOCIEUNIQUE'=>0, // 4 - 'SARLUNIPERSONNELLEASSOCIUNIQUE'=>0, // 4 - 'ENTREPRISENATIONALECARACTRECONOMIQUEDEDROITALGRIEN'=>0, // 3 - 'ENTREPRISEINDIVIDUELLE'=>0, // 3 - 'SASIMPLIFIE'=>0, // 3 - 'SELARLRESPONSABILITLIMITE'=>0, // 3 - 'SASPLURIPERSONNELLECAPITALVARIABLE'=>0, // 3 - 'SOCIETEDINTERETCOLLECTIFAGRICOLESICA'=>0, // 5 - 'STCOOPRATIVERESPONSABILITLIMITE'=>0, // 3 - 'COOPRATIVECAPITALVARIABLEETRESPONSABILIT'=>0, // 3 - 'SCAQUACOLE'=>0, // 3 - 'SOCITCOOPRATIVEDECONSOMMATION'=>0, // 3 - 'SARLDEPRESSECAPITALVARIABLE'=>0, // 3 - 'SOCITDEDROITNERLANDAIS'=>0, // 3 - 'ASSOCIATIONOUFONDATION'=>9220, // 3 - 'SOCITPROFESSIONNELLERGIEPARLALOIDUNOVEMBRE'=>0, // 3 - 'ARL'=>0, // 5 - 'SACOOPRATIVEETCAPITALVARIABLE'=>0, // 5 - 'COOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILITSTATUAIREMENTLIMITE'=>0, // 3 - 'SCIMMOBILIREAGRICOLE'=>0, // 3 - 'SOCIETECOOPERATIVEARESPLIMITEE'=>0, // 3 - 'SOCITDEPARTICIPATIONSFINANCIRESRESPONSABILITLIMITE'=>0, // 3 - 'SCFINANCIRE'=>0, // 3 - 'UCL'=>0, // 3 - 'SARLRESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 3 - 'SCIDECONSTRUCTION'=>0, // 3 - 'SOCITCIVILEPROFESSIONNELLEDECOMMISSAIRESAUXCOMPTES'=>0, // 3 - 'SADEDROITBELGE'=>0, // 3 - 'SOCITRESPONSABILITLIMITESARL'=>0, // 3 - 'SACAPITALETPERSONNELVARIABLE'=>0, // 3 - 'SCDECONSTRUCTIONDIMMEUBLES'=>0, // 3 - 'BANQUECOOPERATIVEREGIEPARLALOINDU'=>0, // 3 - 'SARLASSOCIUNIQUEGM'=>0, // 3 - 'SKAC'=>0, // 3 - 'SOCITDEXPLOITATIONAGRICOLE'=>0, // 3 - 'ENTREPRISEAGRICOLERESPONSABILITLIMITE'=>0, // 3 - 'SCPROFESSIONNELLETITULAIREDUNOFFICENOTARIAL'=>0, // 3 - 'ELCA'=>0, // 3 - 'UNIONDECOOPRATIVESMARITIMESFORMEANONYME'=>0, // 3 - 'STECOOPERATIVEOUVRIEREDEPRODUCTION'=>0, // 3 - 'SOCITDPARGNE'=>0, // 3 - 'RUEDUMARS'=>0, // 3 - 'SCPARTICULIRESOCITENLIQUIDATION'=>0, // 3 - 'COOPRATIVECAPITALVARIABLE'=>0, // 3 - 'SARLASSOCIUNIQUESOCITENLIQUIDATIONAMIABLE'=>0, // 3 - 'UNIONDCONOMIESOCIALESOCITCOOPRATIVERESPONSABILITLIMITE'=>0, // 10 - 'SCOUVRIREDEPRODUCTION'=>0, // 3 - 'SICAFORMEANONYMEETCAPITALVARIABLE'=>0, // 3 - 'GROUPEMENTDINTRTPUBLIC'=>0, // 3 - 'ASSOCIATIONL'=>9220, // 5 - 'SCPROFESSIONNELLEDEGREFFIERSDETRIBUNAL'=>0, // 3 - 'SASDARCHITECTURE'=>0, // 3 - 'SCDE'=>0, // 3 - 'SARLL'=>0, // 4 - 'SADHLMCONSEILDADMINISTRATION'=>0, // 4 - 'SLURL'=>0, // 3 - 'UNIONDESOCITSCOOPRATIVESAGRICOLES'=>0, // 3 - 'EARLU'=>0, // 3 - 'CRPV'=>0, // 3 - 'PROFESSIONLIBRALE'=>0, // 3 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLEFORMEANONYME'=>0, // 3 - 'CUMAENCOMMUNCAPITALVARIABLE'=>0, // 3 - 'SCOPRESPONSABILITLIMITETCAPITALVARIABLE'=>0, // 5 - 'SARLUNIPERSONNEL'=>0, // 3 - 'SCPROFESSIONNELLEDECHIRURGIENDENTISTES'=>0, // 3 - 'FDRATIONRGIONALE'=>0, // 3 - 'SOCITCOOPRATIVEDEPRODUCTIONCAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 3 - 'SARLSTECOOPERATIVEOUVRIEREDEPRODUCTION'=>0, // 3 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITECAPVARASSOCIUNIQUE'=>0, // 3 - 'STEDEXERCICELIBERALPARACTIONSSIMPLIFIEE'=>0, // 3 - 'SACOOPRATIVEDINTRTCOLLECTIFAGRICOLECONSEILDADMICAPITALVARIABLE'=>0, // 3 - 'ASSOCIATIONRGIEPARLALOIDU'=>9220, // 3 - 'SCMSOCITENLIQUIDATION'=>0, // 5 - 'SADEPRESSE'=>0, // 3 - 'SACONSEILDADMINISTRATIONSOCITENLIQUIDATION'=>0, // 3 - 'SCDECONSTRUCTIONVENTESOCITENLIQUIDATION'=>0, // 3 - 'SOCITANONYMESPORTIVEPROFESSIONNELLECONSEILDADMINISTRATION'=>0, // 3 - 'SI'=>0, // 4 - 'SCFONCIRE'=>0, // 3 - 'COOPRATIVEOUVRIREDEPRODUCTIONRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 5 - 'RR'=>0, // 3 - 'SASUNIQUE'=>0, // 3 - 'SCN'=>0, // 5 - 'SACOOPRATIVECAPITALVARIABLEETCONSEILDESURVEILLANCE'=>0, // 3 - 'ASSOCATION'=>0, // 3 - 'SARLASSSOCIUNIQUE'=>0, // 3 - 'SASPORTIVEPROFESSIONNELLEDIRECTOIREETCONSEIL'=>0, // 3 - 'SOCITPARACTIONSSIMPLIFIEDARCHITECTURE'=>0, // 3 - 'SACOOPRATIVEDINTRTCOLLECTIFPOURLACCESSIONLAPROPRIT'=>0, // 3 - 'SAU'=>0, // 3 - 'SCDECONSTRUCTIONVENTEETDEGESTION'=>0, // 3 - 'SOCITCOOPRAITVEDINTRTCOLLECTIFRESPONSABILITLIMITE'=>0, // 3 - 'SARLKCV'=>0, // 4 - 'RUEDUNOVEMBRE'=>0, // 4 - 'SARLDEXERCICELIBRALASSOCIUNIQUE'=>0, // 3 - 'SOCITCOOPRATIVEDINTRETCOLLECTIF'=>0, // 3 - 'SOCITANONYMECOOPRATIVEDECONSOMMATIONCONSEILDADMINISTRATION'=>0, // 3 - 'SOCIETEANONYMECOOPERATIVEMARITIMEACAPITALETPERSONNELVARI'=>0, // 3 - 'SCLAITIRE'=>0, // 3 - 'INSTITUTIONRGIEPARLESLOISDESAOTETDCEMBRE'=>0, // 2 - 'SADHABITATIONLOYERSMODRS'=>0, // 2 - 'SCPARLCAPITALVARIABLE'=>0, // 2 - 'SOCITCIVILEPROFESSIONNELLEDAVOCAT'=>0, // 2 - 'ASSOCIATIONS'=>9220, // 2 - 'FEU'=>0, // 2 - 'SADHABITATIONDELOYERMODR'=>0, // 2 - 'SCDEDROITCOMMUN'=>0, // 2 - 'SOCIETEDINVESTISSEMENTACAPITALVARIABLEDACTIONNARIATSALARIESSICAVAS'=>0, // 2 - 'SCDECOSNTRUCTIONVENTE'=>0, // 2 - 'UNIONDESSOCIETESCOOPERATIVESAGRICOLESACAPITALETPERSONNEL'=>0, // 2 - 'SOCITDEDROITDANOIS'=>0, // 2 - 'COOPRATIVEDECONSOMMATIONFORMEANONYMEETCAPITALVARIABLE'=>0, // 2 - 'SARLCOOPOUVRIREPRODUCTIONCRDIT'=>0, // 3 - 'SOCITCOOPRATIVERESPONSABILITLIMITCAPITALVARIABLE'=>0, // 2 - 'SADHLMCONSEIL'=>0, // 2 - 'DE'=>0, // 2 - 'STECOOPDEPRODUCTIONARESPONSABILITELIMITEE'=>0, // 2 - 'SCDECONSTRUCTIONVENTELOIDETITRE'=>0, // 3 - 'GIEC'=>0, // 2 - 'COP'=>0, // 3 - 'SCICARL'=>0, // 2 - 'SACOOPRATIVEINTRTCOLLECTIFDHLMDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 4 - 'PASCAL'=>0, // 2 - 'ADMINISTRATION'=>0, // 2 - 'SOCITDCONOMIEMIXTELOCALE'=>0, // 2 - 'SCEASOCITENLIQUIDATION'=>0, // 2 - 'SSARLASSOCIUNIQUE'=>0, // 3 - 'SARLLIMITEASSOCIUNIQUE'=>0, // 3 - 'SCAICAC'=>0, // 2 - 'SAROL'=>0, // 2 - 'COOPRATIVEOUVRIREDEPRODUCTIONCAPITALVARIABLE'=>0, // 2 - 'SARLARTISANALE'=>0, // 2 - 'SOCIETECOOPERATIVEOUVRIEREDEPRODUCTIONSARLACAPITALVARIABLE'=>0, // 2 - 'SNCSOCITENLIQUIDATION'=>5202, // 3 - 'SOCITPARACTIONSSIMPLIFIECAPITALVARIABLEASSOCIUNIQUE'=>0, // 2 - 'SOCITCOOPRATIVEAYANTLAFORMEDESOCITANONYME'=>0, // 2 - 'SCDEXPLOITATIONAGRICOLERESPONSABILITLIMITE'=>0, // 2 - 'STECOOPERATIVEDEPRODUCTIONANONYME'=>0, // 2 - 'ETSPUBLICINDETCIALEPIC'=>0, // 2 - 'SOCITANONYMECOOPRATIVE'=>0, // 2 - 'SCICARESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 2 - 'SADIRECTOIREETCONSEILDUSURVEILLANCE'=>0, // 2 - 'SARLASSOCIUNIQUEENLIQUIDATIONAMIABLE'=>0, // 4 - 'SOCITCCIVILE'=>0, // 2 - 'SELARLDEMDECINS'=>0, // 2 - 'EURLUNIPERSONNELLE'=>0, // 2 - 'SOCITCOOPRATIVEDEDROITBELGE'=>0, // 2 - 'SCPARTICIPATIONOUVRIREETCAPITALVARIABLE'=>0, // 2 - 'SCDECONSTRCUTIONVENTE'=>0, // 2 - 'SARLCOOPRATIVEDINTRTCOLLECTIFCAPITALVARIABLE'=>0, // 2 - 'SARLDEDROITHONGROIS'=>0, // 2 - 'SAELFORMEANONYMEDEGOMTRESEXPERTS'=>0, // 2 - 'DPARTEMENT'=>0, // 2 - 'COOPERATIVEARTISANALEACONSEIL'=>0, // 2 - 'SOCITDEXERCICELIBRALUNIPERSONNELLERESPONSABILITLIMITECAPVAR'=>0, // 2 - 'SELAL'=>0, // 3 - 'COOPAGRICOLEACAPITALVARIABLE'=>0, // 2 - 'SPRL'=>0, // 2 - 'COOPRATIVERESPONSABILITLIMITE'=>0, // 2 - 'SARLCOOPRATIVEDEPRODUCTIONETCAPITALVARIABLE'=>0, // 3 - 'ETABLISSEMENTPUBLICFONCIER'=>0, // 2 - 'INSTITUTIONRGIEPARLESARTICLESLETSUIVANTSDUCODEMONTAIREETFINANCIER'=>0, // 2 - 'SASDARCHITECTURECAPITALVARIABLE'=>0, // 2 - 'SOCITCIVILEPROFESSIONNELLEDEDENTISTES'=>0, // 2 - 'SOCITCOOPRATIVEFORMEANONYMEETCAPITALVARIABLE'=>0, // 4 - 'SASDIRECTOIRE'=>0, // 2 - 'ASSOCIATIONLOIDUERJUILLET'=>9220, // 2 - 'LOTISSEMENTSODEGSECTIONCAF'=>0, // 2 - 'SCDECHASSE'=>0, // 2 - 'SOCITANONYMEDEDROITSUISSE'=>0, // 2 - 'SARLPERSONNELETCAPITALVARIABLES'=>0, // 2 - 'SOCITCIVILEDECONSTRUCTIONDIMMEUBLES'=>0, // 2 - 'SACOOPRATIVEARTISANALEETCAPITALVARIABLE'=>0, // 3 - 'TABLISSEMENTPUBLICDOTDELAUTONOMIEFINANCIRE'=>0, // 2 - 'SCPROFESSIONNELLEDEGOMTRESEXPERTS'=>0, // 2 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLEANONYMECAPITALVARIABLE'=>0, // 2 - 'SABP'=>0, // 2 - 'SFA'=>0, // 2 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONCAPITALVARIABLE'=>0, // 2 - 'SCALAITIRE'=>0, // 2 - 'UNIONDCONOMIESOCIALESACAPITALVARIABLE'=>0, // 2 - 'SARLA'=>0, // 2 - 'SOCIETEANONYMEADIRECTOIRECONSEILDESURVEILLANCE'=>0, // 2 - 'EXPAGRICOLEARESPONSABILITELIMITEE'=>0, // 2 - 'SURL'=>0, // 2 - 'SACOOPRATIVEPERSONNELLECAPITALVARIABLE'=>0, // 2 - 'SOCITDESCARRIRESDEBEVENAIS'=>0, // 2 - 'EAURLASSOCIUNIQUE'=>0, // 2 - 'SOCITCOOPRATIVEDEPRODUCTIONANONYMEETCAPITALVARIABLE'=>0, // 2 - 'SOCITCOOPRATIVEDECRDITCAPITALVARIABLEARL'=>0, // 2 - 'SELARLDEPHARMACIENSDOFFICINE'=>0, // 2 - 'JOL'=>0, // 2 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFARLCAPITALVAR'=>0, // 2 - 'SADHABITATIONSLOYERMODR'=>0, // 2 - 'ASSOCIATIONSLOI'=>9220, // 2 - 'SCDEPRODUCTIONRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 2 - 'FONDATIONRECONNUEDUTILITPUBLIQUESUIVANTDCRETDUMINISTREDELINTRIEURENDATEDEERAVRIL'=>0, // 2 - 'SCZ'=>0, // 2 - 'SCPR'=>0, // 2 - 'CAISSEDECRDITAGRICOLEMUTUEL'=>0, // 2 - 'SOCITPARACTIONSSIMPLIFI'=>0, // 2 - 'SACOOPRATIVEDINTRTCOLLECTIFAGRICOLECAPITALVARIABLE'=>0, // 2 - 'SICAVFORMEANONYME'=>0, // 2 - 'SARM'=>0, // 2 - 'SOE'=>0, // 2 - 'SARLDEDROITBRITANNIQUE'=>0, // 2 - 'COOPERATIVECONSOMMATIONARESPONSABILITELIMITEE'=>0, // 2 - 'SADIRECTOIRECONSEILDESURVEILLANCEETCAPITALVARIABLE'=>0, // 4 - 'SGCV'=>0, // 2 - 'SARLASSCOIUNIQUE'=>0, // 2 - 'SARLCAPITALVARIABLESOCITENDISSOLUTION'=>0, // 2 - 'COOPRATIVEANONYME'=>0, // 2 - 'SACOOPRATIVECAPITALETPERSONNELSVARIABLES'=>0, // 2 - 'SOCITDASSURANCECARACTREMUTUEL'=>0, // 2 - 'ENTREPRISEUNIPERSONNELLERESPONSABILITLIMITESARLASSOCIUNIQUE'=>0, // 2 - 'SOCITDEDROITANGLAISFAISANTAPPELPUBLICLPARGNEPUBLICLIMITEDCOMPANY'=>0, // 2 - 'EARLUNIPERSONNELLE'=>0, // 3 - 'SICACOOPRATIVE'=>0, // 2 - 'EURLCAPITALVARIABLE'=>0, // 2 - 'ASSOCIARION'=>9220, // 2 - 'SDI'=>0, // 2 - 'SOCITDEDROITMONEGASQUE'=>0, // 2 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITLIMITECAPITALETPERSONNELVARIABLES'=>0, // 2 - 'STEANONYMEADIRECTOIREETCONSEILDORIENTATIONSURVEILLANCE'=>0, // 2 - 'COOPERATIVEOUVRIEREDEPRODUCTIONSA'=>0, // 2 - 'SOCIETEANONYMECOOPERATIVEDEPRODUCTIONDHLMACONSEIL'=>0, // 2 - 'COOPERATIVEDUTILISATIONDEMATERIELAGRICOLECUMA'=>0, // 2 - 'CUMAENCOMMUNETCAPITALVARIABLE'=>0, // 2 - 'STEANONYMEACONSEILDESURVEILLANCEETDIRECTOIRE'=>0, // 2 - 'SOCITDEPARTICIPATIONSFINANCIRERESPONSABILITLIMITE'=>0, // 2 - 'SOCITCOOPRATIVEANONYMEDINTRTCOLLECTIFAGRICOLECOOPRATIVE'=>0, // 2 - 'SARLDECOOPRATIVE'=>0, // 2 - 'SCPROFESSIONNELLEDAVOCATSFORMECOOPRATIVE'=>0, // 2 - 'SOCIETECOOPERATIVEARTISANALEARESPONSABILITELIMITEEACAPITA'=>0, // 2 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLEPARACTIONSSIMPLIFIES'=>0, // 2 - 'SOCITPARACTIONMEMBREDELUE'=>0, // 2 - 'SCICRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 2 - 'SARLASSOCIUNIQUESARL'=>0, // 4 - 'SADECONSTRUCTIONVENTE'=>0, // 3 - 'SOCITANONYMEPARRESPONSABILITLIMITE'=>0, // 2 - 'SARLPLURIPERSONNEL'=>0, // 2 - 'SOCITDEXERCICELIBRALPARACTIONSSIMPLIFIECAPITALVARIABLE'=>0, // 2 - 'ENTREPRISEUNIPERSONNELLERESPONSABILITLIMITEETASSOCIUNIQUE'=>0, // 3 - 'SOCITENPARTICIPATIONDEXERCICECONJOINT'=>0, // 2 - 'SOCITDEDROITAMRICAIN'=>0, // 2 - 'SOCITCOOPRATIVEDETRAVAILLEURSANONYMES'=>0, // 2 - 'SELARLASSOCIUNIQIUE'=>0, // 2 - 'SCPDECOMMISSAIRESPRISEURS'=>0, // 3 - 'TABLISSEMENTPUBLICNATIONALCARACTREINDUSTRIELETCOMMERCIAL'=>0, // 2 - 'SOCIETECOOPERATIVECREDITCAPITALVARIABLEARL'=>0, // 2 - 'UNIONDECONOMIESOCIALESAADIRECTOIREETCONSEILDESURVEIL'=>0, // 2 - 'SCCOOPRATIVEPERSONNELETCAPITALVARIABLE'=>0, // 3 - 'ORGANISMEPROFESSIONNEL'=>0, // 2 - 'UNIONDCONOMIESOCIALESARLCOOPRATIVECAPITALVARIABLE'=>0, // 2 - 'SOCITCIVILEDECONSTRUCTIONVENTELOIDETITRE'=>0, // 2 - 'SICACIVILE'=>0, // 2 - 'SOCIETECOOPERATIVEDEPRODUCTIONSARL'=>0, // 2 - 'SANATIONALEDCONOMIEMIXTE'=>0, // 2 - 'SOCIETEPARACTIONSSIMPLIFIEESUNIPERSONNELLE'=>0, // 2 - 'SASDIRECTIONETCONSEILDESURVEILLANCE'=>0, // 2 - 'SDET'=>0, // 2 - 'SAKCPV'=>0, // 2 - 'SARLSSOCIUNIQUE'=>0, // 2 - 'SADHLMETCONSEIL'=>0, // 2 - 'BANQUECOOPRATIVESADIRECTOIREETCONSEILDESURVEILLANCEDNOMMCONSEILDORIENTATIONETD'=>0, // 2 - 'SARLDEDROITESPAGNOL'=>0, // 2 - 'SCPDEMDECINS'=>0, // 2 - 'SOCITDINVESTISSEMENTSCAPITALVARIABLEETCONSEILDADMINISTRATION'=>0, // 3 - 'S'=>0, // 3 - 'SAMEMBREDELEU'=>0, // 2 - 'SARLCOOPRATIVECAPITALETPERSONNELVARIABLES'=>0, // 2 - 'SCCOOPRATIVEPERSONNELVARIABLE'=>0, // 2 - 'SASASSOCIUNIQUEETCAPITALVARIABLE'=>0, // 2 - 'SACOOPOUVRIEREDEPRODUCTIONCAPITALETPERSONNELVARIABLES'=>0, // 2 - 'UNIONDECONOMIESOCIALESTECOOPERATIVEPARACTIONSSIMPLIFIEE'=>0, // 2 - 'STECOOPINTERETCOLLECTAGRIC'=>0, // 2 - 'SCDEDROITTRANGER'=>0, // 2 - 'COOPDEPRODUCTIONARESPONSABILITELIMITECAPITALVARIABLE'=>0, // 2 - 'CAISSEREGIONALE'=>0, // 2 - 'SCOPFORMEANONYMEPERSONNELETCAPITALVARIABLES'=>0, // 4 - 'SARLCOOPERATIVEDECONSOMMATION'=>0, // 2 - 'SOCIETECOOPERATIVEAGRICOLEACAPITALCARIABLE'=>0, // 2 - 'SOCITCOOPRATIVEDECRDITRESPONSABILITSTATUTAIREMENT'=>0, // 2 - 'SOCITDEXERCICELIBRALPARACTIONSSIMPLIFI'=>0, // 2 - 'SACOOPRATIVEDECOMMERANTSDTAILLANTSETCAPITALVARIABLE'=>0, // 2 - 'SADCONOMIQUEMIXTELOCALE'=>0, // 2 - 'A'=>0, // 3 - 'SOCITDEDROITTANGER'=>0, // 2 - 'BANQUEPOPULAIRE'=>0, // 2 - 'CRDITMUTUELCOOPRATIVEETCAPITALVARIABLE'=>0, // 2 - 'SOCITDEDROITSUISSE'=>0, // 2 - 'SCDECONSTRUCTIONETDATTRIBUTION'=>0, // 2 - 'SCAYANTLAFORMEDESA'=>0, // 2 - 'SACOOPRATIVEDINTRTCOLLECTIFAGRICOLE'=>0, // 2 - 'SCOPRESPONSABILITLIMITEETDECRDITCAPITALVARIABLE'=>0, // 2 - 'SOCITDEDROITITALIEN'=>0, // 2 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFESSIONLIBRALEDAVOCAT'=>0, // 2 - 'SICASARL'=>0, // 3 - 'SARLUK'=>0, // 2 - 'SCDECONSTRUCIONVENTE'=>0, // 3 - 'SAMEMBREDELAUE'=>0, // 2 - 'SOCITCOPRATIVEMARITIME'=>0, // 2 - 'RUEDUVIEUXMARCHAUXVINS'=>0, // 2 - 'SOCITANONYMEDECONSOMMATIONCONSEILDADMINISTRATION'=>0, // 2 - 'SARLCAPITALVARIABLESOCITENLIQUIDATION'=>0, // 2 - 'GIENONCOMMERCIAL'=>0, // 2 - 'SYNDICATDECOPROPRITAIRES'=>0, // 2 - 'SOCITDINTRETCOLLECTIFAGRICOLE'=>0, // 2 - 'GIEENLIQUIDATION'=>0, // 3 - 'UNIONDESYNDICATS'=>0, // 2 - 'SOCITCIVILEDETUDESETDERECHERCHES'=>0, // 2 - 'JACQUES'=>0, // 2 - 'SYNDICATAGRICOLE'=>0, // 2 - 'COOPRATIVEFORMEANONYMEETCAPITALVARIABLE'=>0, // 3 - 'SASOCITENLIQUIDATION'=>0, // 2 - 'SOCITDEDROITHOLLANDAISRESPONSABILITLIMITE'=>0, // 2 - 'SOCITCOOPRATIVEDEPRODUCTIONANONYMECAPITALVARIABLECOOPRATIVE'=>0, // 2 - 'SARLCCAPITALVARIABLE'=>0, // 2 - 'UCOA'=>0, // 3 - 'SOCIETECIVILEDEPLACEMENTCOLLECTIFIMMOBILIERACAPITALVARIABLE'=>0, // 2 - 'ASOCIATION'=>0, // 2 - 'SARLUNIPESONNELLE'=>0, // 2 - 'SADECOOPRATIVE'=>0, // 2 - 'SARLDEXERCICELIBREASSOCIUNIQUE'=>0, // 2 - 'SOCITDEDROITTRANGERDROITBRITANNIQUE'=>0, // 2 - 'SOCITCOOPRATIVEMARITIMERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 3 - 'CRDITAGRICOLEMUTUEL'=>0, // 2 - 'SELAR'=>0, // 4 - 'SARRL'=>0, // 3 - 'SOCITENNONCOLLECTIF'=>0, // 2 - 'SCIEA'=>0, // 2 - 'SADCONOINEMIXTELOCALE'=>0, // 2 - 'SCOPARL'=>0, // 3 - 'SASCONSEILDESURVEILLANCE'=>0, // 2 - 'SCOPRESPONSABILITLIMITECAPITALETPERSONNELVARIABLES'=>0, // 2 - 'STECOOPERATIVEDINTERETCOLLECTIFARESPONSABILITELIMITEEACAPITALVARIABLE'=>0, // 2 - 'NONDFINIE'=>0, // 2 - 'SOCITCIVILEIMMOBILIREDEMARCHANDDEBIENS'=>0, // 2 - 'SOCIETEDEXERCICELIBERALARESPONSABILITELIMITE'=>0, // 2 - 'SACOOPRATIVEDEBANQUESCAPITALFIXE'=>0, // 2 - 'SADEDROITFRANAIS'=>0, // 2 - 'SADIRECTOIREETCONSEILDESURVEILANCE'=>0, // 3 - 'SCMPERSONNELETCAPITALVARIABLES'=>0, // 2 - 'EARLDEXERCICELIBRE'=>0, // 2 - 'SELARLDEXERCICELIBRAL'=>0, // 2 - 'GROUPEMENTFORESTIERRURAL'=>0, // 2 - 'SCOPDHLMANONYME'=>0, // 2 - 'SARLKA'=>0, // 3 - 'SOCITOUVRIREDEPRODUCTIONRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 2 - 'SCCCCOOPRATIVE'=>0, // 2 - 'SCARESPONSABILITLIMITE'=>0, // 2 - 'PHILIPPE'=>0, // 2 - 'SARLASSOCIUNIQUESOCITTRANGRE'=>0, // 2 - 'SARLV'=>0, // 2 - 'ENTREPRISEUNIPERSONNELLEARESPONSABILITELIMITEEEURLETACAPITALVARIABLE'=>0, // 2 - 'SASZU'=>0, // 2 - 'SCPHLM'=>0, // 2 - 'SOCITDEPRESSERESPONSABILITLIMITECAPITALVARIABLE'=>0, // 2 - 'SACOOPRATIVEOUVRIREDEPRODUCTIONCAPITALETPERSONNELVARIABLES'=>0, // 2 - 'SOCITCIVILEPROFESSIONNELLEDAVOCATFORMECOOPRATIVE'=>0, // 2 - 'CA'=>0, // 2 - 'ASSOCIATIONLOIETASSIMILS'=>9220, // 2 - 'SOCITRESPONSABILITLIMITDEDROITMONGASQUE'=>0, // 2 - 'SOCITDEDROITETRANGERASSOCIUNIQUE'=>0, // 3 - 'SELASUNIPERSONNELLE'=>0, // 2 - 'SOCITCOOPRATIVEDINTRTAGRICOLE'=>0, // 2 - 'SARLASSOCIUNIQUESOCITENDISSOLUTION'=>0, // 2 - 'COOPRATIVEANONYMECAPITALVARIABLE'=>0, // 2 - 'SICAANONYMECAPITALVARIABLE'=>0, // 2 - 'INSTITUTIONRGIEPARLALOIDUAOT'=>0, // 2 - 'MAIRIE'=>0, // 2 - 'ARLASSOCIUNIQUE'=>0, // 2 - 'SADIRECTOIREAMPCSURVEILLANCE'=>0, // 2 - 'SAE'=>0, // 2 - 'SCOPFORMEANONYMECAPITALVARIABLE'=>0, // 2 - 'LEGRANDBLEU'=>0, // 2 - 'SAM'=>0, // 2 - 'SARLASSOCIUNIQUEL'=>0, // 2 - 'SOCITCOOPRATIVEPERSONNELETCAPITALVARIABLES'=>0, // 2 - 'STECOOPERATIVEDINTERETCOLLECTIFAGRICOLESICA'=>0, // 2 - 'SARLUNIPERSONNELLESPORTIVE'=>0, // 2 - 'SANONMEMBREDELAUE'=>0, // 2 - 'SCPROFESSSIONNELLE'=>0, // 2 - 'SCPDAVOUS'=>0, // 2 - 'SCPTITULAIREDUNOFFICEDEGREFFIERDETRIBUNALDECOMMERCE'=>0, // 3 - 'COMMUNAUTURBAINE'=>0, // 2 - 'SCICONSTRUCTIONVENTE'=>0, // 3 - 'SOCITCOOPRATIVEDEDROITSUISSE'=>0, // 2 - 'SELARLINTERBARREAUX'=>0, // 2 - 'ASSLOI'=>0, // 2 - 'SARLCOOPER'=>0, // 2 - 'SCPDARCHITECTES'=>0, // 2 - 'CSDECONSTRUCTIONVENTE'=>0, // 2 - 'SCDECONSTRUTIONVENTE'=>0, // 2 - 'SYNDICATINTERCOMMUNAL'=>0, // 2 - 'MICHEL'=>0, // 2 - 'SOCITDEDROITSTRANGERS'=>0, // 2 - 'GAECGROUPEMENTAGRICOLEDEXPLOITATIONENCOMMUN'=>0, // 2 - 'STEDECAUTIONMUTUELLELOIDUMARS'=>0, // 2 - 'RUEDEVELOTTE'=>0, // 2 - 'COOPRATIVEOUVRIREDEPRODUCTIONANONYME'=>0, // 2 - 'COOPRATIVEDECONSOMMATIONFORMEANONYME'=>0, // 2 - 'SOCITCIVILECOOPRATIVEDECRDITETCAPITALVARIABLE'=>0, // 2 - 'SOCITDINTRETCOLLECTIFAGRICOLEARL'=>0, // 2 - 'SCMV'=>0, // 2 - 'SCPROFESSIONNELLEDECHIRURGIENDENTISTE'=>0, // 2 - 'SOCITMUTUELLE'=>0, // 2 - 'SADCONOMIEMIXTELOCALEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 2 - 'SARLUNIPERSONNELLECAPITALVARIABLE'=>0, // 2 - 'SOCITDEDROITPOLONAIS'=>0, // 2 - 'SOCITDINVESTISSEMENTSCONSEILETCAPITALVARIABLE'=>0, // 2 - 'SCOPDHLMCAPITALVARIABLE'=>0, // 2 - 'SENC'=>0, // 2 - 'ERAL'=>0, // 2 - 'SACOOPRATIVEDINTCOLLECTIFDACCESSIONALAPROPRIT'=>0, // 2 - 'SASUETCAPITALVARIABLE'=>0, // 2 - 'DOMINIQUE'=>0, // 2 - 'SCCOOPRATIVEDECONSOMMATIONCAPITALVARIABLE'=>0, // 2 - 'SOCITDEPLACEMENTPRPONDRANCEIMMOBILIRECAPVARIA'=>0, // 2 - 'STEANONYMEADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 2 - 'COLA'=>0, // 2 - 'ETABLISSEMENTPUBLICADMINISTRATIFCOMMUNAL'=>0, // 2 - 'SREA'=>0, // 2 - 'SNCENDISSOLUTION'=>5202, // 3 - 'SCDEGESTIONDEBIENSIMMOBILIERS'=>0, // 2 - 'SCDECONSTUCTIONVENTE'=>0, // 2 - 'SCOPSACAPITALVARIABLE'=>0, // 2 - 'SOCITDEXERCICELIBRALFORMEANONYMESELEFACONSEILDADMINISTRATION'=>0, // 2 - 'SASOCITDHABITATIONDELOYERMODR'=>0, // 2 - 'BOULEVARDBERTHELOT'=>0, // 2 - 'CPVA'=>0, // 2 - 'CAISSE'=>0, // 2 - 'SERLARL'=>0, // 2 - 'CT'=>0, // 2 - 'STEDINTERETCOLAGRICOLESOUSFORMEDESARL'=>0, // 2 - 'SCDEGESTIONDEPORTEFEUILLES'=>0, // 2 - 'SAKS'=>0, // 2 - 'SOCITCIVILEAGRICOLECAPITALVARIABLE'=>0, // 2 - 'SOCIETECOOPERATIVEOUVRIEREDEPRODUCTIONSARL'=>0, // 2 - 'SOCITRESPONSABILITLIMITECOOPRATIVEARTISANALE'=>0, // 2 - 'SARLENDISSOLUTIONANTICIPE'=>0, // 1 - 'SANONMEMBREDELACE'=>0, // 1 - 'COMMUNAUTDECOMMUNES'=>0, // 1 - 'BERNARD'=>0, // 1 - 'SADHABITATIONLOYERMODRETCONSEIL'=>0, // 1 - 'EURLSARLCESSIONSDEPARTSSOCIALES'=>0, // 1 - 'SOCITAANONYME'=>0, // 1 - 'SACOOPRATIVEDEPRODUCTIONDEHLMDIRECTOIREETCONSEILDESURVEILLANCECAPITALVARIABLE'=>0, // 1 - 'SCPDEMANDATAIRESJUDICIAIRESLALIQUIDATIONDESENTREPRISES'=>0, // 1 - 'SICFA'=>0, // 1 - 'SARLASSOCUNIQUE'=>0, // 1 - 'SARLDEDROITANGLAIS'=>0, // 1 - 'SICAVETCONSEILDESURVEILLANCE'=>0, // 1 - 'SSARLASSOCIUNIQUEETCAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPTATIVEAGRICOLE'=>0, // 1 - 'SOCITCIVILEDATTRIBUTIONDIMMEUBLESENJOUISSANCE'=>0, // 1 - 'SARLASSCIUNIQUE'=>0, // 2 - 'SCEXPLOITATIONAGRICOLE'=>0, // 1 - 'SAEMCA'=>0, // 1 - 'AFFAIREPERSONNELLEPROFESSIONLIBRALE'=>0, // 1 - 'CLCM'=>0, // 1 - 'SOCITDEDROITTRANGERCARYCHAMBERSPALKSTREETTORKAYROYAUMEUNI'=>0, // 1 - 'SARLASSOCIUNIQUEENTREPRISEUNIPERSONNELLERESPONSABILITLIMITE'=>0, // 1 - 'ENTREPRISEDINSERTIONIDEF'=>0, // 1 - 'SEC'=>0, // 1 - 'INTERCOMTLCOMCLOTLCOMINTERCOMDIFFUSION'=>0, // 1 - 'STPHANE'=>0, // 1 - 'SCIMMOBILIRE'=>0, // 1 - 'SOCITRESPONSABILITLIMITESSOCIUNIQUE'=>0, // 1 - 'SCDEGESTIONDEPATRIMOINE'=>0, // 1 - 'UNIONDESOCITCOOPRATIVESFORMEANONYMEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITLIMITEECAPITALVARIABLE'=>0, // 1 - 'SOCITCIVILEDECONSTRUCITONVENTE'=>0, // 1 - 'ANDRES'=>0, // 1 - 'ETRUEGEORGESPAILLOT'=>0, // 1 - 'SARLACTIVITAUTORISEJUSQUAU'=>0, // 1 - 'SELEURLASSOCIUNIQUE'=>0, // 1 - 'SCDECONSTRUCTIONVENTECAPITALVARIABLE'=>0, // 1 - 'MARIELOUISE'=>0, // 1 - 'SCOPCAPITALETPERSONNELVARIABLE'=>0, // 1 - 'UNIONDCONOMIESOCIALESOCITCOOPRATIVEPARACTIONSSIMPLIFIE'=>0, // 1 - 'CUMACCOOPRATIVE'=>0, // 1 - 'COOPRATIVEARTISANALERESPONSABLITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SCPDAVOCATSCAUCHONCOURCELLELEFOURRIQUETMARTINS'=>0, // 1 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONETDECRDIT'=>0, // 1 - 'SARLAASSOCIERUNIQUE'=>0, // 1 - 'SACICAP'=>0, // 2 - 'GLOBALPHONE'=>0, // 1 - 'NONRENSEIGN'=>0, // 1 - 'SOCITCOOPRATIVEAGRICOLECAPITALVARIABLECOOPRATIVE'=>0, // 1 - 'GROUPEMENT'=>0, // 1 - 'SAA'=>0, // 1 - 'SOCITANONYMEPERSONNELVARIABLE'=>0, // 1 - 'SOCITENPARTICIPATIONENTREPERSONNESPHYSIQUES'=>0, // 1 - 'SARLUNIPERSONNELLERESPONSABILITLIMITE'=>0, // 1 - 'SCPACAPITALVARIABLE'=>0, // 2 - 'SOCITCOOPRATIVECAPITALVARIABLEETRESPONSABILITLIMITESARLCOOPRATIVEDETRANSPOR'=>0, // 1 - 'SCPARTICULIREAGRICOLEETARBORICOLE'=>0, // 1 - 'CCM'=>0, // 1 - 'LTD'=>0, // 1 - 'SR'=>0, // 1 - 'SOCITIMMOBILIREDECONSTRUCTIONVENTE'=>0, // 1 - 'SCANONYMEDINTRTCOLLECTIFAGRICOLE'=>0, // 1 - 'COOPERATIVEAGRICOLEFRUITIERE'=>0, // 1 - 'SOCITRESPONSABILITCOOPRATIVE'=>0, // 1 - 'STEDEPARTICIPATIONFINANCIEREDEPROFLIBERALEDAVOCATSSSFORMEDESAS'=>0, // 1 - 'STECOOPERATIVEDINTERETCOLLECTIFAGRICOLEANONYME'=>0, // 1 - 'SOCITANONYMECONSEILDADMNISTRATION'=>0, // 1 - 'SOCITCIVILECOOPRATIVECAPITALETPERSONNELVARIABLES'=>0, // 1 - 'SISA'=>0, // 1 - 'SARLASSOCIUNQUIE'=>0, // 1 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 1 - 'SCPDECOMMISSAIRESAUXCOMPTES'=>0, // 1 - 'SOCITDEDROITIRLANDAIS'=>0, // 1 - 'SACOOPRATIVEDEPRODUCTIONDHLMCONSEILDADMINISTRATIONETCAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEDECONSOMMATIONFORMEANONYMEETCAPITAL'=>0, // 1 - 'EARLENLIQUIDATIONAMIABLE'=>0, // 1 - 'SOCITCOOPRATIVEOUVRIRERESPONSABILITLIMITECAPITALVARIABLE'=>0, // 1 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITEASSOCIUNIQUEETCAPITALVARIABLE'=>0, // 1 - 'SICAANONYMEDIRECTOIRECAPITALVARIABLE'=>0, // 1 - 'STEANONYMEACONSEILDADMINISTRATION'=>0, // 1 - 'JBM'=>0, // 1 - 'SCPROFESSIONNELLEDEDENTISTES'=>0, // 1 - 'SOCIETECIVILEDINTERETCOLLECTIFAGRICOLESICA'=>0, // 2 - 'SRLARL'=>0, // 1 - 'LALONGINE'=>0, // 1 - 'SOCITASSOCIUNIQUE'=>0, // 1 - 'SCOOPPERSONNELVARIABLE'=>0, // 1 - 'SELARLDECHIRURGIENSDENTISTES'=>0, // 2 - 'SCPLACEMENTIMMOBILIER'=>0, // 1 - 'SSCDECONSTRUCTIONVENTE'=>0, // 1 - 'COMPAGNIERESPONSABILITDEDROITMAURICIEN'=>0, // 1 - 'SOCITRESPONSABILITLIMITEETSARLDEDROITALLEMAND'=>0, // 1 - 'UNIONDESOCITSCOOPRATIVESAGRICOLESCAPITALETPERSONNELVARIABLES'=>0, // 1 - 'SACCOOPRATIVE'=>0, // 1 - 'SOCITCOOPRATIVEFORMEANONYMEDINTRTCOLLECTIFAGRICOLE'=>0, // 1 - 'RGIEPUBLICITAIRE'=>0, // 1 - 'SCPATRIMONIALECAPITALVARIABLE'=>0, // 1 - 'SARLVENTEENGROSAUDTAILETIMPORTEXPORTDECHAUSSURESCOMMERCIALISATIONPARTOUSMOYENSD'=>0, // 1 - 'SCPROFESSIONNELDAVOCATS'=>0, // 1 - 'SARLRDUITEUNASSOCI'=>0, // 1 - 'INSTITUTIONRGIEPARLESARTICLESLETSUIVANTSDUCODEMONTAIRE'=>0, // 1 - 'SCOPARESPONSABILITLIMITEETCAPITAVARIABLE'=>0, // 1 - 'SCCMCAPITALVARIABLE'=>0, // 1 - 'SBASTIENDENIS'=>0, // 1 - 'BANQUECOOPRATIVESADIRECTOIREETCONSEILDESURVEILLANCEDNOMMECONSEILDORIENTATIONETDE'=>0, // 1 - 'SOCUTCOOPRATIVEAGRICOLE'=>0, // 1 - 'WILLY'=>0, // 1 - 'SOCITARESPONSABIITLIMITE'=>0, // 1 - 'SCCVDECONSTRUCTIONVENTE'=>0, // 1 - 'CABINET'=>0, // 1 - 'COOPRATIVEDINTRTCOLLECTIFRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'AVENUEDUGNRALDEGAULLE'=>0, // 1 - 'STESOMERSETHOUSETEMPLESTREETBIRMINGHAMBDN'=>0, // 1 - 'GAECASSOCIUNIQUE'=>0, // 1 - 'SOCITDEXERCICELIBRALPASACTIONSSIMPLIFIE'=>0, // 1 - 'NOUVELLESOCITRESPONSABILITLIMITERDUITEUNASSOCIUNIQUE'=>0, // 1 - 'GIEASSOCIUNIQUE'=>0, // 1 - 'STECIVILEDEXPLOITATIONAGRICOLEETVITICOLE'=>0, // 1 - 'SOCITCOOPRATIVEANONYMEDINTRTCOLLECTIFAGRICOLEETCAPITALVARIABLE'=>0, // 1 - 'SOCITEUROSRESPONSABILITLIMITE'=>0, // 1 - 'SOCITRESPONSABILITLIMITEASSOCIATIONUNIQUE'=>0, // 1 - 'STCOOPRATIVEDINTRTCOLLECTIFARLCAPITALVARIABLE'=>0, // 1 - 'SARLOUVRIREDEPRODUTIONCAPITALVARIABLE'=>0, // 1 - 'SAELLOCALE'=>0, // 1 - 'SADIRECTOIREETCONSEILDESURVEILLANCEASSOCIUNIQUE'=>0, // 1 - 'ENTREPRISEUNIPERSONNELLERESPONSABILIT'=>0, // 1 - 'SARI'=>0, // 1 - 'SARLASSOCIUNIPERSONNEL'=>0, // 1 - 'DIVERS'=>0, // 1 - 'SOCITDEXERCICELIBRALPARACTIONSSIMPLIFIS'=>0, // 1 - 'CPAVSCOP'=>0, // 1 - 'AMAR'=>0, // 1 - 'SRLERL'=>0, // 1 - 'CCPV'=>0, // 1 - 'EVDEUROVINSDISTRIBUTION'=>0, // 1 - 'SASCOOPRATIVEDINTERTCOLLECTIFAGRICOLE'=>0, // 1 - 'SOCITDEDROITTRANGERSOCITRESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 1 - 'SOCITDINVESTISSEMENTCAPITALVARIABLEETCONSEILDADMINISTRATION'=>0, // 1 - 'SICP'=>0, // 1 - 'EDGARD'=>0, // 1 - 'UNIONDCONOMIESOCIALESOCITCOOPRATIVEANONYME'=>0, // 1 - 'SOCITANONYMEDECONOMIEMMIXTE'=>0, // 1 - 'SOCIETECOOPERATIVEDINTERETCOLLECTIFARESPONSABILITESLIMITEEETACAPITALVARIABLE'=>0, // 1 - 'SACONSEILDADMINISTRATIONETDIRECTOIRE'=>0, // 1 - 'IFD'=>0, // 1 - 'COOPERATIVEANONYMEACAPITALETPERSONNELVARIABLES'=>0, // 1 - 'STCOOPINTCOLLARLCAPITVA'=>0, // 1 - 'SOCITENCOMMANDITE'=>0, // 1 - 'SMSG'=>0, // 1 - 'EXPLOITATIONAGRICOLE'=>0, // 1 - 'COLLECTIVETERRITORIALE'=>0, // 1 - 'SCCVJS'=>0, // 1 - 'SCOPCAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 1 - 'SCGROUPEMENTFORESTIER'=>0, // 1 - 'SOCITUNIPERSONNELLEDINVESTISSEMENTRISQUE'=>0, // 1 - 'SACOOPRATIVEDINTRTSCOLLECTIFRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SOCITCIVILEPROFESSIONNELLEDEMANDATAIRESJUDICIAIRESLALIQUIDATIONDESENTREPRISES'=>0, // 1 - 'SOCITCOOPATIVEARTISANALE'=>0, // 1 - 'VPI'=>0, // 1 - 'SOCITCOOPRATIVEDECRDITRESPONSABILITSTATUTAIREMENTLI'=>0, // 1 - 'SOCITCIVILEPARTICULIRERESPONSABILITLIMITE'=>0, // 1 - 'UNIONDEMUTUELLES'=>0, // 1 - 'GEA'=>0, // 1 - 'SCOPETRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 1 - 'UNIONDECOOPRATIVECAPITALVARIABLE'=>0, // 1 - 'SICACOOPRATIVESAD'=>0, // 1 - 'EARA'=>0, // 1 - 'EURLENLIQUIDATION'=>0, // 1 - 'RUEDESAVERNE'=>0, // 1 - 'STECIVILEEXPLOITATIONAGRICOLEARESPONSABILITELIMITEE'=>0, // 1 - 'SOCITANONYMEETDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'RUEMENGES'=>0, // 1 - 'STEPARACTIONSSIMPLIFIEEAVECCOMITESURVEILLANCE'=>0, // 1 - 'SOCITCOOPRATIVEDETRAVAILLEURSRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SARLPERSONNELETCAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLERESPONSABILITLIMITECOOPRATIVE'=>0, // 2 - 'KTMULTISERVICES'=>0, // 1 - 'SCIDECONSTRUCTIONVENTEENLIQUIDATION'=>0, // 1 - 'COOPRATIVEAGRICOLEDLEVAGEETDINSMINATIONARTIFICIELLE'=>0, // 1 - 'SACIAP'=>0, // 1 - 'SADESOCITDHABITATIONLOYERMODR'=>0, // 1 - 'SOCITANONYMEDINTRTCOLLECTIFAGRICOLEDIRECTOIRE'=>0, // 1 - 'SADU'=>0, // 1 - 'KOPACPV'=>0, // 1 - 'SOCITCOOPRATIVECAPITALETPERSONNELVARIERGIEPARLIVREVCR'=>0, // 1 - 'SOCITCOOPRATIONDECRDITCAPITALVARIABLE'=>0, // 1 - 'SARLDEDROITNERLANDAIS'=>0, // 1 - 'SCPRLCAPITALVARIABLE'=>0, // 1 - 'PALKSTREETCARYCHAMBERSTORQUAYSOUTHDEVON'=>0, // 1 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFLIBRALEDAVOCATSSOUSFORMESARL'=>0, // 1 - 'GEAC'=>0, // 2 - 'SCOOPRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SCCOOPRATIVEDEMOYENS'=>0, // 1 - 'SOCITRESPONSABILITLIMITESARLDEFAMILLE'=>0, // 1 - 'SASUENDISSOLUTION'=>0, // 1 - 'SCIORANGE'=>0, // 1 - 'SADACS'=>0, // 1 - 'SOCITREDUITEUNAASSOCIUNIQUE'=>0, // 1 - 'SACOOPRATIVEDEPRODUCTIONDHLMCONSEILDESURVEILLANCEETDIRECTOIRECAPITALVARIABLE'=>0, // 2 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITEDEMDECINS'=>0, // 1 - 'COOPDEPRODUCTIONRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'FDRATIONDPARTEMENTALE'=>0, // 1 - 'EURLC'=>0, // 1 - 'SCCONSTITUEENVUEDELATTRIBUTIONDUNIMMEUBLE'=>0, // 1 - 'SCICCAPITALVARIABLE'=>0, // 1 - 'SCARESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SARLDEPRESSEASSOCIUNIQUE'=>0, // 1 - 'GROUPEMENTFORESTIERCAPITALVARIABLE'=>0, // 1 - 'SOCITUNIPERSONNELLERESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 1 - 'SCSTENLIQUIDATION'=>0, // 1 - 'STCOOPRATIVEDEPRODUCTIONRESPLIMITECAPITALVARIABLE'=>0, // 1 - 'SOCITDCONOMIEMIXTESOCITEANONYMEDECONOMIEMIXTE'=>0, // 1 - 'SOCITCOOPRATIVECRDITCAPITALVARIABLERESPONSABILITLIMITE'=>0, // 1 - 'SCCOOPRATIVEDEMDECINS'=>0, // 1 - 'UNIONDECOOPRATIVESAGRICOLESCAPITALVARIABLEENDISSOLUTION'=>0, // 1 - 'SADECOOPRATIVEDECOMMERANTSDTAILLANTS'=>0, // 1 - 'SASUI'=>0, // 1 - 'RUEALPHONSEDAUDET'=>0, // 1 - 'GIF'=>0, // 1 - 'SARLVARIABLE'=>0, // 1 - 'EARLSOCITENLIQUITATION'=>0, // 1 - 'SCER'=>0, // 1 - 'SOCITCOOPRATIVEAGRICOLERGIONALEDAPPROVISIONNEMENT'=>0, // 1 - 'UARL'=>0, // 1 - 'SCDEBANQUE'=>0, // 1 - 'SCPASSOCIUNIQUE'=>0, // 1 - 'ASO'=>0, // 1 - 'SAIEMLOCALE'=>0, // 1 - 'SOCITCIVILEDEXPLOITATIONAGRICOLESCEA'=>0, // 1 - 'ZARL'=>0, // 1 - 'SOCITCIVILEDEGESTIONDEPATRIMOINE'=>0, // 1 - 'COOPRATIVEDUTILISATIONDEMATRIELAGRICOLEENCOMMUNCOOPRATIVE'=>0, // 2 - 'JEANLOUIS'=>0, // 1 - 'ATI'=>0, // 1 - 'SACCD'=>0, // 1 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFARLCAPITALVARIABLE'=>0, // 1 - 'SOCITRESPONSABILITLIMITESAS'=>0, // 1 - 'SCCAPITALVARIALBE'=>0, // 1 - 'SACAPITALETPERSONNELVARIABLECOOPRATIVE'=>0, // 2 - 'SASSIMPLIFIE'=>0, // 1 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONANONYMECAPITALVARIABLECOOPRATIVE'=>0, // 1 - 'TABLISSEMENTPUBLICDECOOPRATIONCULTURELLE'=>0, // 1 - 'SADEDROITNERLANDAIS'=>0, // 1 - 'BANQUECOOPRATIVESADIRECTOIREETCONSEILDESURVEILLANCEDNOMMCONSEILDORIENTATIONETDE'=>0, // 1 - 'STCOOPRATIVEDEPRODUCTION'=>0, // 1 - 'SADECOOPRATIVEDENTREPRISECAPITALVARIABLE'=>0, // 1 - 'SASSIMPLIFIEE'=>0, // 1 - 'SCEVPARTICULIRE'=>0, // 1 - 'SOCITDEXERCICELIBRALREPONSABILITLIMITE'=>0, // 1 - 'SSCAPITALVARIABLE'=>0, // 1 - 'SOCITCIVILEPROFESSIONNELLEASSOCIUNIQUE'=>0, // 1 - 'SACONSEIL'=>0, // 1 - 'SARLASSOCIUNIQUEETDEXERCICELIBRAL'=>0, // 1 - 'SARLUNIPERSONNELLEEURL'=>0, // 1 - 'SELARLASSOCUNIQUE'=>0, // 1 - 'CAISSEDERASSURANCEMUTUELLEAGRICOLE'=>0, // 1 - 'SCDECONSTRUCTIONVENTR'=>0, // 1 - 'SLCE'=>0, // 1 - 'SOCIETECOOPERATIVECREDITCAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITLIMITESCPRL'=>0, // 1 - 'SCPRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 1 - 'MCMETAL'=>0, // 1 - 'RCSPOINTEPITRE'=>0, // 1 - 'ASSOCIATIONRELIGIEUSEETCULTURELLERGIESELONLALOIDE'=>9220, // 1 - 'GROUPEMENTFONCIERAGRICOLECAPITALVARIABLE'=>0, // 1 - 'ADS'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIEASSOCIEUNIQUE'=>0, // 1 - 'SSARL'=>0, // 1 - 'SCCONSTRUCTION'=>0, // 1 - 'SAENLIEUETPLACEDELASAS'=>0, // 1 - 'SCCR'=>0, // 1 - 'SADIRECTRICEETCONSEILDESURVEILLANCE'=>0, // 1 - 'STECIVILECOOPERATIVEAPERSONNELETKAPVARIABLE'=>0, // 1 - 'EDDINE'=>0, // 1 - 'EXPLOITATIONAGRICOLERESPONSABILITUNIPERSONNELLE'=>0, // 1 - 'SOCIETEPASACTIONSSIMPLIFIEEUNIPERSONNELLE'=>0, // 1 - 'SOCITANONYMECOOPRATIVEDECAUTIONMUTUELLE'=>0, // 1 - 'SKCICA'=>0, // 1 - 'SOCITCOOPRATIVEARTISANALERESPONSABILITELIMITE'=>0, // 1 - 'COOPRATIVEDECRDITCAPITALVARIABLEETARL'=>0, // 1 - 'RGIEMUNICIPALEAUTONOME'=>0, // 1 - 'SOCITCIVLE'=>0, // 1 - 'GICOBUTCOMMERCIAL'=>0, // 1 - 'SASF'=>0, // 1 - 'SRLU'=>0, // 1 - 'SCDHABITATION'=>0, // 1 - 'SOCITENDROITETRANGER'=>0, // 1 - 'SCIARIANE'=>0, // 1 - 'EUAR'=>0, // 2 - 'SARLDEFORMEUNIPERSONNELLE'=>0, // 1 - 'COOPRATIVEDEPRODUCTIONSARLCAPITALVARIABLE'=>0, // 1 - 'SCSOCITENDISSOLUTION'=>0, // 1 - 'SASRUEDUBARGY'=>0, // 1 - 'SARLASSOCIUNIQUELIMITE'=>0, // 1 - 'SOCITCIVILEDESMOYENS'=>0, // 1 - 'SOCITCOOPRATIVEMARITIMECAPITALVARIABLE'=>0, // 1 - 'ASR'=>0, // 1 - 'SARLASSOCIUNIQUEDARCHITECTURE'=>0, // 2 - 'CBA'=>0, // 1 - 'COOPRATIVEDUTILISATIONDEMATRIELAGRICOLECAPITALVARIABLE'=>0, // 1 - 'SCICFORMEANONYME'=>0, // 1 - 'EARLRDUITEUNASSOCI'=>0, // 1 - 'SACOOPRATIVECAPITALVARIABLEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SOCITANONYMECOOPRATIVECOOPRATIVE'=>0, // 2 - 'SCCAC'=>0, // 1 - 'SCIDATTRIBUTIONETDACQUISITION'=>0, // 1 - 'SARLCAPITALLIBR'=>0, // 1 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFFORMEANONYMEETCAPITALVARIABLE'=>0, // 1 - 'SCIVILEAGRICOLE'=>0, // 1 - 'SECA'=>0, // 1 - 'FEUMONSIEUR'=>0, // 1 - 'SADIRECTOIREETCONSEILDORIENTATIONETSURVEILLANCE'=>0, // 1 - 'SAEMLOCALEBUTLUCRATIF'=>0, // 1 - 'SAP'=>0, // 1 - 'MAX'=>0, // 1 - 'SASDIRECTOIREETCONSEILDESURVEIVEILLANCE'=>0, // 1 - 'SACOOPRATIONDEPRODUCTIONDHLM'=>0, // 1 - 'SASACTIONNAIREUNIUQE'=>0, // 1 - 'LACHAPELLEDABONDANCE'=>0, // 1 - 'GIEGIEEUROPEN'=>0, // 1 - 'SAX'=>0, // 1 - 'EURLBRESSEORNEMENTS'=>0, // 1 - 'SCEALAITIRE'=>0, // 1 - 'SARLETSA'=>0, // 1 - 'PR'=>0, // 1 - 'SCPROFESSIONNELLEDADMINISTRATEURSJUDICIAIRES'=>0, // 1 - 'SOARL'=>0, // 1 - 'LESLIE'=>0, // 1 - 'ENTREPRISEUNIPERSONNELLERESPONSABILITLIMITE'=>0, // 1 - 'VRONIQUE'=>0, // 1 - 'SARA'=>0, // 1 - 'SARLDISSOLUTION'=>0, // 1 - 'SOCITRESPONSABILITLIMITERDUITEASSOCIUNIQUE'=>0, // 1 - 'BGRECUPTEMSAS'=>0, // 1 - 'SOCITDEPARGNEETDECRDITCAPITALVARIABLERESPONSABILITLIMITE'=>0, // 1 - 'SOCITCOOPRATIVERESPONABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'EAR'=>0, // 1 - 'SCCL'=>0, // 1 - 'SACONSEILDESURVEILLANCETDIRECTOIRE'=>0, // 1 - 'SARLCAPITALVARIBLE'=>0, // 1 - 'SOCITRESPONSABILITLIMITENONMEMBREDELACEE'=>0, // 1 - 'SARLASSOCIUNIQUESARLUNIPERSONNELLE'=>0, // 1 - 'INSTITUTIONRGIEPARLESLOISETDU'=>0, // 1 - 'SACONSEILDADMINISTRTION'=>0, // 1 - 'DEUROS'=>0, // 2 - 'ARLMEMBREDELACEE'=>0, // 1 - 'ENTREPRISEUNIPERSONNELLERESPONSABILITLIMITEASSOCIUNIQUEUNIPERSONNELLE'=>0, // 1 - 'SARLASSOCIUNIQU'=>0, // 1 - 'SOCITCIVILECONSTITUEPOURLAVENTEDIMMEUBLES'=>0, // 1 - 'SCPARTICULIRECAPITALETPERSONNELVARIABLES'=>0, // 1 - 'COOPRATIVEAGRICOLEDESPRODUCTEURSDELARGIONPOITOUCENTREOUEST'=>0, // 1 - 'SARLASSICUUNIQUE'=>0, // 1 - 'SELARLUNIPERSONNEL'=>0, // 1 - 'SACAC'=>0, // 1 - 'SARLAGENCEDAFFAIRESETPLUSPARTICULIREMENTLAREPRSENTATIONETLENGOCEDETOUTESMARQUES'=>0, // 1 - 'SARLASSOCIUNIQUEDEPRESSE'=>0, // 1 - 'UNIONDESYNDICATSPROFESSIONNELSGROUPANTLESENTREPRISESINSCRITESAURPERTOIREDESMTIERSDANS'=>0, // 1 - 'GROUPEMENTFONCIERRURALCAPITALVARIABLE'=>0, // 1 - 'SOCITRRESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 1 - 'SARLDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SACOOPRATIVEOUVERTEDEPRODUCTIONETDECRDIT'=>0, // 1 - 'SCIEEE'=>0, // 1 - 'SOCIETEPARACTIONSIMPLIFIEEUNIPERSONNELLE'=>0, // 1 - 'SARLMEMBREDELAUE'=>0, // 1 - 'LIE'=>0, // 1 - 'SOCITCIVILEDEPARTICIPATIONFINANCIREDEPROFESSIONLIBRALE'=>0, // 1 - 'SARLCONSTITUEDUNASSOCIEUNIQUE'=>0, // 1 - 'SOCITCOOPRATIVEDINTRETCOLLECTIFARLCAPITALVARIABLE'=>0, // 1 - 'SOCITCIVILEDINTRTCOLLECTIFAGRICOLECAPITALVARIABLE'=>0, // 1 - 'ASSOCIATIONPROFESSIONNELLEFDRATION'=>0, // 1 - 'SOCITCOOPRATIVEARTISANALERESPONSABILITLIMITECOOPRATIVE'=>0, // 1 - 'SCDEGESTIONDEPORTEFFEUILLE'=>0, // 1 - 'SACAPITALACTIONS'=>0, // 1 - 'SAIEM'=>0, // 1 - 'SOCITDINTRTCOLLECTIFAGRICOLECOOPRATIVESTCOOPRATIVEDINTRTCOLLECTIFAGRICOLEANONY'=>0, // 1 - 'SCDINTRTCOLLECTIFANONYME'=>0, // 1 - 'SASAVECCOMITSURVEILLANCE'=>0, // 1 - 'STECIVILECOOPDINTERETCOLLECTIFAGRICOLE'=>0, // 1 - 'SGABTPSARL'=>0, // 1 - 'SARLCAPITALVARIABLEASSOCIUNIQUE'=>0, // 1 - 'SELARLDEMDECINSRADIOLOGUES'=>0, // 1 - 'STEARESPONSABILITELIMITEEACAPITALVARIABLE'=>0, // 1 - 'SELARLDEGOMTRESEXPERTS'=>0, // 1 - 'SARLSOCITAASSOCIUNIQUE'=>0, // 1 - 'SOCITCIVILESCI'=>0, // 1 - 'CIE'=>0, // 1 - 'MABA'=>0, // 1 - 'SACOSACONSEILDADMINISTRATION'=>0, // 1 - 'EARLAVICOLE'=>0, // 1 - 'SCDECONSTRUCTIONVENRTE'=>0, // 1 - 'SARLDEXERCICELIBERAL'=>0, // 1 - 'SACOOPRATIVECONSEILDADMINISTRATIONETCAPITALVARIABLE'=>0, // 1 - 'SCDECONSTRUCTIONVENTELOIDETITREER'=>0, // 1 - 'SOCITDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALERESPONSABILIT'=>0, // 1 - 'SNCENCOURSDELIQUIDATION'=>5202, // 1 - 'SCPEA'=>0, // 2 - 'SCIPAROT'=>0, // 1 - 'SICASOUSFORMEDESAS'=>0, // 1 - 'SARLASOOCIUNIQUE'=>0, // 3 - 'SED'=>0, // 1 - 'SES'=>0, // 1 - 'SCIENCOURSDELIQUIDATION'=>0, // 1 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFESSIONLIBRALEDAVOCATS'=>0, // 1 - 'SCOPREPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'EARLPLURIPERSONNELLE'=>0, // 1 - 'SCPROFESSIONNELLEDELABORATOIREDANALYSESDEBIOLOGIEMDICALE'=>0, // 1 - 'SKCRL'=>0, // 1 - 'TABLISSEMENTPUBLICDECOOPRATIONINTERCOMMUNALE'=>0, // 1 - 'COOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILITLIMIT'=>0, // 1 - 'ABINFORMATIQUEDUCENTRE'=>0, // 1 - 'COMMERANT'=>0, // 1 - 'SOCITRDUITEUNASSOCIUNIQUE'=>0, // 1 - 'WOLFGANG'=>0, // 1 - 'SOCITRESPONSABILITLIMITERDUITEUNASSOCIUNIQUE'=>0, // 1 - 'SOCITCIVILEPARTICULIREDINVESTISSEMENT'=>0, // 1 - 'SARLMEMBREDUE'=>0, // 1 - 'MUTUALIT'=>0, // 1 - 'SOCITCAPITALETPERSONNELVARIABLES'=>0, // 1 - 'SALARL'=>0, // 2 - 'SOCITCIVILECOOPRATIVEDINTRTCOLLECTIFAGRICOLE'=>0, // 1 - 'SOCITDEDROITTRANGE'=>0, // 1 - 'SCDINTRTCOLLECTIFRESPONSABILITLIMITE'=>0, // 1 - 'HENRY'=>0, // 1 - 'COOPRATIVECAPITALVARIABLEETRESPONSABILITELIMITE'=>0, // 1 - 'SOCITCOMMERCIALERESPONSABILITLIMITEDEDROITTRANGER'=>0, // 1 - 'ALT'=>0, // 1 - 'SAEMIXTE'=>0, // 1 - 'SCCCAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 1 - 'SELARLPARACTIONSSIMPLIFIE'=>0, // 1 - 'GIEBUTLUCRATIF'=>0, // 1 - 'SADEDROITAUTRICHIEN'=>0, // 1 - 'SPASN'=>0, // 1 - 'CAISSELOCALEDECRDITMUTUELCAPITALVARIABLE'=>0, // 1 - 'CRDITMUTUELCAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 1 - 'SELAFADAVOCATS'=>0, // 1 - 'FRANCIS'=>0, // 1 - 'SCPROFESSIONNELLEDEMOYENS'=>0, // 1 - 'VILLE'=>0, // 1 - 'MJDMATHISFILS'=>0, // 1 - 'MUTUELLERGIEPARLESDISPOSITIONSDULIVREIIIDUCODEDELAMUTUALIT'=>0, // 1 - 'SOCITRESPONSABILITLIMITEUNIPERSONNEL'=>0, // 1 - 'SARLMCC'=>0, // 1 - 'SCCONSEILDADMINISTRATION'=>0, // 1 - 'SCOPRL'=>0, // 2 - 'SBJC'=>0, // 1 - 'GEPA'=>0, // 1 - 'SASUASSOCIATIONUNIQUE'=>0, // 1 - 'SARLPFR'=>0, // 1 - 'SOC'=>0, // 1 - 'UNIONDECOOPRATIVESMARITIMESFORMEANONYMEETCAPITALVARIABLE'=>0, // 1 - 'SCIDEMARCHANDDEBIENS'=>0, // 1 - 'SAIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SOCITANONYMEDCONOMIEMIXTESOCIETEANONYMEDECONOMIEMIXTES'=>0, // 1 - 'SCOPRESPONSABILITELIMITEETCAPITALVARIALBE'=>0, // 1 - 'SOCITCOOPERATIVECRDITCAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 1 - 'CUMACOOPRATIVEDUTILISATIONDEMATRIELAGRICOLEENCOMMUN'=>0, // 1 - 'LESPALES'=>0, // 1 - 'SARLCOOPRATIVEDINTRTCOLLECTIFAGRICOLE'=>0, // 1 - 'CORRADO'=>0, // 1 - 'SAEMETDIRECTOIRE'=>0, // 1 - 'SOCITRESPONSABILITLIMITEASSOCIUNIQUEUNIPERSONNELLE'=>0, // 2 - 'COOPRATIVESARLCAPITALVARIABLE'=>0, // 1 - 'ARTISAN'=>0, // 1 - 'ISABELLE'=>0, // 1 - 'SCARLCOOPRATIVE'=>0, // 2 - 'SARLASICIUNIQUE'=>0, // 1 - 'EXPLOITATIONAGRICOLEUNIPERSONNELLERESPONSABILITLIMITE'=>0, // 1 - 'CCA'=>0, // 1 - 'SOCITPRIVERESPONSABILITLIMITEDEDROITBELGE'=>0, // 1 - 'UNIONDECOOPERATIVESMARITIMESENANONYME'=>0, // 1 - 'SCICACC'=>0, // 1 - 'SAARLASSOCIUNIQUE'=>0, // 1 - 'RUEDUBOISROBINBOSSERVILLE'=>0, // 1 - 'SAZRL'=>0, // 1 - 'SEA'=>0, // 2 - 'SKICARL'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIECAPITALEUROS'=>0, // 1 - 'SCIDEPRESSE'=>0, // 1 - 'BANQUECOOPRATIVESOCITDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 2 - 'SOCITCOOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILITLIMITECOOPRATIVE'=>0, // 2 - 'UNIONDCONOMIESOCIALEANONYME'=>0, // 1 - 'UNIONDCONOMIESOCIALESARL'=>0, // 1 - 'SOCITDEDROITANGLAISFAISANTAPPELPUBLICLPARGNEPUBLICLIMITEDCOMPAGNY'=>0, // 1 - 'SOCITCOOPRATIVEDECRDITRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEAGRICOLEETCAPITALVARIABLE'=>0, // 1 - 'SOCITANONYMECOOPRATIVEDEPRODUCTIONLOYERMODR'=>0, // 1 - 'TABLISSEMENTPUBLICINTERCOMMUNAL'=>0, // 1 - 'SOCITRESPONSABILITPARACTIONSDEDROITBRITANNIQUE'=>0, // 1 - 'AAS'=>0, // 1 - 'SACOOPRATIVEDINTRTCOLLECTIFDHABITATIONS'=>0, // 1 - 'CC'=>0, // 1 - 'SCPE'=>0, // 1 - 'SOCITCOOPRATIVEARTISANALE'=>0, // 1 - 'SCDEPORTEFEUILLES'=>0, // 1 - 'SCPROFESSIONELLEDENOTAIRES'=>0, // 1 - 'COMMUNAUTDAGGLOMRATION'=>0, // 1 - 'SOCITENNOMNOLLECTIF'=>0, // 1 - 'UNIONDECOOPRATIVESAGRICOLEPERSONNELETCAPITALVARIABLES'=>0, // 1 - 'SATLASSOCIUNIQUE'=>0, // 1 - 'SCDEPLACEMENTCOLLECTIFIMMOBILIER'=>0, // 1 - 'SPFLA'=>0, // 1 - 'SOCITCOOPRATIVEDEXPLOITATIONAGRICOLE'=>0, // 1 - 'SDEASSOCIUNIQUE'=>0, // 1 - 'SARLMENBREDELUE'=>0, // 1 - 'SASCOOPRATIVEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONFORMEANONYME'=>0, // 1 - 'SARLDEDROITAMRICAIN'=>0, // 1 - 'SOCITCIVILECONSTRUCTIONVENTE'=>0, // 3 - 'COOPRATIVEAGRICOLERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 2 - 'SARLDECOOPRATIVEOUVRIREDEPRODUCTION'=>0, // 1 - 'COOPRATIVEOUVRIREDEPRODUCTIONANONYMECAPITALETPERSONNELVARIABLECOOPRATIVE'=>0, // 1 - 'SCILAVENIR'=>0, // 1 - 'SKPRLCV'=>0, // 2 - 'SOCITDECAUTIONMUTUELLECAPITABLEVARIABLE'=>0, // 1 - 'SARLOUASSOCIUNIQUE'=>0, // 1 - 'SOCITRESPONSABILITLIMITEASSOCIUNQIUE'=>0, // 1 - 'SARLDEPRODUCTIONCAPITALVARIABLE'=>0, // 1 - 'EUARLASSOCIUNQIUE'=>0, // 1 - 'SEARESPONSABILITLIMITE'=>0, // 1 - 'TYRONE'=>0, // 1 - 'SCPROFESSIONNELLEDEVTRINAIRE'=>0, // 1 - 'SARLUNIPERSSONELLE'=>0, // 1 - 'SELALSASSOCIUNIQUE'=>0, // 1 - 'SICACOPPRATIVE'=>0, // 1 - 'LESCARABES'=>0, // 1 - 'SOCITRESPONSABILITLIMLITESARL'=>0, // 1 - 'GHISLAINE'=>0, // 1 - 'SARLENCOURSDEFORMATION'=>0, // 1 - 'SCEARLASSOCIUNIQUE'=>0, // 1 - 'SERALASSOCIUNIQUE'=>0, // 1 - 'ASSOCIAION'=>9220, // 1 - 'SCMC'=>0, // 1 - 'SOCITCOOPRATIVECAPITALETPERSONNEVARIABLERGIEPARLIVREVCR'=>0, // 1 - 'SCIRORO'=>0, // 1 - 'SARLCOOPRATIVEETCAPITALVARIABLE'=>0, // 2 - 'POURHOMMESFEMMESOUENFANTS'=>0, // 1 - 'RCSCOLMAR'=>0, // 1 - 'TANTENFRANCEQULTRANGERTLSURVEILLANCEVIDOSURVEILLANCEGARDIENNAGESCURITDESPERSO'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIASSOCIUNIQUE'=>0, // 1 - 'SOCITDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALERESPONSABILITLIMITEDAVOCATS'=>0, // 1 - 'ASS'=>0, // 1 - 'UNIONCOOPRATIVEAGRICOLESCAPITALVARIABLE'=>0, // 1 - 'PERSONNESPHYSIQUESEXERANTTITREINDIVIDUELOUINDPENDANT'=>0, // 1 - 'SARLCAPITALVARIALBE'=>0, // 1 - 'SRRL'=>0, // 1 - 'SMCE'=>0, // 1 - 'SARLSOCITUNIQUEASSOCIUNIQUE'=>0, // 1 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFESSIONLIBRALE'=>0, // 1 - 'SCOPARLETCAPVARIABLE'=>0, // 1 - 'SOCITANONYMEDECONOMIEMIXTELOCALECONSEILDESURVEILLANCEETDIRECTOIRE'=>0, // 1 - 'RUESELLENIK'=>0, // 1 - 'SCADINTRTCOLLECTIFAGRICOLE'=>0, // 1 - 'SCCU'=>0, // 1 - 'SCIENCONSTRUCTIONVENTELOIDETITRE'=>0, // 1 - 'STECOOPERATIVEDINTERETCOLLECTIFARESPONSABILITELIMITEE'=>0, // 1 - 'SCDUCONSTRUCTIONVENTE'=>0, // 1 - 'ETABLISSEMENTPUBLICLOCALCARACTREINDUSTRIELETCOMMERCIAL'=>0, // 1 - 'SOCIETEDINTERETCOLLECTIFAGRICOLESICAENSARL'=>0, // 1 - 'SCGROUPEMENTPASTORALCAPITALVARIABLE'=>0, // 1 - 'ASSOCIAITONLOI'=>9220, // 1 - 'SELARLDENTREPRISEUNIPERSONNELLE'=>0, // 1 - 'SEARLRESPONSABILITLIMITE'=>0, // 1 - 'SCDEMOYENSUNIPERSONNELLE'=>0, // 1 - 'SOCITANONYMECAPITALETPERSONNELVARIABLECOOPRATIVE'=>0, // 1 - 'SCDEPLACEMENTSIMMOBILIERSCAPITALVARIABLE'=>0, // 1 - 'SOCITUNIPERSONNELLE'=>0, // 1 - 'SOCITCOOPRATIVEAGRICOLERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'GIEPERSONNELETCAPITALVARIABLES'=>0, // 1 - 'SCPROFEESSIONNELLE'=>0, // 1 - 'SOCITDEDROITTRANGERIMMATRICULEAURCS'=>0, // 1 - 'SOCITCIVILECONSTITUEENGROUPEMENTFORESTIER'=>0, // 1 - 'SCPRORESSIONNELLEDEVTRINAIRES'=>0, // 1 - 'COOPRATIVEDUTILISATIONDEMATRIELAGRICOLEENCOMMUNCAPITALVARIABLE'=>0, // 1 - 'SOCITDASSURANCESFORMEMUTUELLE'=>0, // 1 - 'SABELGE'=>0, // 1 - 'SCDEPRODUCTIONRESPONSABILITLIMITE'=>0, // 1 - 'SOCITRESPONSAIBILITLIMITE'=>0, // 1 - 'SACAPITALVARIABLEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SCPDAVOCATFORMECOOPRATIVE'=>0, // 1 - 'SARLDEXERCIELIBRAL'=>0, // 1 - 'SOCITDASSURANCESMUTUELLEVIECAPITAL'=>0, // 1 - 'ENTREPRISEINDIVIDUELLECOMMERCIALE'=>0, // 1 - 'EARLENCOMMUN'=>0, // 1 - 'SCMCAPITALVARIABLECAPITALMINFIXEEUROS'=>0, // 1 - 'SARLREDUITEUNEASSOCIUNIQUE'=>0, // 1 - 'ANNIECOIFFURE'=>0, // 1 - 'SARLCOOPRATIVECAPITALETPERSONNELVARIABLE'=>0, // 1 - 'SCPROFESSIONNELLLE'=>0, // 1 - 'SCIENDISSOLUTION'=>0, // 1 - 'SARLKINGSTREETWORGRANDEBRETAGNEROYAUMEUNI'=>0, // 1 - 'SOCITDEXERCICELIBRALPARACTIONSIMPLIFIECAPITALVARIABLE'=>0, // 1 - 'GIESANSBUTLUCRATIFENLIQUIDATION'=>0, // 1 - 'SOCITAGRICOLESARL'=>0, // 1 - 'SEIE'=>0, // 1 - 'RCSQUIMPERD'=>0, // 1 - 'FIJ'=>0, // 1 - 'SARLENFORMATION'=>0, // 1 - 'THIERRY'=>0, // 1 - 'MUTELLE'=>0, // 1 - 'SARLDECRDITCAPITALVARIABLE'=>0, // 1 - 'SADIRECTOIREETCONSELDESURVEILLANCE'=>0, // 1 - 'SADEDROITESPAGNOL'=>0, // 1 - 'MESSIEURS'=>0, // 1 - 'COOPRATIVECOMMERCIALERESPONSABILITLIMITETCAPITALVARIABLE'=>0, // 1 - 'SARLASSOCIUNIQUEETSARLUNIPERSONNELLE'=>0, // 1 - 'UNIONDECOOPRATIVESAGRICOLESCOOPRATIVE'=>0, // 1 - 'SARLDEDROITTCHQUE'=>0, // 1 - 'SACOOPRATVEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'LASOCITCIVILE'=>0, // 1 - 'SKCCVRL'=>0, // 1 - 'CONSTRUCTIONDIMMEUBLES'=>0, // 1 - 'GROUPEFONCIERRURAL'=>0, // 1 - 'SOCITCOOPRATIVEDECRDITRESPONSABILITSTATUTAIREMENTLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SARLCOOPOUVRIREDEPRODUCTIONETCRDIT'=>0, // 1 - 'SCJ'=>0, // 1 - 'SARLUNPERSONNELLE'=>0, // 1 - 'MEIJIX'=>0, // 1 - 'SARLREDUITEASOCIEUNIQUE'=>0, // 1 - 'SOCITANONYMEPARTICIPATIONOUVRIRE'=>0, // 1 - 'EARLASSOCIASSOCI'=>0, // 1 - 'SOCITRESPONSABILITLIMITEDEFAMILLE'=>0, // 1 - 'SOCIETEPARACTIONSDEDROITITALIEN'=>0, // 1 - 'SOCITDESOCITTRANGER'=>0, // 1 - 'SICAARL'=>0, // 1 - 'SCAV'=>0, // 1 - 'TABLISSEMENTPUBICNATIONAL'=>0, // 1 - 'O'=>0, // 1 - 'SCOPANONYMECAPITALETPERSONNEVARIABLES'=>0, // 1 - 'SELRULR'=>0, // 1 - 'SAI'=>0, // 1 - 'SOCITCIVILEDECOOPRATIVEAGRICOLECAPITALVARIABLE'=>0, // 1 - 'VENTE'=>0, // 1 - 'SELARLDAVOCATS'=>0, // 1 - 'SCKA'=>0, // 1 - 'SOCITCOOPRATIVERESPONSABILITLIMITECOOPRATIVE'=>0, // 1 - 'STRANGREISSUEDELESPACEECONOMIQUEEUROPEN'=>0, // 1 - 'SOCITANONYMEDIRECTOIRECONSEILDESURVEILLANCE'=>0, // 1 - 'SASAIC'=>0, // 1 - 'COOPERATIVES'=>0, // 1 - 'COOPRATIVEAGRICOLEDPARTEMENTALE'=>0, // 1 - 'CONSTRUCTIONDIMMEUBLESVENTE'=>0, // 1 - 'SOCIETECOOPERATIVEDINTERETCOLLECTIFAGRICOLESICA'=>0, // 1 - 'SASUNIERSONNELLE'=>0, // 1 - 'SACSURV'=>0, // 1 - 'SICASOUSFORMEDESOCITANONYMECOOPRATIVE'=>0, // 1 - 'UNIONCOMMERCIALE'=>0, // 1 - 'SACOOPRATIVEOUVRIREDEPRODUCTIONETDECRDITCONSEIL'=>0, // 1 - 'SCOPDHABITATIONSLOYERMODRFOMEANONYMEETCAPITALVARIABLE'=>0, // 1 - 'ETABLISSEMENT'=>0, // 1 - 'SCEAENCOMMUN'=>0, // 1 - 'SOCIETEUNIPERSONNELLEARESPONS'=>0, // 1 - 'SCDECONCTRUCTIONVENTE'=>0, // 1 - 'SCPRLCV'=>0, // 1 - 'SASSA'=>0, // 1 - 'UKA'=>0, // 1 - 'SOCITAONYME'=>0, // 1 - 'SCCI'=>0, // 1 - 'SOCITTRANGREIMMATRUCLEAURCS'=>0, // 1 - 'SACOOPRATIVEMARITIMEETCAPITALVARIABLE'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIESOCITPARACTIONSSIMPLIFIEPLURIPERSONNELLE'=>0, // 1 - 'SALERL'=>0, // 1 - 'COOPRATIVEDECONSOMMATIONENSACAPITALVARIABLE'=>0, // 1 - 'SCPARTICULIREASSOCIUNIQUEEARL'=>0, // 1 - 'RCSTHIONVILLEB'=>0, // 1 - 'SARLOUVRIREDEPRODUCTION'=>0, // 1 - 'SADEBANQUECOOPRATIVEDIRECTOIREETCONSEILDORIENTATIONETDESURVEILLANCE'=>0, // 1 - 'SCCCV'=>0, // 1 - 'AAD'=>0, // 1 - 'SCPARTICULIREASSOCIUNIQUE'=>0, // 1 - 'SCPARLCV'=>0, // 1 - 'GFI'=>0, // 1 - 'UNIONDECOOPRATIVESMARITIMESANONYME'=>0, // 1 - 'ATH'=>0, // 1 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONCRDITSARL'=>0, // 1 - 'CAISSEMUTUELLERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVVERESPONSABILITLIMIT'=>0, // 1 - 'SADECONSEILDADMINISTRATION'=>0, // 1 - 'SOCITANONYMEOBJETSPORTIFDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SARLLAGRANGE'=>0, // 1 - 'SCIAA'=>0, // 1 - 'SACOOPRATIVEDIRECTOIREETCONSEILDESURVEILLANCEETCAPITALVARIABLE'=>0, // 1 - 'SICASOUSFORMEDESA'=>0, // 1 - 'SOCITCOOPRATIVEOUVRIREDEPRODUCTIONANONYMEETCAPITALVARIABLE'=>0, // 1 - 'SASAUFCOOPR'=>0, // 1 - 'COMPAGNIE'=>0, // 1 - 'SCCONSTITUEENVUEDELATTRIBUTIONDIMMEUBLE'=>0, // 1 - 'SACOOPRATIVEARTISANALECONSEILDADMINISTRATION'=>0, // 1 - 'SCACOOPRATIVECAPITALVARIABLE'=>0, // 1 - 'SCCOOPRATIVEAGRICOLECOOPRATIVE'=>0, // 1 - 'SOCITDEDROITTRANGERCARYCHAMBERSPALKSTREETTQELTORQUAYDEVONGRANDEBRETAGNE'=>0, // 1 - 'SARLASSOCISUNIQUE'=>0, // 1 - 'SOCITSCOOPRATIVES'=>0, // 1 - 'SOCITOUVRIREDEPRODUCTIONRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEEXPLOITESOUSFORMEDESARL'=>0, // 2 - 'HERV'=>0, // 1 - 'COOPRATIVEOUVRIREDEPRODUCTIONRESPONSABILITLIMITESOCIETECOOPERATIVEOUVRIEREDEPRODUCTI'=>0, // 1 - 'CAISSEDPARGNE'=>0, // 1 - 'DISTRICLUBMDICAL'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIERDUITELASSOCIUNIQUE'=>0, // 1 - 'SCKON'=>0, // 1 - 'ROBERT'=>0, // 1 - 'GAE'=>0, // 1 - 'SCPROFESSONNELLEDHUISSIERSDEJUSTICE'=>0, // 1 - 'QOCITRESPONSABILITLIMITE'=>0, // 1 - 'SARLAAU'=>0, // 1 - 'SICAVAS'=>0, // 1 - 'SACOOPERATIVECAPITALVARIABLE'=>0, // 1 - 'SCDECONSTRUCTIONATTRIBUTION'=>0, // 1 - 'SOCITDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALEDENOTAIRERESPONSABILITLIMITEUNI'=>0, // 1 - 'SADEDROITSUISSESOCIETEETRANGERE'=>0, // 1 - 'SOCITDEDROITISLANDAIS'=>0, // 1 - 'GFRETSC'=>0, // 1 - 'SYNDIC'=>0, // 1 - 'FLORENT'=>0, // 1 - 'AVP'=>0, // 1 - 'UNIONDCONOMIESOCIALESOCITCOOPRATIVEFORMEANONYME'=>0, // 1 - 'SOCIETECOOPERATIVEACAPITALVARIABLESARL'=>0, // 1 - 'SARLJU'=>0, // 1 - 'SACOOPRATIVEOUVRIREDEPRODUCTIONRESPONSABILITLIMITE'=>0, // 1 - 'SASUACTIONNAIREUNIQUE'=>0, // 1 - 'SOCITDPARGNEFORESTIRE'=>0, // 1 - 'SOCITPARACTIONSIMPLIFIE'=>0, // 1 - 'SOCITCIVILEIMMOBILIREASSOCIUNIQUE'=>0, // 1 - 'SACOOPRATIVEOUVRIREPERSONNELETCAPITALVARIABLE'=>0, // 1 - 'SCH'=>0, // 1 - 'SARR'=>0, // 1 - 'SARLCOOPERATIVROUVRIEREDEPRODUCTIONETDECREDIT'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIS'=>0, // 1 - 'STB'=>0, // 1 - 'SAARL'=>0, // 1 - 'GROUPEMENTDEMPLOYEURSAGRICOLES'=>0, // 1 - 'TWO'=>0, // 1 - 'COOPRATIVEDECRDITCAPITALVARIABLERESPSTATUTAIREMENTLIMITE'=>0, // 1 - 'EUBAL'=>0, // 1 - 'GFASOCITENLIQUIDATIONAMIABLE'=>0, // 1 - 'SACDEPHARMACIENSDOFFICINECAPITALVARIABLEETCONSEILDADMINISTRATION'=>0, // 1 - 'IMMEUBLEMIDASANQUETILCENTER'=>0, // 1 - 'COPRL'=>0, // 1 - 'SARLENTREPRISEUNIPERSONNELLEARESPONSLIMITEE'=>0, // 1 - 'SASDHABITATIONDELOYERMODR'=>0, // 1 - 'INSTITUTIONRGIESELONLESLOISDUAOTETDUDCEMBRE'=>0, // 1 - 'SAPLAC'=>0, // 1 - 'SCOPPERSONNELETCAPITALVARIABLES'=>0, // 1 - 'STEDINTERETCOLLECTIFAGRICOLESAACAPITALVARIABLE'=>0, // 1 - 'SOCITANONYMEDECONOMIEMIXTELOCALESAEML'=>0, // 1 - 'GFASOCITENLIQUIDATION'=>0, // 2 - 'SARLAASSIOCIEUNIQUE'=>0, // 1 - 'SAPC'=>0, // 1 - 'SCPARTICULIREENLIQUIDATIONAMIABLE'=>0, // 1 - 'SOCITANONYMECOOPRATIVEARTISANALEDIRECTOIRE'=>0, // 1 - 'SOCITDEDROITPORTUGAIS'=>0, // 1 - 'STECOOPERATIVEARESPONSABILITELIMITEETACAPITALVARIABLE'=>0, // 1 - 'SARLCOOPRATIVECAPITALVARIABLEDINTERTCOLLECTIF'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIEACTIONNAIREUNIQUE'=>0, // 1 - 'AKDENIZ'=>0, // 1 - 'SCMENLIQUIDATION'=>0, // 1 - 'SAVA'=>0, // 1 - 'SOCITCOOPRATIVEDECAUTIONMUTUELLELOIMARS'=>0, // 1 - 'SADEDROITSSUISSES'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIEUNIVERSELLE'=>0, // 1 - 'CMO'=>0, // 1 - 'STEUNIPERSONNELLEARESPONSABILITELIMITEEACAPITALVARIABLE'=>0, // 1 - 'SARLVOCATIONIMMOBILIRE'=>0, // 1 - 'SARLASSOCIUNIQE'=>0, // 1 - 'SCCIMMOBILIRE'=>0, // 1 - 'SACONSEILDADMINISTRATIONR'=>0, // 1 - 'SOCITCIVILEPROFESSIONNELLETITULAIREDUNOFFICEDEGREFFIERDETRIBUNALDECOMMERCE'=>0, // 1 - 'SASCONSTITUEDUNASSOCIUNIQUE'=>0, // 1 - 'SACONSEILDADMIISTRATION'=>0, // 1 - 'GIEENDISSOLUTION'=>0, // 1 - 'VALRIE'=>0, // 1 - 'SACOOPRATIVEDEPRODUCTIONDHABITATIONLOYERMODR'=>0, // 1 - 'SASOCITANONYME'=>0, // 1 - 'SICAVL'=>0, // 1 - 'SARLASSOCIUNQUE'=>0, // 1 - 'EALR'=>0, // 1 - 'SOCITDEDROITTRANGERSOMERSETHOUSEPRICESTREETBLZBIRMINGHAMGRANDEBRETAGNE'=>0, // 1 - 'SCICVENTE'=>0, // 1 - 'SELARLDEPHARMACIENS'=>0, // 1 - 'SOCITCOMMERCIALETRANGRE'=>0, // 1 - 'SOCITCIVILEDECOOPRATIVEAGRICOLE'=>0, // 1 - 'SOCITCIVILECOOPRATIVEDEMOYENSCAPITALVARIABLE'=>0, // 1 - 'RUELONDIEUD'=>0, // 1 - 'NOUVELLESOCITRESPONSABILITLIMITERDUITEASSOCIUNIQUE'=>0, // 1 - 'AVASPE'=>0, // 1 - 'SELARASSOCIUNIQUE'=>0, // 1 - 'FRANCESCA'=>0, // 1 - 'SCSE'=>0, // 1 - 'SPPROFESSIONNELLE'=>0, // 1 - 'SCDEXPLOITATIONHORTICOLE'=>0, // 1 - 'CFA'=>0, // 2 - 'SOCITDINTRTCOLLECTIFAGRICOLEARL'=>0, // 1 - 'SCCCAPITALVARIABLE'=>0, // 1 - 'SADECAUTIONMUTUELLE'=>0, // 1 - 'GROUP'=>0, // 1 - 'PERSONNEMORALEDEDROITPRIVBUTNONLUCRATIF'=>0, // 1 - 'SOCITPRIVERESPONSABILITLIMITERELEVANTDUDROITBELGE'=>0, // 1 - 'CI'=>0, // 1 - 'GROUPEMENTDINTRTCONOMIQUESANSBUTLUCRATIF'=>0, // 1 - 'EVSAL'=>0, // 1 - 'SOCITMEMBREDELUE'=>0, // 1 - 'LECHARVET'=>0, // 1 - 'SCIMARIQUITA'=>0, // 1 - 'SKACAPITALVARIABLE'=>0, // 1 - 'SARLSCOP'=>0, // 1 - 'SCPDAVOCATSAUXCONSEILS'=>0, // 1 - 'COOPENSARL'=>0, // 1 - 'SARLPATRIMONIALE'=>0, // 1 - 'SOCITAONYMEDECONOMIEMIXTE'=>0, // 1 - 'SARLASSOCOUNIQUE'=>0, // 1 - 'RUEDESVERGERS'=>0, // 1 - 'CENTRECOMMERCIAL'=>0, // 1 - 'SOCITENCOMMANDITEPARACTIONSNONMEMBREDELACOMMUNAUTEUROPENNEOUNONPARTIELACCORDSU'=>0, // 1 - 'SARLLAIRDUTEMPS'=>0, // 1 - 'SOCITCIVILECOOPRATIVEPERSONNELETCAPITALVARIABLES'=>0, // 1 - 'SCIENDISSOLUITION'=>0, // 1 - 'RA'=>0, // 1 - 'SOCITPRIVERESPONSABILITLIMITE'=>0, // 1 - 'SCILESVILLASDEBAGATELLE'=>0, // 1 - 'COOPRATIVEDETRANSPORTANONYMECONSEILDADMINISTRATIONETCAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFFORMEANONYME'=>0, // 1 - 'SACCOPRATIVEDACHATENCOMMUN'=>0, // 1 - 'SCOPDECRDITRESPONSABILITLIMITE'=>0, // 1 - 'SOCITANONYMECOOPRATIVEPERSONNELETCAPITALVARIABLE'=>0, // 1 - 'SCDECONSTRUCTIONVENTELOIDETITREO'=>0, // 1 - 'COOPRATIVEFORMEANONYME'=>0, // 1 - 'UNIONRGIONALEDETRANSPORTEURSROUTIERS'=>0, // 1 - 'ASSOCIATIONSPORTIVE'=>9220, // 1 - 'SOCITANONYMENONMEMBREDELUE'=>0, // 1 - 'SCIASSOCIATIONLOI'=>9220, // 1 - 'COOPRATIVERESPONSABILITETCAPITALVARIABLE'=>0, // 1 - 'SRLPMINTERNATIONAL'=>0, // 1 - 'SARLCAPITALEVARIABLE'=>0, // 1 - 'SELARC'=>0, // 1 - 'SOCIETECOOPERATIVEAGRICOLEACAPITALVARIABLELOIN'=>0, // 1 - 'SOCITCIVILEDECONSTRUCTIONVENTEENLIQUIDATION'=>0, // 1 - 'SOCIETESIMPLE'=>0, // 1 - 'SYNDICATPROFESSIONNELENTREPRISERGIEPARLARTICLELDUCODERURALLOIDUJUILLET'=>0, // 1 - 'COOPRATIVEARTISANALEFORMEDESOCITRESPONSABILITLIMIT'=>0, // 1 - 'GIECOMMERCIALENLIQUIDATION'=>0, // 1 - 'COOPRATIVEDECRDIT'=>0, // 1 - 'SOCITANONYMECOOPRATIVEDINTRTCOLLECTIFAGRICOLEDIRECTOIRE'=>0, // 1 - 'SADADMINISTRATION'=>0, // 1 - 'SOCITDEXERCICELIBRALPARACTIONS'=>0, // 1 - 'SACONSEILDADMINISTRATIVE'=>0, // 1 - 'SOCITCIVILEPROFESSIONNELLEDADMINISTRATEURSJUDICIAIRES'=>0, // 1 - 'SCPT'=>0, // 1 - 'SOCITCIVILEIIMMOBILIRE'=>0, // 1 - 'EARLSOCITENLIQUIDATION'=>0, // 1 - 'COOPOUVRIEREDEPRODUCTIONARLACAPITALVARIABLE'=>0, // 1 - 'SELAFADEGOMTRESEXPERTS'=>0, // 1 - 'SARLAASSOCIEUNIQUE'=>0, // 2 - 'RLUNI'=>0, // 1 - 'SARLSDA'=>0, // 1 - 'SARLUNIQUE'=>0, // 1 - 'JEANPAUL'=>0, // 1 - 'RUENATIONALE'=>0, // 1 - 'INSTITUTIONRGIELOISDUAOTETDUDCEMBRE'=>0, // 1 - 'SASASSOCIEUNIQUEDEPUISCESSIONDELINTEGRALITEDESTITRESAMINIRECTIFICATION'=>0, // 1 - 'SNCF'=>0, // 1 - 'SOCITANONYMEDCONOMIEMIXTEETDIRECTOIRE'=>0, // 1 - 'SCCCAPITALETPERSONNELVARIABLE'=>0, // 1 - 'SCUMACV'=>0, // 1 - 'SEE'=>0, // 2 - 'EE'=>0, // 1 - 'SOCITANONYMEDECONOMIEMIXTE'=>0, // 2 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLEFORMEANONYMEETCAPITALVARIABLE'=>0, // 1 - 'SOCITDECRDITMARITIME'=>0, // 1 - 'SARLMEMBRELUE'=>0, // 1 - 'ASSOCIATIONDELOI'=>9220, // 1 - 'BANQUECOOPRATIVESADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 2 - 'TABLISSEMENTDECRDITBUTLUCRATIF'=>0, // 1 - 'SCPRESPONSABILITLIMITE'=>0, // 1 - 'MONIQUE'=>0, // 1 - 'SCDECONSTRUCTIONVENTEENLIQUIDATION'=>0, // 2 - 'EARLRDUITEUNASSOCIUNIQUE'=>0, // 1 - 'SSCGP'=>0, // 1 - 'SARLROSIERETFILS'=>0, // 1 - 'SAEMLDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SCPROFESSIONNELLEDAVOCATSAUCONSEILDETATETLACOURDECASSATION'=>0, // 1 - 'SOCITCOOPRATIVEDECRDITRESPONSABILITSTATUTAIREMENTLIMITECOOPRATIVE'=>0, // 1 - 'SARLSOMERSETHOUSETEMPLESTREETBIRMINROYAUMEUNI'=>0, // 1 - 'FDA'=>0, // 1 - 'CRDITMUTUELCOOPRATIVECAPITALVARIABLE'=>0, // 1 - 'EUROSFIXE'=>0, // 1 - 'FORMEASSOCIATION'=>9220, // 1 - 'SARLENCOOPRATIVECAPITALVARIABLE'=>0, // 1 - 'SARLASSOCILIMITE'=>0, // 1 - 'COPARL'=>0, // 1 - 'EUTL'=>0, // 1 - 'EARLASSOCIUNIQUEETCAPITALVARIABLE'=>0, // 2 - 'SOCITRESPONSABILITLIMITEDEDROITBRITANNIQUE'=>0, // 1 - 'SOCITDASSURANCESMUTUELLESCAPITALVARIABLE'=>0, // 1 - 'SARLAVECPOURSUITEDACTIVITJUSQUAU'=>0, // 1 - 'SARLCOOPERATIVECREDITCAPITALVARIABLE'=>0, // 1 - 'SCENLIQUIDATIONAMIABLE'=>0, // 1 - 'SARLASSOCIUNIAUE'=>0, // 1 - 'SARLASSOCIASSOCIUNIQUE'=>0, // 1 - 'EGMBATIMENT'=>0, // 1 - 'EUARLRESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 1 - 'SOCITANONYMEEXERCICELIBRALSOCIETEDEXERCICELIBERALAFORMEANONYMEDEGEOMETRESEXPERTS'=>0, // 1 - 'ABEL'=>0, // 1 - 'SASDEXPERTISECOMPTABLE'=>0, // 1 - 'SASARL'=>0, // 1 - 'COOPRATIVEARTISANALERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'C'=>0, // 1 - 'SOCITDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALEDAVOCATCONSTITUESOUSFORMEDESAR'=>0, // 1 - 'SOCITENCOMMANDITEDEDROITALLEMAND'=>0, // 1 - 'EARLABIDEP'=>0, // 1 - 'SCIDECONTRUCTIONVENTE'=>0, // 1 - 'SAFAM'=>0, // 1 - 'SAAL'=>0, // 1 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITESELARL'=>0, // 1 - 'SELARLRDUITEUNASSOCIUNIQUE'=>0, // 1 - 'SOCITCOOPRATIVEDECRDITCAPITALVARIABLEETRESPONSABILIT'=>0, // 1 - 'SCEAASSOCIUNIQUE'=>0, // 1 - 'CMU'=>0, // 1 - 'SAKD'=>0, // 1 - 'SCAICA'=>0, // 1 - 'SOCITCOOPRATIVERESPONSABILITECAPITALVARIABLE'=>0, // 1 - 'STCOOPDEPRODUCTIONSARL'=>0, // 1 - 'COULEURCAF'=>0, // 1 - 'COOPRATIVEOUVRIREDEPRODUCTIONFORMEANONYME'=>0, // 1 - 'STEXLIBRALRESPONSABILTLIMITE'=>0, // 1 - 'SCDECONSEILETASSURANCEQUALIT'=>0, // 1 - 'SOCITDEXERCICELIBRALERESPONSABILITLIMITE'=>0, // 1 - 'SCU'=>0, // 1 - 'EXPLOITATIONAGRICOLESRESPONSABILITLIMITE'=>0, // 1 - 'ENTREPRISEUNIPERSONNELLEDEXERCICELIBRALRESPONSABILITLIMITE'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONENSARLCAPITALVARIABLE'=>0, // 1 - 'ETABLISSEMENTPUBLICDELETAT'=>0, // 1 - 'SEIDELESPACEECONOMIQUEEUROPEN'=>0, // 1 - 'SOCITAGRICOLEDEXPLOITATIONAGRICOLESCEA'=>0, // 1 - 'SOCIETECOOPERATIVEOUVRIERESDEPRODUCTIONARESPONSABILITELIM'=>0, // 1 - 'SICASOUSFORMEDESTEANONYME'=>0, // 1 - 'SASCOMPTERDU'=>0, // 1 - 'SACP'=>0, // 1 - 'STEDINTERETCOLLECTIFAGRICOLESAACAPITALETPERSONNELVARI'=>0, // 1 - 'SACOOPRATIVEDECOMMERANTSDTAILLANTSCONSEILDADMCAPITALVARIABLE'=>0, // 1 - 'SARLAGRICOLEDEFAMILLE'=>0, // 1 - 'SADCONOMIEMIXTEETLOCALE'=>0, // 1 - 'SCPARTICULIREDITEDEPARTICIPATIONOUDEPORTEFEUILLEETCAPITALVARIABLE'=>0, // 1 - 'SCOPRESPONSABILITLIMITEETDECRDIT'=>0, // 1 - 'AGENCECOMMERCIALEDUNTATTRANGER'=>0, // 1 - 'CDS'=>0, // 1 - 'UNIONDCONOMIESOCIALESARLCAPITALVARIABLE'=>0, // 1 - 'COOPRATIVEOUVRIREDEPRODUCTIONRESPONSABILITLIMIT'=>0, // 1 - 'SOCITCIVILESPROFESSIONNELLEDINFIRMIERS'=>0, // 1 - 'SARLMEMBREDELUNIONEUROPENNE'=>0, // 1 - 'GIESANSBUTLUCRATIFSOCITENLIQUIDATION'=>0, // 1 - 'STCOMMANDITEPARACTIONSCOOPRATIVE'=>0, // 1 - 'SCOPRESPONSABILITCAPITALVARIABLE'=>0, // 1 - 'UNIONDCONOMIESOCIALEETSOCITCOOPRATIVECIVILE'=>0, // 1 - 'STECOOPERATIVEDEPRODUCTIONARESPONSABILITELIMITEE'=>0, // 1 - 'SCVA'=>0, // 1 - 'SARLCARACTREPLURIPERSONNEL'=>0, // 1 - 'SOCIETEANONYMEPARACTIONS'=>0, // 1 - 'SOCITESPONSABILITLIMITE'=>0, // 1 - 'SEI'=>0, // 1 - 'COOPRATIVEOUVRIREDERODUCTIONANONYMECAPITALETPERSONNELVARIABLE'=>0, // 1 - 'SCDECONSTRUCTIONENTE'=>0, // 1 - 'SICACIVIL'=>0, // 1 - 'SELEFACONSEILDADMINISTRATION'=>0, // 1 - 'SARLCOOPERATIVECAPITALVARIABLEASSOCIUNIQUE'=>0, // 1 - 'CAISSEDERETRAITE'=>0, // 1 - 'SARLSOCITENLIQUIDATIONJUDICIAIRE'=>0, // 1 - 'SBM'=>0, // 1 - 'SOCITANONYMESA'=>0, // 1 - 'SACOOPRATIVEDEPRODCUTIONDHABITATIONLOYERMODRER'=>0, // 1 - 'TGI'=>0, // 1 - 'SCIGB'=>0, // 1 - 'SICAANONYME'=>0, // 1 - 'SADIRECTIONETCONSEILDESURVEILLANCE'=>0, // 1 - 'SARLDEDROITBRITANIQUE'=>0, // 1 - 'SADIRECTOIREETCONSEILETSURVEILLANCE'=>0, // 1 - 'SELARLDINFIRMIERS'=>0, // 1 - 'CHRISTIAN'=>0, // 1 - 'SCPROFESSIONNELLEDARCHITECTE'=>0, // 1 - 'ASSOCIATIONLESVACHESAUGALLO'=>9220, // 1 - 'SOCITDEDROITTRANGERREGISTREDESSOCITSDEMILAN'=>0, // 1 - 'SCINICE'=>0, // 1 - 'SACOOPRATIVEPERSONNELETCAPITALVARIABLES'=>0, // 1 - 'GUA'=>0, // 1 - 'CPC'=>0, // 1 - 'SOCITCOOPRATIVEANONYMEDINTRT'=>0, // 1 - 'SADINTRTCOLLECTIFAGRICOLE'=>0, // 1 - 'BATRICE'=>0, // 1 - 'SARLDEXPLOITATIONDELAFERMEDECHABRAC'=>0, // 1 - 'SARLAGRICOLEFAMILIALE'=>0, // 1 - 'SOCITRESPONSABILITLIMITEETASSOCIUNIQUE'=>0, // 1 - 'SOCITANONYMECOOPRATIVEDIRECTOIREETCONSEILDESURVEILLANCEETDORIENTATION'=>0, // 1 - 'GISLE'=>0, // 1 - 'MCUISINIER'=>0, // 1 - 'SARLACTIONNAIREUNIQUE'=>0, // 1 - 'UCP'=>0, // 1 - 'RUEAMIRALLINOISCS'=>0, // 1 - 'SASRDUITEUNASSOCIUNIQUE'=>0, // 1 - 'SARLDECRDIT'=>0, // 1 - 'EURAL'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIESAS'=>0, // 1 - 'MME'=>0, // 1 - 'RGIEDPARTEMENTALE'=>0, // 1 - 'SELALU'=>0, // 1 - 'EXPLOITATIONAGRICOLEENNOMPERSONNEL'=>0, // 1 - 'SOCITPARACTIONMEMBREDELUNIONEUROPENNE'=>0, // 1 - 'SOCITCIVILEAQUACOLE'=>0, // 1 - 'GPA'=>0, // 1 - 'SAEA'=>0, // 1 - 'SOCITDEDROITPORTUGAL'=>0, // 1 - 'LEBABAORUMVILLALAROSERAIEANCIENNEROUTEDULAMENTIN'=>0, // 1 - 'SPASU'=>0, // 1 - 'AVURSARL'=>0, // 1 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFAGRICOLERESPONSABILIT'=>0, // 1 - 'GFV'=>0, // 1 - 'MUTUELLEAGRICOLEBANCAIRECAPITALVARIABLE'=>0, // 1 - 'SIR'=>0, // 1 - 'SYNDICATPROFESSIONNELRGIESELONLALOIDE'=>0, // 1 - 'ENTREPRISEUNIPERSONNELERESPONSABILITLIMITE'=>0, // 1 - 'SELARLDEMEDECINSRADIOLOGUES'=>0, // 1 - 'SARLCAPITALUNIQUE'=>0, // 1 - 'SOCITCOOPRATIVEANONYMEARTISANALECAPITALETPERSONNELVARIABLE'=>0, // 1 - 'CU'=>0, // 1 - 'SOCITANONYMEETCONSEILDESURVEILLANCE'=>0, // 1 - 'R'=>0, // 1 - 'RUEJACQUESPRVERT'=>0, // 1 - 'EXPLOITATIONPERSONNELLE'=>0, // 1 - 'SACOOPRATIVEDIRECTOIRECONSEILDESURVEILLANCEETCAPITALVARIABLE'=>0, // 1 - 'SKACVE'=>0, // 1 - 'SOCITPARACTIONSSIMPLIFIELIMITE'=>0, // 1 - 'SADIRECTOIREETCONVEILDESURVEILLANCE'=>0, // 1 - 'SOCITAGRICOLECAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEDECAUTIONMUTUELLECAPITALVARIABLELOICOOPRATIVE'=>0, // 1 - 'STECOOPERATIVEAGRICOLEDEPRODUCTION'=>0, // 1 - 'COMITDPARTEMENTAL'=>0, // 1 - 'EMMANUEL'=>0, // 1 - 'SOCITRESPONSABILITLLIMITE'=>0, // 1 - 'SCDECOOPRATIVECAPITALVARIABLE'=>0, // 1 - 'SARLDECOOPRATIVEARTISANALE'=>0, // 1 - 'SCACAPITALETPERSONNELVARIABLES'=>0, // 1 - 'SCPC'=>0, // 1 - 'EUROSMINIMUM'=>0, // 1 - 'SDN'=>0, // 1 - 'SDA'=>0, // 2 - 'COOPRATIVEDECRDITRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 1 - 'SOCITIMMOBILIEREDINVESTISSEMENT'=>0, // 1 - 'SCIE'=>0, // 1 - 'SOCITRDUITEUNASSOCIUUNIQUE'=>0, // 1 - 'SCDEPLACEMENTIMMOBILIERFAISANTPUBLIQUEMENTAPPELLPARGNE'=>0, // 1 - 'COOPRATIVEDECRDITRESPONSABILITLIMITEETCAPITALVARIABLESTATUTAIREMENTLIMITE'=>0, // 1 - 'SARLGRANCEMAJORITAIRE'=>0, // 1 - 'SAEMCOOPRATIVE'=>0, // 1 - 'SCPPROFESSIONNELLE'=>0, // 1 - 'TM'=>0, // 1 - 'GIAR'=>0, // 1 - 'SOCITANONYMECOOPRATIVEDEPRODUCTIONDHLM'=>0, // 1 - 'AU'=>0, // 1 - 'SCPROFESIONNELLEDEMDECINS'=>0, // 1 - 'SCPROFESSIONNELLEDEGOMTRESEXPERTES'=>0, // 1 - 'SCDEPRODUCTIONANONYME'=>0, // 1 - 'SCERI'=>0, // 1 - 'COOPRATIVEDUTILISATIONDEMATRIELAGRICOLEENCOMMUNENCOURSDELIQUIDATION'=>0, // 1 - 'TABLISEMENTPUBLICDELETATCARACTREINDUSTRIELETCOMMERCIAL'=>0, // 1 - 'ETABLISSEMENTSSERRANDOUR'=>0, // 1 - 'SASHLM'=>0, // 1 - 'AFPH'=>0, // 1 - 'SKCVRL'=>0, // 1 - 'SOCITCOOPRATIVEDENTREPRISESDETRANSPORTSRESPONSABILITLIMITEETCAPITALVARIABLES'=>0, // 1 - 'SCDEMOYEN'=>0, // 1 - 'SOCITDCONOMIE'=>0, // 1 - 'SELARLDAVOCAT'=>0, // 1 - 'SARLCOOPRATIVEAGRICOLE'=>0, // 1 - 'PVI'=>0, // 1 - 'SCDECAUTIONMUTUELLECOOPRATIVE'=>0, // 1 - 'SCPDARCHITECTE'=>0, // 1 - 'SARLDECOOPRATIVEDINTRTCOLLECTIF'=>0, // 1 - 'UNIONDECOOPRATIVESAGRICOLESCAPITALVARIABLECOOPRATIVE'=>0, // 1 - 'SAMEMBLEDELUE'=>0, // 1 - 'COMPLTER'=>0, // 1 - 'SASADIRECTOIREETCONSSURV'=>0, // 1 - 'UNIONDECOOPRATIVEAGRICOLECAPITALVARIABLE'=>0, // 1 - 'SACOOPRATIVEDECONSOMMATIONFORMEANONYME'=>0, // 1 - 'SACOOPDIRECTOIRE'=>0, // 1 - 'SOCITANONYMECAPITALETPERSONNELVARIABLES'=>0, // 1 - 'GROUPEMENTFORESTIERAGRICOLE'=>0, // 1 - 'SCPERSONNELVARIABLE'=>0, // 1 - 'SOCITRESPONSABILITLIMITEUNIQUE'=>0, // 1 - 'SUCCURSALEDESOCITTRANGRE'=>0, // 1 - 'COOPRATIVEDINTRTCOLLECTIFCAPITALVARIABLE'=>0, // 1 - 'SOCITRESPONSABILILTLIMITE'=>0, // 1 - 'ACTIVITINDPENDANTEPROFESSIONLIBRALE'=>0, // 1 - 'SOCITCOOPRATIVEPARACTIONSSIMPLIFIE'=>0, // 1 - 'ASSOCIATIONSYNDICALELIBRE'=>9150, // 1 - 'SADECOOPRATIVECAPITALVARIABLE'=>0, // 1 - 'SCCVLEBON'=>0, // 1 - 'SOCITANONYMEDIRECTOIREETCONSEILDADMINISTRATION'=>0, // 1 - 'SCIV'=>0, // 2 - 'SOCITCOOPRATIVERESPONSABILITLIMLITE'=>0, // 1 - 'SOCITDEXERCICELIBRALFORMEANONYMEDEGOMTRESEXPERTS'=>0, // 1 - 'SCIAGRICOLE'=>0, // 1 - 'SCICAFORMECIVILECOOPRATIVE'=>0, // 1 - 'SOCITPARACTIONSIMPLIFIES'=>0, // 1 - 'SARLASSOCUUNIQUE'=>0, // 1 - 'SOCITRESPONSABILITLIMITEDEDROITNERLANDAIS'=>0, // 1 - 'SCDEPRODUCTIONENARLACAPITALVARIABLE'=>0, // 1 - 'SOCITCIVILESC'=>0, // 1 - 'SOCITCOOPRATIVERESPONSABILITETCAPITALVARIABLE'=>0, // 1 - 'SACONSEILDADMINISTRATIONSA'=>0, // 1 - 'SOCITANONYMECOOPRATIVECAPITALVARIABLECOOPRATIVE'=>0, // 1 - 'SOCIETEDEPARTICIPATIONSFINANCIERESDEPROFLIBERALE'=>0, // 1 - 'SARLDUNASSOCIUNIQUE'=>0, // 1 - 'SARLOASSOCIUNIQUE'=>0, // 1 - 'COMMUNAUTDECOMMUNE'=>0, // 1 - 'SCIDEGESTIONPATRIMONIALE'=>0, // 1 - 'SOCITANONYMECOOPRATIVEMARITIMECONSEILDADMINISTRATION'=>0, // 1 - 'UNIONCOOPRATIVECAPITALVARIABLE'=>0, // 1 - 'RUEDELACITADELLE'=>0, // 1 - 'SOCITCIVILEETIMMOBILIRE'=>0, // 1 - 'SAAUCAPITALETPERSONNELVARIABLES'=>0, // 1 - 'SCDECONSTRUCTIONETDEGESTION'=>0, // 1 - 'SARLSARLDARCHITECTURE'=>0, // 1 - 'SELUARLASSOCIUNIQUE'=>0, // 1 - 'AACCAPITALVARIABLE'=>0, // 1 - 'SASAVECASSOCIUNIQUE'=>0, // 1 - 'SOCITDEPARTICIPATIONSFINANCIRESDEPROFESSIONLIBRALER'=>0, // 1 - 'SCEACOOPRATIVE'=>0, // 1 - 'COOPRATIVEAGRICOLEETVINICOLE'=>0, // 1 - 'SKOPA'=>0, // 1 - 'ZI'=>0, // 1 - 'SOCITDEDROITTRANGERSOCITDEDROITBRITANNIQUE'=>0, // 1 - 'COOPERATIVEDECONSOMMATIONENSOCITCIVILE'=>0, // 1 - 'SOCITCIVILECOOPRATIVEDECONSTRUCTIONCAPITALETPERSONNELVARIABLES'=>0, // 1 - 'GFO'=>0, // 1 - 'SCCAVRESPONSABILITLIMITE'=>0, // 1 - 'SARLASSOCIUNIQUEDEDROITPORTUGAIS'=>0, // 1 - 'SCSOCIETECOOPERATIVEDECREDIT'=>0, // 1 - 'SOCITCIVILECOOPRATIVECAPITALVARIABLEETRESPONSABILITSTATUTAIREMENTLIMITE'=>0, // 1 - 'EURLSSB'=>0, // 1 - 'SAENLIQUIDATIONAMIABLE'=>0, // 1 - 'SADEXERCICELIBRE'=>0, // 1 - 'SCPROFESSIONNELLES'=>0, // 1 - 'SCCOOPRATIVEMARITIMECAPITALVARIABLE'=>0, // 1 - 'SAPATRICIPATIONOUVRIRE'=>0, // 1 - 'SARLCMCSTYLAND'=>0, // 1 - 'SAETCONSEILDESURVEILLANCE'=>0, // 1 - 'SARSUNIPERSONNELLE'=>0, // 1 - 'SOCITENCOOPRATIVEAGRICOLE'=>0, // 1 - 'SCOPFORMEANONYNE'=>0, // 1 - 'YVES'=>0, // 1 - 'SOCITCIVILEDEPORTEFEUILLECAPITALVARIABLE'=>0, // 1 - 'SCDEMOYENCAPITALVARIABLE'=>0, // 1 - 'MIRELLE'=>0, // 1 - 'SALONDECOIFFURE'=>0, // 1 - 'SCDECRDITCAPITALVARIABLEETRESPONSABILITLIMITE'=>0, // 1 - 'SALL'=>0, // 1 - 'SARLCOOPRATIVEOUVRIREDEPRODUCTIONETDECRDITSCOP'=>0, // 1 - 'SCICACAPITALVARIABLE'=>0, // 1 - 'CFRMAPHILIPPAGRI'=>0, // 1 - 'SOCITRESPONSABILITLIMITESARLASSOCIUNIQUE'=>0, // 1 - 'SCEAUNIPERSONNELLE'=>0, // 1 - 'SOCITTRANGRERESPONSABILITLIMITE'=>0, // 1 - 'SARLASSOCIUNIQUES'=>0, // 1 - 'SASASSOCIUNQUE'=>0, // 1 - 'SCDEXPLOITATION'=>0, // 1 - 'SOCITCOOPRATIVEFORMECIVILEETCAPITALVARIABLE'=>0, // 1 - 'SCOPA'=>0, // 2 - 'SOCITANONYMENONMEMBREDELACEE'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITLIMITECAPITAL'=>0, // 1 - 'SCPARTICULIERE'=>0, // 1 - 'SCDEPRODUCTIONRESPONSABILITLIMITECAPITALVARIABLE'=>0, // 1 - 'COOPRATIVEDUTILISTIONDEMATRIELAGRICOLEENCOMMUN'=>0, // 1 - 'SARLCAPITALVARIABLEMONTANTSOUSLEQUELILNEPEUTTRERDUIT'=>0, // 1 - 'SOCITDEDROITHOLLANDAIS'=>0, // 1 - 'SCDECONSTRUCTIONCOOPRATIVE'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONETDECRDIT'=>0, // 1 - 'SARLASSOCIUNIQUEETDEDROITLUXEMBOURGEOIS'=>0, // 1 - 'SACONSEILDEDADMINISTRATION'=>0, // 1 - 'SARLASSOICIUNIQUE'=>0, // 1 - 'SARLCOOPRATIVEARTISANALEPERSONNELVARIABLE'=>0, // 1 - 'SACOOPRATIVEPERSONNELVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEAGRICOLECOOPRATIVECAPITALVARIABLE'=>0, // 1 - 'SARLDEDROITLUXEMBOURGEOIS'=>0, // 1 - 'SNCCAPITALVARIABLEMININUM'=>0, // 1 - 'SOCITCIVILECOOPRATIVEDECRDITCOOPRATIVE'=>0, // 1 - 'COMMUNTTERRITORIALE'=>0, // 1 - 'CHRISTOPHE'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONETSARLCAPITALVARIABLE'=>0, // 1 - 'MUTA'=>0, // 1 - 'SCPDEXPERTAGRICOLEFONCIER'=>0, // 1 - 'SEIEEE'=>0, // 1 - 'SOCITDESDROITSETRANGERS'=>0, // 1 - 'COLLECTIVITTERRITORIALEPERSONNEMORALEDEDROITPUBLIC'=>0, // 1 - 'SAOV'=>0, // 1 - 'GMBH'=>0, // 1 - 'SDECISE'=>0, // 1 - 'SADINTERETCOLLECTIFAGRICOLE'=>0, // 1 - 'SOCIETECOOPERATIVEOUVRIERE'=>0, // 1 - 'ASOSCIATION'=>0, // 1 - 'SDOD'=>0, // 1 - 'SCDAVOCATS'=>0, // 1 - 'SARLUUE'=>0, // 1 - 'SARLMOTARD'=>0, // 1 - 'GRANDRUE'=>0, // 1 - 'SARLSCOOP'=>0, // 1 - 'MJC'=>0, // 1 - 'SASAVECCONSEILDADMINISTRATION'=>0, // 1 - 'SAOO'=>0, // 1 - 'SOCITDEXERCICELIBRALFORMEANONYMESELEFACONSEILDADMI'=>0, // 1 - 'SCCOOPRATIVEDINTRTCOLLECTIFAGRICOLE'=>0, // 1 - 'SACPDHLM'=>0, // 1 - 'SOCITRESPONSABILITASSOCIUNIQUE'=>0, // 1 - 'SCOPANONYMEPERSONNELETCAPITALVARIABLE'=>0, // 1 - 'IMMEUBLELECAHNENTREDTILLEULARGENT'=>0, // 1 - 'SOCITDEXERCICELIBRALRESPONSABILITLIMITEDEPHARMACIENS'=>0, // 1 - 'SADIRECTEURETCONSEILDESURVEILLANCE'=>0, // 2 - 'SNCVARIABLE'=>0, // 1 - 'NONPCISE'=>0, // 1 - 'SIAARL'=>0, // 1 - 'SOICTRESPONSABILITLIMITE'=>0, // 1 - 'SELURLASSOCIUNIQUE'=>0, // 1 - 'SCDEPLACEMENTCOLLECTIFIMMOBILIERETCAPITALVARIABLE'=>0, // 1 - 'SARLASSOCIUNIQUECOMPTERDUDCEMBRE'=>0, // 1 - 'SCPDARCHITECTURE'=>0, // 1 - 'UNIONDCONOMIESOCIALERESPONSABILITLIMITE'=>0, // 1 - 'SOCITCIVILEFINANCIRE'=>0, // 1 - 'SCIENCONSTRUCTIONVENTE'=>0, // 1 - 'SACOOPRATIVEDEPRODUCTIONDEHLMDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'CL'=>0, // 1 - 'COOPRATIVEDECRDITCAPITALVARIABLERESPONSABILITLIMITE'=>0, // 1 - 'UNIONCONOMIQUEETSOCIALEDESARLCAPITALVARIABLE'=>0, // 1 - 'TDM'=>0, // 1 - 'SARLENCOURSDELIQUIDATION'=>0, // 1 - 'SICAANONYMEETCAPITALVARIABLE'=>0, // 1 - 'SAAVECCONSEILDADMINISTRATION'=>0, // 1 - 'SCDEMOYENSCAPITALVARIABLE'=>0, // 1 - 'ASSOCIATIONRGIESELONLALOIDEGM'=>9220, // 1 - 'SARLASSOCIUIQUE'=>0, // 1 - 'ETABLISSEMENTPUBLICDELTATCRPARDCRET'=>0, // 1 - 'AUMARCHDUBOUQUET'=>0, // 1 - 'ASSOCIATIONDEDROITLOCALINSCRITEAUREGISTREDESASSOCIATIONSDUTRIBUNALDINSTANCEDEHAGUENAU'=>0, // 1 - 'SCL'=>0, // 1 - 'SACIESTSADECRDITIMMOBILIERDELEST'=>0, // 1 - 'SARLSOCITUNIQUE'=>0, // 1 - 'SOCITENCOMMANDITESIMPLESOCITPARACTIONSSIMPLIFIEACTIONNAIREUNIQUE'=>0, // 1 - 'SOCITCIVILEEXPLOITATIONAGRICOLE'=>0, // 1 - 'SOCITDEDROITSETRANGER'=>0, // 1 - 'SCOUVRIREDEPRODUCTIONCOOPRATIVE'=>0, // 1 - 'SASUNIFIEASSOCIUNIQUE'=>0, // 1 - 'FPOI'=>0, // 1 - 'ETABLISSEMENTPUBLICDECOOPRATIONCULTURELLEINDETCOMMER'=>0, // 1 - 'SOCITENCOMMANDITEPARACTIONSNONMEMBREDELACEE'=>0, // 1 - 'SYNDICATDINITIATIVE'=>0, // 1 - 'SOCITDEGROUPEDASSURANCESMUTUELLE'=>0, // 1 - 'SADEDROITJAPONAIS'=>0, // 1 - 'SCCOOPRATIVEDECONSTRUCTIONCAPITALVARIABLE'=>0, // 1 - 'COMMUNAUTRURALE'=>0, // 1 - 'SCPDECHIRURGIENSDENTISTES'=>0, // 1 - 'SELARLDEPARTICIPATIONSFINANCIRES'=>0, // 1 - 'SCD'=>0, // 1 - 'SATL'=>0, // 1 - 'COOPRATIVECAPITALETPERSONNELVARIABLE'=>0, // 1 - 'TABLISSEMENTPUBLICDESANT'=>0, // 1 - 'SCDECONSTRUCTIONVETE'=>0, // 1 - 'MEMBREDELUE'=>0, // 1 - 'SCDECONSTRUCTIOINVENTE'=>0, // 1 - 'SCPROFESSIONNELLEDEMANDATAIRESLIQUIDATEURS'=>0, // 1 - 'ASSOCIATIONDEDROITLOCAL'=>9260, // 1 - 'RGIEPERSONNALISEDOTEDELAPERSONNALITMORALEETDELAUTONOMIEFINANCIRE'=>0, // 1 - 'MONSIEURETMADAME'=>0, // 1 - 'SCAF'=>0, // 1 - 'SOCIETEETRANGEREIMMATRICULEEAURCSDEBONNEVILLE'=>0, // 1 - 'SICASOUSFORMEDESACAPITALVARIABLE'=>0, // 1 - 'SERSAS'=>0, // 1 - 'LDP'=>0, // 1 - 'SCRESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SOCITDEDROITTRANGERSOCITDEDROITBRITANIQUE'=>0, // 1 - 'SAOUVRIRECOOPRATIVEPERSONNELETCAPITALVARIABLE'=>0, // 1 - 'SELEURLUE'=>0, // 1 - 'CUMAM'=>0, // 1 - 'ASSOCIATIONORDREAPOSTOLIQUE'=>9220, // 1 - 'SARLENDROITETRANGER'=>0, // 1 - 'SARLASSOCIUNIQUEPRCDENTPROPRITAIREEXPLOITANT'=>0, // 1 - 'GE'=>0, // 2 - 'SACONSEILDADMINISTRATIONGM'=>0, // 1 - 'SOCITANONYMEPRIVEPARACTIONS'=>0, // 1 - 'SOCITCOOPRATIVEDECONSOMMATIONCAPITALVARIABLEETPERSONNELVARIABLE'=>0, // 1 - 'SACONSEILDADMINISTRATIONETCAPITALVARIABLE'=>0, // 1 - 'SARLMEMBREDELALUE'=>0, // 1 - 'RCSSAINTDENISB'=>0, // 1 - 'SASUUNIPERSONNELLE'=>0, // 1 - 'SICAFANONYMEACONSEILTITREORDONNANCE'=>0, // 1 - 'SASSIMPLIFI'=>0, // 1 - 'SCDECONSTRUCTIONVENT'=>0, // 1 - 'SOCITENNOMCOLLECTIFASSOCIUNIQUE'=>5202, // 1 - 'SOCITCOOPRATIVEAGRICOLECAPITALVARIBLE'=>0, // 1 - 'TABLISSEMENTDECRDITBUTNONLUCRATIFCAPITALVARIABLE'=>0, // 1 - 'CONFDRATIONINTERSYNDICALE'=>0, // 1 - 'SCSOCITENLIQUIDATIONAMIABLE'=>0, // 1 - 'COPRESPONSABILITLIMITE'=>0, // 1 - 'SAOD'=>0, // 1 - 'SACOOPRATIVECOMMERANTSDTAILLANTS'=>0, // 1 - 'SCPROFESSIONNELLEDAVOCATSAUCONSEIL'=>0, // 1 - 'SOCITCOOPRATIVEANONYMEDETRAVAILLEURS'=>0, // 1 - 'SCAD'=>0, // 1 - 'SARLCONSTITUERDUNASSOCIUNIQUE'=>0, // 1 - 'SOCIETECOOPERATIVEOUVRIEREDEPRODUCTIONACONSEILDADMINISTR'=>0, // 1 - 'SOCITCIVILEGROUPEMENTFORESTIER'=>0, // 1 - 'SCPROFESISONNELLE'=>0, // 1 - 'SCPARTICULIREREGROUPEMENTFONCIERAGRICOLE'=>0, // 1 - 'SICACONSEILDADMINISTRATION'=>0, // 1 - 'SOCITCOOPRATIVEAGRICOLEDINTRTCOLLECTIFRESPONSABILITLIMITE'=>0, // 1 - 'SCDEXPLOITATIONRURALEETAGRICOLE'=>0, // 1 - 'BOULEVARDDUCOLOMBIER'=>0, // 1 - 'SOCITANONYMEMONGASQUE'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONRESPONSABILITLIMITEETAUCAPITALVARIABLE'=>0, // 1 - 'SANONEUROPENNE'=>0, // 1 - 'SACONSEILDADMINISTRATIONDHABITATIONLOYERMODR'=>0, // 1 - 'ASDETRFLEETVOTREIMAGE'=>0, // 1 - 'MAURICE'=>0, // 1 - 'SASCOOPRATIVEDINTRTCOLLECTIFCAPITALVARIABLE'=>0, // 1 - 'SCIDATTRIBUTIONDECONSTRUCTION'=>0, // 1 - 'SERGE'=>0, // 1 - 'SCDECONSTRUCTIONETSOCITDEGESTION'=>0, // 1 - 'SASASSOCUNIQUE'=>0, // 1 - 'SCILESPITCHES'=>0, // 1 - 'ASSOCIATIONLOIERJUILLET'=>9220, // 1 - 'SICAVSA'=>0, // 1 - 'SCICAFORMEANONYMEETCAPITALVARIABLE'=>0, // 1 - 'TABLISSEMENTPUBLICLOCAL'=>0, // 1 - 'SEARLU'=>0, // 1 - 'SACOOPRATIVEDINTRTCOLLECTIFPOURLACCESSIONLAPROPRITALSACE'=>0, // 1 - 'JEANMAX'=>0, // 1 - 'GUILLAUME'=>0, // 1 - 'GCA'=>0, // 1 - 'SOCITCOOPRATICERESPONSABILITLIMITE'=>0, // 1 - 'SOCITTCIVILEPROFESSIONNELLE'=>0, // 1 - 'SCADINTRTCOLLECTIFAGRICOLECOOPRATIVE'=>0, // 1 - 'SOCITUNIPERSONNELLERESPONSABILITLIMITE'=>0, // 1 - 'ASSOCIATIONLOS'=>9220, // 1 - 'SCPAV'=>0, // 1 - 'SASASSSOCIUNIQUE'=>0, // 1 - 'SARLASOCIEUNIQUE'=>0, // 1 - 'SELRAL'=>0, // 1 - 'CSI'=>0, // 1 - 'SARLSOCIETEETRANGERE'=>0, // 1 - 'SACOOPRATIVEOUVRIREDEPRODUCTIONCAPITALETPERSONNELVARIABLE'=>0, // 1 - 'SDM'=>0, // 1 - 'SSADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SOCITRESPONSABILITRDUITEUNASSOCI'=>0, // 1 - 'SNCDEDROITITALIEN'=>0, // 1 - 'VENTETITREAMBULANT'=>0, // 1 - 'SPASUNIPERSONNELLE'=>0, // 1 - 'CMCCAPITALVARIABLE'=>0, // 1 - 'SARLB'=>0, // 1 - 'SARLASSOCIATIONUNIQUE'=>0, // 1 - 'SARLAUTRESOCITRESPONSABILITLIMIT'=>0, // 1 - 'ORGANISMEDEGESTIONDELCOLECATHOLIQUE'=>0, // 1 - 'SCSMEMBREDELUE'=>0, // 1 - 'ETR'=>0, // 1 - 'GROUPEMENTDEXPLOITATIONAGRICOLERESPONSABILITLIMITE'=>0, // 1 - 'SNR'=>0, // 1 - 'LAURENCE'=>0, // 1 - 'SCFERMIRE'=>0, // 1 - 'ACEA'=>0, // 1 - 'SOCIETEARESPONSABILITELIMITEDEDROITBRITANIQUE'=>0, // 1 - 'SOCITCIVILEPARTICULIRECAPITALETPERSONNELVARIABLES'=>0, // 1 - 'SACOOPRATIVEDEPRODUCTIONETDECRDIT'=>0, // 1 - 'SARLUNIPERSONNELLLE'=>0, // 1 - 'RCSMETZB'=>0, // 1 - 'SEURL'=>0, // 1 - 'JCASARL'=>0, // 1 - 'COMMUNAUTDESCOMMUNES'=>0, // 1 - 'SASSIMPLIFIEUNIPERSONNELLE'=>0, // 1 - 'UNIONCONOMIQUESOCIALESARLCAPITALVARIABLE'=>0, // 1 - 'SCOPARLCAPITALVARIABLE'=>0, // 1 - 'SADIRECTOIRETCONSEILDESURVEILLANCE'=>0, // 1 - 'SOCITASSOCI'=>0, // 1 - 'EURLSOCIETEMISEENLIQUIDATION'=>0, // 1 - 'COOPRATIVERESPONSABLITLIMITE'=>0, // 1 - 'SCPROFESSIONNELLEDECONSEILENPROPRITINDUSTRIELLE'=>0, // 1 - 'STEARESPONSABILITELIMITEEDEPRESSE'=>0, // 1 - 'SBS'=>0, // 1 - 'SOCITNONCOMMERCIALE'=>0, // 1 - 'SCAGRICOLESOCITENLIQUIDATION'=>0, // 1 - 'SARLDINTERETCOLLECTIFAGRICOLESICA'=>0, // 1 - 'SOCITDEXERCICELIBRALASSOCIUNIQUEETRESPONSABILITLIMITE'=>0, // 1 - 'SESARL'=>0, // 1 - 'JACQUELINE'=>0, // 1 - 'SARLCOOPRATIVEOUVRIREDEPRODUCTIONCAPITALVARIABLE'=>0, // 1 - 'SCDEPLACEMENTIMMOBILIERFAISANTAPPELPUBLICLPARGNE'=>0, // 1 - 'SAIS'=>0, // 1 - 'PLACEDUPALAISDEJUSTICE'=>0, // 1 - 'SOV'=>0, // 1 - 'SCDEMOOYENS'=>0, // 1 - 'SACOOPRATIVEETCAPITALVARIALE'=>0, // 1 - 'SARLEUROPENNE'=>0, // 1 - 'RRLCONSTITUEDUNASSOCIUNIQUE'=>0, // 1 - 'SELECA'=>0, // 1 - 'SCOPFORMEANONYMEETPERSONNELETCAPITALVARIABLE'=>0, // 1 - 'ANCIENDOSSIERFNONINSCRIT'=>0, // 1 - 'SOCITRESPONSABILITLIMITEASSOCIUNIQUEGRANCEMAJORITAIRE'=>0, // 1 - 'SCOPFORMEANONYMEPERSONNELETCAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEDETRAVAILLEURRESPONSABILITLIMITE'=>0, // 1 - 'BANQUECOOPRATIVERGIEPARLALOINODU'=>0, // 1 - 'OVINALPDVELOPPEMENT'=>0, // 1 - 'SOCITCOOPRATIVEPARACTIONSSIMPLIFIEDINTRTCOLLECTIFAGRICOLECAPITALVARIABLE'=>0, // 1 - 'SANATIONALEDIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SCDEXPLOITATIONAGRICOLERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SOCITPARACTIONSMEMBREDELUE'=>0, // 1 - 'BDEREV'=>0, // 1 - 'RUEPIERREBROSSOLETTE'=>0, // 1 - 'SDERIJKSSTRAATWEGBCPLEERSUMPAYSBAYS'=>0, // 1 - 'SOCITDCONOMIEMIXTEENLIQUIDATION'=>0, // 1 - 'SCADUNIONDCONOMIESOCIALE'=>0, // 1 - 'SOCITCOOPRATIVEDINTRTAGRICOLECAPITALVARIABLE'=>0, // 1 - 'FR'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONARL'=>0, // 1 - 'FORMATIONASSOCIATION'=>9220, // 1 - 'SASUNIPERSONNELLESASACTIONNAIREUNIQUE'=>0, // 1 - 'SOCITCOOPRATIVEPERSONNELVARIABLESOCITCOOPRATIVEAGRICOLECAPITALETPERSONNELVARIABL'=>0, // 1 - 'SOGITRESPONSABILITLIMITEASSOCIUNIQUE'=>0, // 1 - 'SEP'=>0, // 1 - 'SDDE'=>0, // 1 - 'SAASSOCI'=>0, // 1 - 'SASCOP'=>0, // 1 - 'SOCITCARACTIONSSIMPLIFIEUNIPERSONNELLE'=>0, // 1 - 'SCEXPLOITATIONAGRICOLERESPONSABILITLIMITE'=>0, // 1 - 'SAOG'=>0, // 1 - 'M'=>0, // 1 - 'SYNDICATPATRONAL'=>0, // 1 - 'PATRICE'=>0, // 1 - 'EUASSOCIUNIQUE'=>0, // 1 - 'SCPROFESSIONNEELLE'=>0, // 1 - 'SADIRECTOIREETCONSEILDEDIRECTOIRE'=>0, // 1 - 'SAEU'=>0, // 1 - 'CAISSELOCALEDECRDITMUTUEL'=>0, // 1 - 'VISIONSTRATGIEMOYENS'=>0, // 1 - 'ASSOCIATIONRGIESEL'=>9220, // 1 - 'SOCITRESPONSABILITLIMITEENTREPRISEAGRICOLERESPLIMITE'=>0, // 1 - 'SPOCITCOOPRATIVERESPONSABILITLIMITEETCAPITALVARIABLE'=>0, // 1 - 'SCCIVILEDECONSTRUCTIONVENTE'=>0, // 1 - 'SARLASSOCISUNIQUEEUROS'=>0, // 1 - 'SOCITDEPARTICIPATIONFINANCIREDEPROFESSIONLIBRALEDAVOCATSSOUSFORMEDESAS'=>0, // 1 - 'SCPANONYMECAPITALVARIABLE'=>0, // 1 - 'SOCITCIVILEIMMOBILIRESC'=>0, // 1 - 'SELARLDENTREPRISEUNIPERSONNELLERESPONSABILITLIMITE'=>0, // 1 - 'SCACAPITABLEVARIABLE'=>0, // 1 - 'SCCM'=>0, // 1 - 'ST'=>0, // 1 - 'CAISSEDECRDITAGRICOLE'=>0, // 1 - 'FRANAISE'=>0, // 1 - 'SOCITCIVIL'=>0, // 1 - 'BOUCHERIEDRUAUX'=>0, // 1 - 'SCIENLIQUIDATIONANTICIPE'=>0, // 1 - 'SARLAMEMBREDELACEE'=>0, // 1 - 'SOCITDEXPERTISECOMPTABLE'=>0, // 1 - 'STECOOPDEPRODUCTIONARESLIMITEEACAPVAR'=>0, // 1 - 'SARLLIMIT'=>0, // 1 - 'ETABLISSEMENTPUBLICDELTATCARACTREADMINISTRATIF'=>0, // 1 - 'UNIONDECONOMIESOCIALESOCITCOOPRATIVESARL'=>0, // 1 - 'COOPRESPONSABILITLIMITE'=>0, // 1 - 'DOCITCIVILE'=>0, // 1 - 'SKCI'=>0, // 1 - 'SOCIETEANONYMEDEDROITCOMMUN'=>0, // 1 - 'SACCAPITALVARIABLE'=>0, // 1 - 'SOCITCOOPRATIVEDINTRTCOLLECTIFSOUSFORMEDESARL'=>0, // 1 - 'SOCITCOOPRATIVEDEPRODUCTIONSARL'=>0, // 1 - 'SPS'=>0, // 1 - 'SADIRECTOIREETCONSEILDESURVEILLANCESADIRECTOIREETCONSEILDESURVEILLANCE'=>0, // 1 - 'SKCPV'=>0, // 1 - 'SOCITCOOPRATIVEANONYMEDINTRTCOLLECTIFCAPITALVARIABLE'=>0, // 1 - 'HAMIDOU'=>0, // 1 - 'SOCITRESPONSABILITLIIMITE'=>0, // 1 - 'SADIRECTOIREETCONSEILDESURVEILLANCEETCAPITALVARIABLE'=>0, // 1 - 'SCPROFESSIONNELLEDECONSEILSJURIDIQUES'=>0, // 1 - 'AUPTITFOURDUMOULIN'=>0, // 1 - 'SCIVENTE'=>0, // 1 -); diff --git a/library/Metier/Bodacc/MBalo.php b/library/Metier/Bodacc/MBalo.php deleted file mode 100644 index 4ac61511..00000000 --- a/library/Metier/Bodacc/MBalo.php +++ /dev/null @@ -1,75 +0,0 @@ -'') { - return $libEvenSd; - } - - return substr('95'.$codEvenBoamp.'00', 0, 4)*1; - } - - public function getLibEvenBoamp($codEvenBoamp, $strEvenBoamp='') - { - return $this->getCodEvenSd($codEvenBoamp, $strEvenBoamp); - } -} diff --git a/library/Metier/Bodacc/MBodacc.php b/library/Metier/Bodacc/MBodacc.php deleted file mode 100644 index 00206241..00000000 --- a/library/Metier/Bodacc/MBodacc.php +++ /dev/null @@ -1,1513 +0,0 @@ - 1408, - "Jugement d'ouverture d'une procédure de redressement judiciaire" => '1200', - "Jugement d'ouverture de liquidation judiciaire" => '1301', - "Jugement de clôture pour insuffisance d'actif" => 1503, - "Jugement de clôture de la liquidation des biens pour insuffisance d'actif" => 1503, - "Dépôt de l'état des créances" => 1204, - "Dépôt de l'état des créances Loi de 1985" => 1214, - "Jugement de plan de redressement" => 1414, - "Jugement de clôture pour extinction du passif" => 1502, - "Jugement arrêtant le plan de sauvegarde" => 1101, - "Liste des créances nées après le jugement d'ouverture d'une procédure de liquidation judiciaire" => 1206, - "Jugement de conversion en liquidation judiciaire" => 1300, - "Jugement arrêtant un plan de cession" => 1411, - "Jugement prononçant la résolution du plan de cession et la liquidation judiciaire" => '1305;1511', - "Liste des créances nées après le jugement d'ouverture d'une procédure de redressement judiciaire" => 1206, - "Dépôt de l'état de collocation" => 1203, - "Jugement prononçant la résolution du plan de redressement et la liquidation judiciaire" => '1305;1512', - "Jugement prononçant la résolution du plan de sauvegarde et la liquidation judiciaire" => '1305;1513', - "Jugement de faillite personnelle" => 1600, - "Jugement de faillite personnelle Loi de 1985" => 1610, - "Jugement d'interdiction de gérer" => 1601, - "Jugement d'interdiction de gérer Loi de 1985" => 1611, - "Arrêt de la cour d'appel infirmant une décision soumise à publicité" => 1506, - "Jugement d'ouverture d'une procédure de sauvegarde" => 1100, - - "Jugement de reprise de la procédure de liquidation judiciaire" => 1304, - "Jugement modifiant le plan de continuation" => 1409, - "Dépôt du projet de répartition" => 1208, - "Dépôt de l'état des créances et du projet de répartition" => '1204;1208', - "Jugement d'homologation de l'accord" => 1550, - "Jugement prononçant la résolution du plan de cession" => 1511, - "Jugement de conversion en redressement judiciaire de la procédure de sauvegarde" => 1201, - "Jugement de conversion en liquidation judiciaire de la procédure de sauvegarde" => 1307, - "Jugement modifiant la date de cessation des paiements" => 1450, - "Jugement de clôture de la liquidation des biens pour extinction du passif" => 1502, - "Jugement modifiant le plan de redressement" => 1407, - "Jugement mettant fin à la procédure de redressement judiciaire" => 1500, - "Jugement accordant un délai pour déposer la liste des créances" => 1440, - "Jugement modifiant le plan de sauvegarde" => 1407, - "Jugement de clôture pour insuffisance d'actif et autorisant la reprise des poursuites individuelles" => '1503;1605', - "Ordonnance statuant sur les contestations du projet de répartition" => 1540, - "Jugement de clôture de la procédure de sauvegarde" => 1500, - "Jugement mettant fin à la procédure de sauvegarde" => 1500, - - "Jugement d'extension de liquidation judiciaire" => 1417, - "Jugement d'extension d'une procédure de redressement judiciaire" => 1418, - "Jugement d'extension d'une procédure de sauvegarde" => 1419, - "Rétractation de prononcé de liquidation judiciaire sur tierce opposition" => 1541, - - "Rétractation de jugement d'ouverture d'une procédure de sauvegarde sur tierce opposition" => 1542, - "Rétractation de jugement d'ouverture d'une procédure de redressement judiciaire sur tierce opposition" => 1543, - "Rétractation de jugement d'ouverture d'une procédure de liquidation judiciaire sur tierce opposition" => 1544, - "Jugement de désignation des organes de la procédure" => 1215, // v1.5 Avril 2008 - - "Rétractation de jugement d'ouverture sur tierce opposition" => 1545, - "Autre rétractation sur tierce opposition" => 1546, - "Autre jugement de liquidation des biens" => 1603, - "Autre arrêt de la Cour d'Appel" => 1507, - "Autre jugement de clôture" => 1500, - "Autres avis de dépôt" => 1216, - "Arrêts divers" => 1515, - - "Autre jugement d'ouverture" => 1998, - "Autres jugements et ordonnances" => 1998, - "Autre jugement prononçant" => 1998, - - /** - ** v1.5 Avril 2008 - Intégration du Bodacc A en XML : Ventes / Cessions - **/ - "Achat d'un fonds par une personne morale (insertion provisoire)" => 5103, - "Achat d'un foncs par une personne morale (insertion provisoire)" => 5103, - "Achat d'un fonds par une personne morale." => 5103, // Ajout le 23/12/2010 - "Achat d'un établissement principal par une personne physique (immatriculation)" => 5000, - "Achat d'un établissement principal par une personne morale lors de l'immatriculation" => 5000, - "Autre achat, apport, attribution" => 5900, - "Autre achat, appport, attribution" => 5900, - "Autre achat, apport, attribution (personne physique)" => 5900, - "Autre achat, apport, attribution (personne physque)" => 5900, - "Autre achat, apport, atribution (personne morale)" => 5900, - "Autre achat, apport, attribution (personne morale)" => 5900, - "achat, apport, attribution (personne morale)" => 5900, - "Achat d'un fonds par une personne physique (insertion provisoire)" => 5103, - "Achat d'un établissement secondaire ou complémentaire par une personne morale" => 5001, - "Apport d'un établissement secondaire/complémentaire (personne morale, uniquement)" => 5001, - "Achat d'un établissement complémentaire par une personne morale" => 5001, - "Achat d'un établissement secondaire ou complémentaire par une personne physique" => 5001, - "Mise en activité d'une société suite à achat" => '2316;5999', - "Mise en activité d'une soicété suite à achat" => '2316;5999', - "Achat d'un fonds par le locataire-gérant personne morale" => 5450, - "Achat d'un fonds par le locataire-gérant personne physique" => 5450, - "Apport d'un établissement principal (immatriculation d'une personne morale, uniquement)" => 5000, - "Apport d'un établissement principal (immatriculation d'une personne morale uniquement)" => 5000, - "Attribution d'un fonds suite à partage, à licitation (Immatriculation d'une personne physique)" => 5460, - "Attribution d'un fonds suite à donation avec délai d'oppositions (Immatriculation d'une personne physique)" => 5460, - "Annulation d'avis Vente" => 5999, - "Annulation d'avis vente" => 5999, - "fonds acquis par achat au prix stipulé de 155 000 euros." => 5900, - - /** - ** v1.5 Avril 2008 - Intégration du Bodacc A en XML : Créations / Immatriculations - **/ - "Immatriculation d'une personne physique suite à création d'un établissement principal" => 4000, - "Immatriculation d'une personne morale (B, D) sans activité" => 4050, - "Immatriculation d'une personne morale (B, C, D) suite à création d'un établissement principal" => 4000, - "Immatriculation d'une personne morale (B, C, D suite à création d'un établissement principal)" => 4000, - "Immatriculation d'une personne physique suite à transfert de l'établissement principal" => 4250, - "Immatriculation d'une personne morale après 1er avis" => 4000,//??????? - "Immatriculation d'une personne morale suite à transfert de son siège social" => 4250, - "Immatriculation d'une personne physique, reprise d'activité après location-gérance" => 4350, - "Immatriculation d'une personne morale, établissement principal reçu en location-gérance" => 4355, - "Immatriculation d'une personne physique après 1er avis" => 4000, - "Immatriculation d'une personne physique, établissement principal reçu en location-gérance" => 4355, - "Immatriculation d'une personne physique, établissement principal précédemment exploité par le conjoint" => 4450, - "Immatriculation d'une personne physique, établissement précédemment exploité par le conjoint" => 4450, - "Transformation d'un GAEC" => 4400, - "Autre immatriculation personne morale" => 4000, - "Autre immatriculation personne physique" => 4000, - "Immatriculation d'une société de droit européen (quelle que soit l'origine du fonds)" => 4600, - "Immatriculation avec origine du fonds création" => 4000, - "Immatriculation avec orgine du fonds création" => 4000, - "Immatriculation avec origine de fonds achat" => 4501, - "Immatriculation avec origine du fonds achat" => 4501, - "Immatriculation d'une personne physique, établissement principal hérité, reçu par donation" => 4410, - ); - - private static $tabAccents = array( - '[A'=>'Á', //5B41 - '^A'=>'Â', //5E41 - '`A'=>'À', //6041 - ']A'=>'Ä', //5D41 - '[a'=>'á', //5B61 - '^a'=>'â', //5E61 - '`a'=>'à', //6061 - ']a'=>'ä', //5D61 - //'AE'=>'Æ', //4145 // Penser à les retransformer pour les vieux systèmes - //'ae'=>'æ', //6165 // Penser à les retransformer pour les vieux systèmes - '|C'=>'Ç', //7C43 - '|c'=>'ç', //7C63 - '[E'=>'É', //5B45 - '^E'=>'Ê', //5E45 - '`E'=>'È', //6045 - ']E'=>'Ë', //5D45 - '[e'=>'é', //5B65 - '^e'=>'ê', //5E65 - '`e'=>'è', //6065 - ']e'=>'ë', //5D65 - '[I'=>'Í', //5B49 - '^I'=>'Î', //5E49 - '`I'=>'Ì', //6049 - ']I'=>'Ï', //5D49 - '[i'=>'í', //5B69 - '^i'=>'î', //5E69 - '`i'=>'ì', //6069 - ']i'=>'ï', //5D69 - '[O'=>'Ó', //5B4F - '^O'=>'Ô', //5E4F - '`O'=>'Ò', //604F - ']O'=>'Ö', //5D4F - '[o'=>'ó', //5B6F - '^o'=>'ô', //5E6F - '`o'=>'ò', //606F - ']o'=>'ö', //5D6F - //'OE'=>'.', //4F45 // Penser à les retransformer pour les vieux systèmes - //'oe'=>'.', // Penser à les retransformer pour les vieux systèmes - '[U'=>'Ú', //5B55 - '^U'=>'Û', //5E55 - '`U'=>'Ù', //6055 - ']U'=>'Ü', //5D55 - '[u'=>'ú', //5B75 - '`u'=>'ù', //6075 - '^u'=>'û', //5E75 - ']u'=>'ü', //5D75 - '[Y'=>'Ý', //5B59 - '[y'=>'ý', //5B79 - ); - - private static $tabBalises=array( - '00'=>'Texte', - '01'=>'Identifiant (NOJO) de l.annonce', - '02'=>'Publication (R1)', - '03'=>'Partie du BODACC et département (R2)', - '04'=>'Tribunal (R3)', - '05'=>'Rubrique au sein du BODACC (R4)', - '06'=>'Numéro de parution', - '07'=>'Numéro d.annonce dans la parution', - '14'=>'R.C.', - '15'=>'SIREN', - '16'=>'Raison sociale', - '17'=>'Activité (Ajout activité ?)', - '18'=>'PDG / CP (?)', - '19'=>'Enseigne / Nom Commercial (?)', - '20'=>'Date', - '22'=>'Forme juridique', - '23'=>'Capital (?)', - '24'=>'Bénéficiaire / Raison sociale (différence avec 16?)', - '25'=>'Sigle', - '26'=>'Objet / Commentaire (a exploiter !) (?)', - '27'=>'Syndic (a vérifier sur les annonces si pas anciennes annonces ?)', - '29'=>'Nom Commercial (?)', - '30'=>'Commentaire adresse', - '31'=>'Rue', - '32'=>'Localité', - '33'=>'Commune', - '35'=>'Conjoint (?)', - '36'=>'Code postal', - '37'=>'Additif (?)', - '40'=>'Texte rectificatif (?)', - '41'=>'Numéro annonce (?)', - '42'=>'Date de parution (?)', - '43'=>'Page (?)', - '44'=>'Numéro de parution (?)', - '70'=>'Numéro annonce', - '71'=>'Date de parution', - '72'=>'Page', - '73'=>'Numéro de parution', - '74'=>'Texte rectificatif/à supprimer', - '75'=>'Numéro annonce', - '76'=>'Numéro annonce', - ); - - private static $tabRubriques=array( - 'A101'=>'21 ventes et cessions (RCS A non inscrit)', - 'A102'=>'22 ventes et cessions (RCS B, C et D non inscrit)', - 'A103'=>'13 Créations d\'établissements (RCS A, PP)', - 'A104'=>'14 Créations d\'établissements (RCS B, Ste)', - 'A105'=>'15 Créations d\'établissements (RCS C, GIE ?)', - 'A106'=>'16 Créations d\'établissements (RCS D, Sté Civile)', - 'A107'=>'17 création d\'étab.second. ....... Pers Phys. ', // - 'A108'=>'18 création d\'étab.second. ....... Société ', // - 'A109'=>'19 création d\'étab.second. ....... Sté Civile ', // - 'A124'=>'24 ventes et cessions (RCS A non inscrit)', - 'A125'=>'25 ventes et cessions (RCS B, C et D non inscrit)', - 'A126'=>'13 création d\'étab.+1 PP .......... Pers Phys. ', // - 'A131'=>'15 Créations d\'établissements (G.Europ.IE)', // - 'A136'=>'35 rectificatif ', // - 'A137'=>'35 additif', // - 'A138'=>'35 rectificatif supp. ', // - 'A205'=>'51 reglement judiciaire ........... PP et Sté ', // - 'A209'=>'63 LB faillite personnelle ........ Pers Phys.', // - 'A210'=>'61 liquidation des biens .......... PP et Sté ', // - 'A215'=>'71 suite reglemt/liquid. .......... PP et Sté ', - 'A220'=>'77 Production titres créance ...... PP et Sté ', // - 'A225'=>'78 Dépôt état des créances vérifiées PP et Sté ', // - 'A228'=>'79 Cloture insuf.actif ......... PP et Sté ', // - 'A236'=>'35 rectificatif ', // - 'A237'=>'35 additif', // - 'A238'=>'35 rectificatif supp.', // - 'A401'=>'80 Banqueroute & Infractions ...... Pers Phys.', // --- - 'A436'=>'35 rectificatif ', // - 'A437'=>'35 additif', // - 'A438'=>'35 rectificatif supp. ', // - 'A701'=>'73 Susp provis poursuites ......... toutes formes', // - 'A736'=>'35 rectificatif ', // - 'A737'=>'35 additif', // - 'A738'=>'35 rectificatif supp. ', // - 'A8X1'=>'60 redressement & liqu.judiciaire.. toutes formes', // - 'A801'=>'52 redressement judiciaire ........ toutes formes', - 'A802'=>'62 ouverture liquidation judiciaire toutes formes', - 'A803'=>'74 Appels jug. ouverture .......... toutes formes', // - 'A804'=>'62 liquidation judiciaire ........ toutes formes', - 'A805'=>'74 Appels jug. LB ................. toutes formes', // - 'A806'=>'75 Arret plan de continuation...... toutes formes', - 'A807'=>'75 Modif plan de continuation...... toutes formes', - 'A808'=>'75 Arret plan de cession .......... toutes formes', - 'A809'=>'75 Modif plan de cession .......... toutes formes', - 'A810'=>'76 Cloture extinction Passif ...... toutes formes', - 'A811'=>'79 Cloture insuf.Actif ............ toutes formes', - 'A812'=>'79 Cloture après cession totale ... toutes formes', - 'A813'=>'63 faillite pers. pp ou gerant .... toutes formes', - 'A814'=>'64 interdiction de gerer .......... toutes formes', - 'A815'=>'78 Dépot Créances ................ toutes formes', - 'A816'=>'78 Dépot Créances nées ap jug ..... toutes formes', - 'A817'=>'78 Dépot Cr.compl.nées ap jug ..... toutes formes', - 'A818'=>'78 Dépot état Collocation ......... toutes formes', - 'A819'=>'75 Modification plan diverse ...... toutes formes', - 'A820'=>'53 Règlements amiables ............ Exploit agric', - 'A821'=>'74 Appels jug. LB ................. toutes formes', - 'A822'=>'56 Procédure insolvabilité......... toutes formes', // - 'A823'=>' Ordonnance statuant sur les contestations', - 'A824'=>'xx Dépôt du projet de répartition', // - 'A836'=>'35 rectificatif ', // - 'A837'=>'35 additif', // - 'A838'=>'35 rectificatif supp. ', // - 'A900'=>'Arrêt Conseil d\'Etat ou Conseil Supérieur des CAC', - 'B1X1'=>'41 Dissolution .............. toutes formes', // - 'B110'=>'31 mod.mut. diverses .............. A Pers Phys.', - 'B111'=>'32 mod mut. diverses .............. B Société', - 'B112'=>'33 mod mut. diverses .............. C GIE ', - 'B113'=>'34 mod mut. diverses .............. D Sté civile', - 'B114'=>'37 loc. gérance recue ............. Pers Phys.', // - 'B115'=>'37 loc. gérance recue ............. Société', // - 'B116'=>'40 radiation ...................... Pers Phys.', - 'B117'=>'40 radiation ...................... Société', - 'B118'=>'37 Location gérance reçue ...... Pers Physique', - 'B119'=>'37 Location gérance reçue ...... Société', - 'B120'=>'30 confirmation Ets pr. ou sec..... Société', - 'B121'=>'30 confirmation Ets pr. ou sec..... Pers Phys.', - 'B122'=>'38 loc.gérance donnée ............. Pers Phys.', // - 'B123'=>'38 loc.gérance donnée ............. Société', // - 'B127'=>'40 radiation d\'office ............. toutes formes ', // - 'B128'=>'39 mention d\'office............. toutes formes ', // - 'B129'=>'39 transfert entre tribunaux ...... Pers Phys.', - 'B130'=>'39 transfert entre tribunaux ...... Société', - 'B132'=>'33 mod mut. diverses .............. GEIE', - 'B133'=>'40 radiation ...................... GEIE', // - 'B134'=>'33 mod mut. diverses trf siège..... GEIE', // - 'B136'=>'35 rectificatif ', // - 'B137'=>'35 additif', // - 'B138'=>'35 rectificatif supp. ', // - 'C301'=>'91 dépot des comptes annuels ...... Société', // - 'C331'=>'91 dépot des comptes annuels ...... Société', - 'C336'=>'35 rectificatif ', // - 'C337'=>'35 additif', // - 'C338'=>'35 rectificatif supp. ', // - ); - - private $tabTribunaux = array(); - private $tabFctDir = array(); - - private $tabDevises = array(); - private $tabEvenements=array(); - - private $regExFonction = ''; - private $tabDirigeants = array( - 'pr.sidents? directeur g.n.ral'=>1301, - 'P\.-D\.G\.'=>1301, - 'pr.sidents? du conseil d\'administration assumant la direction général'=>1302, - 'pr.sidents? du conseil d\'administration et administrateur'=>1303, - 'pr.sidents? du conseil d\'administration et directeur général'=>1304, - 'pr.sidents? du conseil d\'administration, directeur général et administrateur'=>1305, - 'Administrateurs? délégués?'=>101, - 'administrateurs? du G\.?I\.?E\.?'=>102, - 'Administrateurs? et membres?'=>103, - 'Administrateurs? et membres? du G\.?I\.?E\.?'=>104, - 'Administrateurs? et présidents?'=>105, - 'administrateurs? membres? engageants? le G\.?I\.?E\.?'=>106, - 'Administrateurs? uniques?'=>107, - 'Administrateurs?'=>100, - 'Co.?g.rants? associ.s? ind.finiment responsables?'=>401, - 'Co.?g.rants? associ.s?'=>402, - 'Co.?g.rants? non associ.s?'=>403, - 'Co.?g.rants? non statutaires?'=>404, - 'Co.?g.rants? pouvant engager la soci.t.'=>405, - 'Co.?g.rants? statutaires'=>406, - 'Co.?g.rants?'=>400, - 'Nouveaux? g.rants?'=>901, - 'G.rants? et directeurs? techniques?'=>902, - 'g.rants? et associ.s? en nom collectif'=>903, - 'g.rants? associ.s? en nom collectif'=>903, - 'g.rants? et associ.s? en nom'=>904, - 'g.rants? associ.s? en nom'=>904, - 'g..ants? (?:et )associ.s? ind.finiment (?:et solidairement )responsables?'=>905, - 'g.rants? (?:et )associ.s? uniques?'=>906, - 'g.rants? (?:et )associ.s?'=>907, - // gérant associé - 'g.rants? associ.s? majoritaires?'=>908, - 'g.rants? associ.s? minoritaires?'=>909, - 'g.rants? associ.s? tenus? ind.finiment et solidairement des dettes sociales'=>910, - 'g.rants? majoritaire'=>911, - 'g.rants? non associ.s?'=>912, - 'g.rants? non statutaires?'=>913, - 'g.rants? pouvant engager seuls la soci.t.'=>914, - 'g.rants? pouvant engager la soci.t.'=>915, - 'g.rants? salari.s?'=>916, - 'g.rants? statutaires? associ.s?'=>917, - 'g.rants? statutaires?'=>918, - 'g.rants? et administrateurs?'=>919, - 'G.rants? techniques?'=>920, - 'anciens? g.rants?'=>921, - 'g.rant\(e\)'=>900, - 'g.rants?'=>900, - 'associ.s? commandit.s? g.rants?'=>201, - 'associ.s? commandit.s?'=>202, - 'Associ.s? d\'une soci.t. civile'=>203, - 'Associ.s? de soci.t. civile'=>204, - //Associés de société civile - 'associ.s? en nom'=>205, - 'Associ.s? exploitants?'=>206, - 'Associ.s? non exploitants?'=>207, - 'Associ.s? non g.rants?'=>208, - 'Associ.s? g.rants?'=>209, - 'Associ.s? ind.finiment et solidairement responsables?'=>210, - 'Associ.s? ind.finiment responsables?'=>211, - 'Associés?'=>200, - 'Co.?commissaires? aux comptes suppl.ants?'=>301, - 'Co.?commissaires? aux comptes titulaires?'=>302, - 'Commissaires? aux comptes suppl.ants?'=>303, - 'Commissaires? aux comptes titulaires?'=>300, - 'Conjoints? Collaborateurs?'=>500, - 'Contr.leurs? de gestion et des comptes'=>601, - 'contr.leurs? de gestion du G\.?I\.?E\.?'=>602, - 'Contr.leurs? de gestion'=>603, - 'Contr.leurs? des comptes titulaires?'=>604, - 'contr.leurs? des comptes du G\.?I\.?E\.?'=>605, - 'Contr.leurs? des comptes et de gestion'=>606, - 'Contr.leurs? des comptes et membre du G\.?I\.?E\.?'=>607, - 'Contr.leurs? des comptes'=>608, - 'Contr.leurs'=>600, - 'Directeurs? général?u?x? adjoints?'=>701, - 'Directeurs? général?u?x? délégués? et administrateurs?'=>702, - 'Directeurs? général?u?x? délégués? et membres? du comité de surveillance'=>703, - 'Directeurs? général?u?x? délégués?'=>704, - 'Directeurs? général?u?x? et administrateurs?'=>705, - 'Directeurs? général?u?x? et membres? du directoire'=>706, - 'directeurs? général?u?x? uniques? du directoire'=>707, - 'directeurs? général?u?x? uniques?'=>708, - 'directeurs? général?u?x?'=>709, - 'directeurs? gérants?'=>710, - 'Directeurs? techniques?'=>711, - 'Directeurs? des transports'=>712, - 'Directeurs?'=>700, - 'dirigeants? à l\'étranger et en France'=>801, - 'Dirigeants? à l\'étranger'=>802, - 'dirigeants? en France et à l\'étranger'=>803, - 'dirigeants? en France'=>804,//805 autre dirigeant - 'Dirigeants?'=>800, - 'mandataires? ad hoc'=>1101, - 'mandataires? général'=>1102, - 'mandataires? généraux'=>1102, - 'Mandataires?'=>1100, - 'Membres? du G\.?I\.?E\.?'=>1201, - 'membres? du groupement'=>1202, - 'membres? et administrateurs?'=>1203, - 'Membres? du comité de direction'=>1204, - 'Membres? du comité de surveillance'=>1205, - 'Membres? du conseil de direction'=>1206, - 'Membres? du conseil de surveillance'=>1207, - 'Membres? du directoire'=>1208, - 'Membres?'=>1200, - 'fond.s? de pouvoir'=>1000, - 'Personnes? ayant le pouvoir d\'engager à titre habituel la société vis-à-vis des tiers'=>1001, - 'Personnes? ayant pouvoir d\'engager à titre habituel la société vis-à-vis des tiers'=>1001, - 'personnes? ayant le pouvoir d\'engager la société en France'=>1002, - 'personnes? ayant pouvoir d\'engager la société en France'=>1002, - 'Personnes? ayant le pouvoir d\'engager la société'=>1003, - 'Personnes? ayant pouvoir d\'engager la société'=>1003, - 'Personnes? ayant le pouvoir de diriger et gérer'=>1004, - 'Personnes? ayant pouvoir de diriger et gérer'=>1004, - 'personnes? pouvant engager à titre habituel l\'assujetti'=>1005, - 'Personnes?'=>1006, - 'pr.sidents? du conseil d\'administration'=>1306, - 'pr.sidents? du conseil de surveillance'=>1307, - 'pr.sidents? du directoire'=>1308, - 'pr.sidents? du G\.?I\.?E\.?'=>1309, - 'pr.sidents? et membres? du conseil de surveillance'=>1310, - 'Pr.sidents? et membres? du directoire'=>1311, - 'Pr.sidents? et pr.sidents? du comité de direction'=>1312, - 'pr.sidents? et pr.sidents? du comité de surveillance'=>1313, - 'Pr.sidents? et administrateurs?'=>1314, - 'Pr.sidents?'=>1300, - 'repr.sentants? de soci.t. .trang.re'=>1401, - 'repr.sentants? tant en France qu\'à l\'.tranger'=>1402, - 'Repr.sentants? à l\'.tranger'=>1403, - 'repr.sentants? l.gal?a?x? en France'=>1404, - 'Repr.sentants? l.gal?a?x?'=>1405, - 'Repr.sentants? permanents?'=>1405, - 'Repr.sentants?'=>1400, - 'co.?responsables? en France'=>1501, - 'responsables? pour la France'=>1502, - 'responsables? tant en France qu\'à l\'étranger'=>1503, - 'Responsables? technique'=>1504, - 'responsables? à l\'.tranger'=>1505, - 'Responsables? de la soci.t. en France'=>1506, - 'Responsables? en France'=>1507, - 'responsables? l.gal en France'=>1508, - 'responsables? en France'=>1508, - 'Responsables?'=>1500, - 'Vice-pr.sidents? du conseil d\'administration'=>1801, - 'vice-pr.sidents? du conseil de surveillance'=>1802, - 'Vice-pr.sidents? et administrateurs? priv.s?'=>1803, - 'Vice-pr.sidents? et administrateurs?'=>1804, - 'Vice-pr.sidents? et membres? du conseil de surveillance'=>1805, - 'Vice-pr.sidents?'=>1800, - 'Vice-secr.taires?'=>1601, - 'Vice-tr.soriers?'=>1701, - 'Tr.soriers?'=>1700, - 'Secr.taires? du conseil d\'administration'=>1602, - 'Secr.taires? du conseil de surveillance'=>1603, - 'Secr.taires?'=>1600, - 'Liquidateurs?'=>1900, - ); - - /** - * PDO Connection with Doctrine - * @var \Doctrine\DBAL\Connection - */ - protected $conn; - - /** - * Logger - * @var \Monolog\Logger - */ - protected $logger; - - /** - * Bodacc - * @param \Doctrine\DBAL\Connection $conn - */ - public function __construct($conn = null) - { - if ($conn === null) { - $this->conn = Zend_Registry::get('doctrine'); - } else { - $this->conn = $conn; - } - - if (Zend_Registry::isRegistered('logger')) { - $this->logger = Zend_Registry::get('logger'); - } - - /* Charge toute la table des tribunaux pour ne pas lancer systématiquement des - * requètes sur le serveur MySQL lors des intégrations de Bodacc - */ - $this->tabTribunaux = $this->getTabTribunaux(); - $this->tabFctDir = $this->getTabFctDir(); - $this->tabEvenements = $this->getTabEvenements(); - $this->tabDevises = $this->getTabDevises(); - $this->regExFonction = implode(')|(', array_keys($this->tabDirigeants)); - } - - /** - * Converti les accents au format TLS du Bodacc - * @param string $texteBodacc - * @return string - */ - public function convertAccents($texteBodacc) - { - return strtr($texteBodacc, self::$tabAccents); - } - - /** - * Vérifie si la balise passée en paramètre est valide - * @param string $balise - * @return boolean - */ - public function isBaliseBodacc($balise) - { - return array_key_exists($balise, self::$tabBalises); - } - - /** - * Initialisation du tableau privé des tribunaux - */ - private function getTabTribunaux() - { - $cache = dirname(__FILE__) . '/../Table/BodaccTribunaux.php'; - if (file_exists($cache)) { - return include $cache; - } else { - $tribunaux = array(); - $sql = "SELECT triCode, triNom, triCP, triSiret FROM jo.tribunaux WHERE triCode IS NOT NULL"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - while ($t = $stmt->fetch(\PDO::FETCH_OBJ)) { - $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; - } - } - - /** - * Initialisation du tableau privé des codes fonctions de direction - * @return array - */ - private function getTabFctDir() - { - $cache = dirname(__FILE__) . '/../Table/FctDir.php'; - if (file_exists($cache)) { - return include $cache; - } else { - $result = array(); - $sql = "SELECT codeFct, libelle FROM jo.bodacc_fonctions"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $result[intval($row->codeFct)] = $row->libelle; - } - } - - return $result; - } - } - - /** - * Retourne le libellé d'une fonction de direction - * @param unknown $codeFonction - * @return string - */ - public function getFctDir($codeFonction) - { - return $this->tabFctDir[$codeFonction]; - } - - /** - * Liste des tribunaux par commune - * @param int $codeInseeCommune - * @return array - */ - public function getTribunauxParCommune($codeInseeCommune) - { - $result = array(); - - $sql = "SELECT t.triId, t.triIdSup, i.CodeInsee, t.triCode, t.triType, t.triNom, - t.triCP, LPAD(t.triTel,10,0) AS triTel, LPAD(t.triFax,10,0) AS triFax, t.triWeb, - t.triMail, t.triSiret, t.triAdrNum, t.triAdrIndRep, t.triAdrTypeVoie, t.triAdrVoie, - t.triAdrComp, t.triVille, t.triStatut, t.triDateCessation, t.triCommentaire, - t.triNumGreffe - FROM jo.tribunaux t, jo.tribunauxInsee i - WHERE i.CodeInsee= :inseeCode AND i.triId=t.triId - ORDER BY t.triNumGreffe DESC, t.triId ASC"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('inseeCode', $codeInseeCommune); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - $result = $stmt->fetchAll(\PDO::FETCH_ASSOC); - } - - return $result; - } - - /** - * Liste des tribunaux par département - * @param string $dep - * @return array - */ - public function getTribunauxParDep($dep) - { - $result = array(); - - $sql = "SELECT t.triId, t.triIdSup, t.triCode, t.triType, t.triNom, t.triCP, - LPAD(t.triTel,10,0) AS triTel, LPAD(t.triFax,10,0) AS triFax, t.triWeb, t.triMail, - t.triSiret, t.triAdrNum, t.triAdrIndRep, t.triAdrTypeVoie, t.triAdrVoie, t.triAdrComp, - 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"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - if ($dep < 96) { - $stmt->bindValue('dep1', $dep.'000'); - $stmt->bindValue('dep2', $dep.'999'); - } else { - $stmt->bindValue('dep1', $dep.'00'); - $stmt->bindValue('dep2', $dep.'99'); - } - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - $result = $stmt->fetchAll(\PDO::FETCH_ASSOC); - } - - return $result; - } - - /** - * Donne la cours d'appel d'un tribunal par son code - * @param string $codeTribunal - */ - public function getTribunalIdCA($codeTribunal) - { - $sql = "SELECT triIdSup FROM jo.tribunaux WHERE triCode = :code"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('code', $codeTribunal); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - return $stmt->fetch(\PDO::FETCH_ASSOC); - } - - return ''; - } - - /** - * Liste des tribunaux - */ - public function getListeTribunaux() - { - return $this->tabTribunaux; - } - - /** - * Initialisation du tableau privé des évènements - * @return array - */ - private function getTabEvenements() - { - $cache = dirname(__FILE__) . '/../Table/Evenements.php'; - if (file_exists($cache)) { - return include $cache; - } else { - $result = array(); - $sql = "SELECT codEven, libEven, Bodacc_Code, Rubrique, version, lienEtab FROM jo.tabEvenements"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $result[$row->codEven] = array( - 'libEven' => $row->libEven, - 'Bodacc_Code' => $row->Bodacc_Code, - 'Rubrique' => $row->Rubrique, - 'Version' => $row->version, - 'LienEtab' => $row->lienEtab, - ); - } - } - - return $result; - } - } - - /** - * Initialisation du tableau privé des devises du Bodacc - * @return array - */ - private function getTabDevises() - { - $cache = dirname(__FILE__) . '/../Table/Devises.php'; - if (file_exists($cache)) { - return include $cache; - } else { - $result = array(); - $sql = "SELECT libDeviseBodacc, devIso FROM jo.bodacc_devises"; - try { - $stmt = $this->conn->prepare($sql); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $result[$row->libDeviseBodacc] = $row->devIso; - } - } - - return $result; - } - } - - /** - * Vérifie si le code du Tribunal BODACC est connu - * @param string $codeBodaccDuTribunal - * @return bool - */ - public function isTribunal($codeBodaccDuTribunal) - { - $codeBodaccDuTribunal = trim($codeBodaccDuTribunal); - return @array_key_exists($codeBodaccDuTribunal, $this->tabTribunaux); - } - - /** - * Retourne le libellé du code du Tribunal BODACC - * @param string $codeBodaccDuTribunal - * @return string - */ - public function getTribunalNom($codeBodaccDuTribunal) - { - $codeBodaccDuTribunal = trim($codeBodaccDuTribunal); - return $this->tabTribunaux[$codeBodaccDuTribunal]['nom']; - } - - /** - * - * @param string $codeBodaccDuTribunal - * @return mixed - */ - public function getTribunalDep($codeBodaccDuTribunal) - { - $codeBodaccDuTribunal = trim($codeBodaccDuTribunal); - return $this->tabTribunaux[$codeBodaccDuTribunal]['dep']; - } - - /** - * - * @param string $codeBodaccDuTribunal - * @return mixed - */ - public function getTribunalSiret($codeBodaccDuTribunal) - { - $codeBodaccDuTribunal = trim($codeBodaccDuTribunal); - return $this->tabTribunaux[$codeBodaccDuTribunal]['siret']; - } - - /** - * - * @param string $libelleDuTribunal - * @param number $dep - * @return unknown|boolean - */ - public function getTribunalCode($libelleDuTribunal, $dep=0) - { - $libelleDuTribunal = preg_replace('/[0-9]/', ' ', str_replace("\r\n", ' ', strtoupper($libelleDuTribunal))); - $libelleDuTribunal = str_replace("\n", ' ', $libelleDuTribunal); - $libelleDuTribunal = strtr($libelleDuTribunal, array( - "TRIBUNAL DE COMM'APPELERCE"=>'TC', // BUG DU BODACC 2008-A093-3146 - 'TRIBUNAL DE COMMERCE'=>'TC', - 'TRIBUNAL DE GRANDE INSTANCE'=>'TGI', - 'TRIBUNAL D\'INSTANCE'=>'TI', - 'TRIBUNAL MIXTE DE COMMERCE'=>'TMX', - 'TRIBUNAL DE PREMIERE INSTANCE'=>'TPI', - 'TRIBUNAL SUPÉRIEUR D\'APPEL'=>'TSA', - ' D\''=>' ', ' DE '=>' ', - 'GREFFE DU'=>'', '-'=>' ', - 'Ç'=>'C', 'É'=>'E', 'Î'=>'I', 'Â'=>'A', 'È'=>'E', 'Ô'=>'O', 'Ê'=>'E', - ' DU MANS'=>' LE MANS', - ' DU CREUSOT'=>' LE CREUSOT', - ' DU HAVRE'=>' LE HAVRE', - ' DU '=>' ', 'PUY'=>'PUY EN VELAY', 'LE PUY EN VELAY'=>'PUY EN VELAY', - 'ALÈS'=>'ALES', - '.'=>' ', - )); - $libelleDuTribunal = trim(preg_replace('/ +/', ' ', $libelleDuTribunal)); - if (''.$dep=='2A' || ''.$dep=='2B') { - $dep = 20; - } else { - $dep = $dep*1; - } - foreach ($this->tabTribunaux as $code=>$tribunal) { - if ($dep != 0 && ($tribunal['dep'])*1 == $dep) { - if (str_replace('TGIcc', 'TGI', strtr($tribunal['nom'], array('-'=>' ', ' DE LA REUNION'=>''))) == $libelleDuTribunal) { - return $code; - } elseif (str_replace('TIcc', 'TI', strtr($tribunal['nom'], array('-'=>' ', ' DE LA REUNION'=>''))) == $libelleDuTribunal) { - return $code; - } elseif (preg_match('/^PREFECTURE/i', $libelleDuTribunal) && preg_match('/^PREFECTURE/i', $tribunal['nom'])) { - return $code; - } 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'])); - $sprefParam = trim(strtr(strtr(preg_replace('/^SOUS.PREFECTURE/i', '', $libelleDuTribunal), array( - 'SAINT '=>'ST ', 'SAINTE '=>'STE ', 'BASSIN ARCACHON'=>'ARCACHON', ' (DRÔME)'=>'')), 'ÀÂÈÎÔ', 'AAEIO')); - if ($sprefEnBase == $sprefParam) { - return $code; - } - } elseif ($dep == 13 && $tribunal['nom'] == 'TGI TARASCON' && $libelleDuTribunal == 'TGI TARASCON SUR RHONE') { - return $code; - } elseif ($dep==13 && $tribunal['nom']=='TC TARASCON' && $libelleDuTribunal == 'TC TARASCON SUR RHONE') { - return $code; - } - } elseif ($dep==0 && str_replace('TGIcc', 'TGI', strtr($tribunal['nom'], array('-'=>' ', ' DE LA REUNION'=>''))) == $libelleDuTribunal) { - return $code; - } elseif ($dep==978 && str_replace('TGIcc', 'TGI', strtr($tribunal['nom'], array('-'=>' ', ' DE LA REUNION'=>''))) == $libelleDuTribunal) { - return $code; - } elseif ($dep==971 && str_replace('TGIcc', 'TGI', strtr($tribunal['nom'], array('-'=>' ', ' DE LA REUNION'=>'')))==$libelleDuTribunal) { - return $code; - } elseif ($dep==974 && $libelleDuTribunal=='TMX SAINT PIERRE LA REUNION') { - return $code; - } elseif ($dep==975 && $libelleDuTribunal=='TGI SAINT PIERRE') { - return $code; - } elseif ($dep==70 && $libelleDuTribunal=='TC VESOUL') { - return $code; - } elseif (($dep==95 || $dep==975) - && ($libelleDuTribunal=='TRIBUNAL PREMIERE INSTANCE SAINT PIERRE ET MIQUELON' || $libelleDuTribunal=='TPI SAINT PIERRE ET MIQUELON')) { - return $code; - } elseif (($dep==971 || $dep==985 || $dep==976) - && ($libelleDuTribunal=='TRIBUNAL PREMIERE INSTANCE MAMOUDZOU' || $libelleDuTribunal=='TPI MAMOUDZOU')) { - return $code; - } elseif (($dep==971 || $dep==985 || $dep==976) - && ($libelleDuTribunal=='TRIBUNAL DE GRANDE INSTANCE DE MAMOUDZOU' || $libelleDuTribunal=='TGI MAMOUDZOU')) { - return $code; - } - } - - return false; - } - - /** - * Vérifie si le code du Tribunal BODACC est connu - * @param string $codeEven - * @return boolean - */ - public function isCodeEvenement($codeEven) - { - $code = $codeEven*1; - if ($code==0) { - return false; - } - return array_key_exists($code, $this->tabEvenements); - } - - /** - * Retourne le libellé de l'évènement BODACC codifié par S&D - * @param string $codeEven - * @return boolean - */ - public function getEvenement($codeEven) - { - $code = intval($codeEven); - if ($code == 0) { - return false; - } - if (array_key_exists($code, $this->tabEvenements)) { - return $this->tabEvenements[$code]['libEven']; - } - - return false; - } - - /** - * Retourne le niveau de version du code évènement BODACC codifié par S&D - * @param string $codeEven - * @return boolean - */ - public function getVersionEvenement($codeEven) - { - $code = intval($codeEven); - if ($code == 0) { - return false; - } - if (array_key_exists($code, $this->tabEvenements)) { - return $this->tabEvenements[$code]['Version']; - } - - return false; - } - - /** - * Retourne le libellé du Chapitre de l'évènement BODACC (comptes, creations, mmd, procol, radiations, ventes) - * @param unknown $codeEven - * @return boolean - */ - public function getChapitreEvenement($codeEven) - { - $code = intval($codeEven); - if ($code == 0) { - return false; - } - if (array_key_exists($code, $this->tabEvenements)) { - return $this->tabEvenements[$code]['Rubrique']; - } - - return false; - } - - /** - * Retourne le code de l'édition du BODACC (A, B ou C) - * @param string $codeEven - * @return boolean - */ - public function getEditionEvenement($codeEven) - { - $code = intval($codeEven); - if ($code == 0) { - return false; - } - if (array_key_exists($code, $this->tabEvenements)) { - return $this->tabEvenements[$code]['Bodacc_Code']; - } - - return false; - } - - /** - * Retourne si la porté de l'évènement est relative à l'établissement uniquement - * @param string $codeEven - * @return boolean - */ - public function isEvenementEtab($codeEven) - { - $code = intval($codeEven); - if ($code == 0) { - return false; - } - if (array_key_exists($code, $this->tabEvenements)) { - return $this->tabEvenements[$code]['LienEtab']; - } - - return false; - } - - /** - * Vérifie si une devise texte du Bodacc est connu - * @param string $strDevise - * @return boolean - */ - public function isDeviseBodacc($strDevise) - { - return array_key_exists($strDevise, $this->tabDevises); - } - - /** - * Retoune le code ISO 4217 d'une devise texte du Bodacc - * @param string $strDevise - * @return mixed - */ - public function getDeviseBodacc($strDevise) - { - return $this->tabDevises[$strDevise]; - } - - /** - * Insert le libellé de devise textuel du Bodacc - * @param string $strDevise - * @param string $deviseIso - * @return boolean - */ - public function addDeviseBodacc($strDevise, $deviseIso) - { - $result = $this->conn->insert('jo.bodacc_devices', array( - 'libDeviseBodacc' => $strDevise, - 'devIso' => $deviseIso, - 'dateInsert' => date('YmdHis') - )); - - if ($result) { - $this->tabDevises = $this->getTabDevises(); - return true; - } - - return false; - } - - /** - * Vérifie si le code rubrique de l'annonce au Bodacc est connu - * @param string $codeRubriqueBodacc - * @return boolean - */ - public function isRubriqueBodacc($codeRubriqueBodacc) - { - return array_key_exists($codeRubriqueBodacc, self::$tabRubriques); - } - - /** - * Retourne le code rubrique de l'annonce au Bodacc - * @param string $codeRubriqueBodacc - * @return string - */ - public function getLibRubriqueBodacc($codeRubriqueBodacc) - { - return $this->tabRubriques[$codeRubriqueBodacc]; - } - - /** - * Retourne le code évènement de l'annonce en provenance du Bodacc XML - * @param string $libJugementXML Libellé de la rubrique au Bodacc XML - * @return string - */ - public function getCodeNatureEvenement($libEvenXML) - { - foreach ($this->tabNaturesEvenements as $code => $label) { - if (md5($label) == md5($libEvenXML)) { - return intval($code); - } - } - - return 0; - } - - /** - * - * @param string $strAdministration - * @return array - */ - public function getDirigeants($strAdministration) - { - $tabRet = array(); - $strFonctions = $this->regExFonction; - $tabNoms = array(); - if (is_array($strAdministration)) { - $strAdministration = implode('. ', $strAdministration); - } - $strAdministration = trim($strAdministration); - $strAdministration = str_ireplace('Nom d\'usage :', 'Nom d\'usage =', trim($strAdministration)); - if ($strAdministration == '') { - return $tabRet; - } - $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 - * La première ligne ne contient pas de NOM PRENOM car il s'agit de la 1ère ligne - */ - foreach ($tabAdministration as $i => $ligne) { - // On recherche la fonction et son code fonction de la ligne - foreach ($this->tabDirigeants as $fonction => $numFct) { - if (preg_match("/(.*)$fonction(.*)$/iu", $ligne, $matches)) { - $tabFonctions[$i] = ''; - $tabCodeFct[$i] = $numFct; - $tabOldFct[$i] = 0; - if (array_key_exists($i+1, $tabAdministration)) { - $tabFonctions[$i] = preg_replace("/($strFonctions)/i", '', $tabAdministration[$i+1]); - if (preg_match("/(partant|ancien|suppression|cha.g|d.part|d.mis(si|is)on|r.vocation)/iu", $tabAdministration[$i+1])) { - $tabOldFct[$i] = 1; - } - } - 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])); - } 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 = ''; - } - // 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; - } - - /** - * Détermine les NOMs et PRENOMs dans une chaine de caractère - * @param string $strNomPrenom - * @return array - */ - public function getNomPrenomGenre($strNomPrenom) - { - $noms = $prenoms = $genre = ''; - $tabMots = preg_split('/( +|\.+)/', $strNomPrenom); - foreach ($tabMots as $i => $prenom) { - if (strlen(trim($prenom)) == 0 || strlen(trim($prenom, " '*-/")) <= 1) { - $noms.= $prenom.' '; - continue; - } - 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() > 0) { - $tabPrenom = $stmt->fetch(\PDO::FETCH_ASSOC); - // C'est plutôt le nom de famille au début de la chaîne - if ($i == 0) { - $noms.= $prenom.' '; - } else { - $prenoms.= $prenom.', '; - if ($genre == '' && $tabPrenom['genre'] == 1 && $tabPrenom['mixte'] == 0) { - $genre = 'M'; - } elseif ($genre == '' && $tabPrenom['genre'] == 2 && $tabPrenom['mixte'] == 0) { - $genre = 'F'; - } - } - } - // Ce n'est pas un prénom mais un nom de famille - else { - $noms.= $prenom.' '; - } - } - return array( - 'Nom' => trim($noms), - 'Prenoms' => preg_replace('/,$/', '', trim($prenoms)), - 'Genre' => $genre - ); - } - - /** - * - * @param string $bodaccCode - * @param int $annee - * @param int $num - * @return array - */ - public function getNumPageAnnonce($bodaccCode, $annee, $num) - { - $result = array(); - - $sql = "SELECT Bodacc_Code, Bodacc_Annee_Parution, Bodacc_Num, Num_Annonce, Tribunal_Dept, Tribunal_Code, Rubrique_Bodacc, length(annonce) as Long - FROM jo.bodacc WHERE Bodacc_Code=:code AND Bodacc_Annee_Parution=:annee AND Bodacc_Num=:num"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('code', $bodaccCode); - $stmt->bindValue('annee', $annee); - $stmt->bindValue('num', $num); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $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 $result; - } - - /** - * Vérifie si la date du jugement correspond à une date de jugements civils pour une date donnée - * @param string $tribunal - * @param string $dateJug - * @param int $jourJug - * @param int $jjJug - * @param string $texteAnnonce - * @return number - */ - public function isAudienceCivile($tribunal, $dateJug, $jourJug, $jjJug, $texteAnnonce) - { - $tribunal = trim($tribunal); - $droitLocal = false; - - // Date des audiences civiles droit local - switch ($tribunal) { - case 'METZG': // Le mercredi - case 'MULHOG': // Le mercredi - $droitLocal=true; - if ($jourJug == 3) { - echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du mercredi !".PHP_EOL; - return 1; - } - break; - case 'THIONG': // Le jeudi à 9h - $droitLocal = true; - if ($jourJug == 4) { - echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du jeudi !".PHP_EOL; - return 1; - } - break; - case 'SARREG': // Les 1er, 2ème et 4ème mardi - $droitLocal = true; - if ($jourJug==2 && $jjJug<15 && $jjJug>21) { - echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du mardi !".PHP_EOL; - return 1; - } - break; - case 'STRASG': // ? - $droitLocal = true; - //echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles de Strasbourg !".PHP_EOL; - return 0; - break; - case 'SAVERG': // Le mardi et 2ème, 3ème et 4ème vendredi - $droitLocal = true; - if ($jourJug == 2 || ($jourJug == 5 && $jjJug > 7)) { - echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles du vendredi !".PHP_EOL; - return 1; - } - case 'COLMAG': // ? - $droitLocal = true; - //echo date('Y/m/d - H:i:s') ." - Droit local : Audiences civiles de Colmar !".PHP_EOL; - return 0; - break; - } - - if ($droitLocal && preg_match("/insolvabilit.{0,3}notoire/iu", $texteAnnonce)) { - return 1; - } - - return 0; - } - - public function getJALparDep($dep) - { - $result = array(); - - $sql = "SELECT id, dep, nomJal, siteWeb, email, adresse, cp, ville, tel, fax, parution, aboAnnuel, infos - FROM jo.tabJAL WHERE dep = :dep"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('dep', $dep); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - $result = $stmt->fetchAll(\PDO::FETCH_ASSOC); - } - - return $result; - } - - public function getListeJalCollecte() - { - $result = array(); - - $sql = "SELECT id, nomJal FROM jo.tabJAL WHERE sedDateAbo!=0 GROUP BY nomJal ORDER BY nomJal ASC"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('dep', $dep); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - 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) - { - $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%' "; - $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"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('siren', $siren); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - $annCap = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($fj < 7000 || $fj > 7999) { - $activite = trim($annCap['Activite']); - } - } - - if ($activite == '' && ($fj > 90 && $fj < 94 || $fj > 9000 && $fj < 9400)) { - $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"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('siren', $siren); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - $annCap = $stmt->fetch(\PDO::FETCH_ASSOC); - $activite = trim($annCap['Assoc_NObjet']); - if ($activite == '') { - $activite = trim($annCap['Assoc_Objet']); - } - } - } elseif ($activite == '' && ($fj < 7000 || $fj > 7999)) { - $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 - FROM historiques.entrep e, historiques.texte x - WHERE 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"; - $stmtNb = 0; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('siren', $siren); - $stmt->execute(); - $stmtNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmtNb > 0) { - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - 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 (strpos(substr($matches[1], -20), 'cess') === false - && strpos(substr($matches[1], -20), 'date') === false) { - $activite = $matches[2]; - break; - } - } - } - } - } - } - - return $activite; - } - - /** - * - * @param string $strFJ - * @return string - */ - public function getCodeFormeJur($strFJ) - { - $tabCjBodacc = include 'Metier/Bodacc/BodaccCJ.php'; - $strFJ = strtoupper(trim(preg_replace('/[^a-z]/i', '', $strFJ))); - - return $tabCjBodacc[$strFJ]; - } -} diff --git a/library/Metier/Ctx/AffaireStatus.php b/library/Metier/Ctx/AffaireStatus.php deleted file mode 100755 index 056a8c24..00000000 --- a/library/Metier/Ctx/AffaireStatus.php +++ /dev/null @@ -1,10 +0,0 @@ - "Affaire en délibéré", - 'ENCOURS' => "Affaire en cours", - 'EXPERT' => "Affaire en cours d'expertise", - 'JUGRAP' => "Affaire devant le juge", - 'TERMJON' => "Affaire terminée (jonction)", - 'TERMJUG' => "Affaire jugée et terminée", - 'TERMRAD' => "Affaire terminée (radiation)", -); diff --git a/library/Metier/Defaillance/Detect.php b/library/Metier/Defaillance/Detect.php deleted file mode 100755 index 64281bf8..00000000 --- a/library/Metier/Defaillance/Detect.php +++ /dev/null @@ -1,405 +0,0 @@ -debug) { - file_put_contents('procol.log', "=== Situation Juridique ===\n"); - } - - // Définir la date du jour - $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 - $this->ListEvenProcolDelete = include __DIR__ . '/ProcolDelete.php'; - } - - public function setFJ($val) - { - $this->FJ = $val; - } - - public function setBilanCloture($val) - { - $this->BilanCloture = $val; - } - - public function setInseeActif($val) - { - $this->InseeActif = $val; - } - - public function setRcsActif($val) - { - $this->RcsActif = $val; - } - - public function setEtabActif($val) - { - $this->EtabActifNb = $val; - } - - public function setRM($val) - { - $this->IsRM = $val; - } - - public function setGreffe($val) - { - $this->IsRCS = $val; - } - - /** - * Retourne la situation - * @return string - * Code situation juridique - */ - public function getSituation() - { - return $this->Situation; - } - - /** - * Retourne la timeline - * @return array - */ - public function getTimeline() - { - return $this->Timeline; - } - - /** - * Lecture de la période et de la date - * @param string $txt - */ - public function planPeriod($txt) - { - if (preg_match('/dur.e(?:.*)plan(?:.*)(\d+)\s+ans?/Uisu', $txt, $matches)) { - $this->PlanPeriod = $matches[1] * 12; // 10 ans = 120 mois - } - } - - /** - * Calcul de la date de fin du plan - */ - public function planEnd() - { - $calc = \DateTime::createFromFormat('Ymd', $this->PlanDateStart); - $interval = new \DateInterval('P'.$this->PlanPeriod.'M'); - $calc->add($interval); - $this->PlanDateEnd = $calc->format('Ymd'); - } - - public function situationEnd() - { - $calc = \DateTime::createFromFormat('Ymd', $this->SituationDateStart); - $interval = new \DateInterval('P'.$this->ProcolMaxYear.'Y'); - $calc->add($interval); - $this->SituationDateEnd = $calc->format('Ymd'); - } - - public function nbMonthPast($date) - { - $date1 = new \DateTime(); - $date1->createFromFormat('Ymd', $date); - $date2 = new \DateTime(); - $diff = $date2->diff($date1)->m; - return $diff; - } - - /** - * Traite l'annonce dans le flux en executant les règles - * @param stdClass $ann - * date, code, txt - */ - public function parse($ann) - { - $this->Even = $ann->code; - $this->EvenDateJugement = $ann->date; - $this->EvenTxt = $ann->txt; - - if ($this->debug) { - file_put_contents('procol.log', "Annonce : ".$ann->date . '-' . $ann->code."\n", FILE_APPEND); - } - - // Marqueur d'effacement de la procol - if (array_key_exists($this->Even, $this->ListEvenProcolDelete)) { - $this->EvenDelete = $this->ListEvenProcolDelete[$this->Even]; - } - - // Evenement procol précédent - if (count($this->Timeline) > 0) { - $last = end($this->Timeline); - $this->SituationLastEven = $last['even']; - $this->SituationNbMonthPast = $this->nbMonthPast($last['DateStart']); - } - - // --- Variable pour le plan - $this->PlanDateStart = $this->EvenDateJugement; - $this->planPeriod($this->EvenTxt); - $this->planEnd(); - - // Lancement des règles - $this->rules(); - - if ($this->debug) { - file_put_contents('procol.log', "\n", FILE_APPEND); - } - } - - /** - * Execution des règles - */ - protected function rules() - { - $rules = include __DIR__ . '/DetectTable.php'; - $setSituation = false; - // Parcours des règles - foreach ($rules as $rule) { - if ($this->debug) { - file_put_contents('procol.log', $rule['name']."\n", FILE_APPEND); - } - $result = $this->params($rule['params']); - if ($result === true) { - // Defintion paramètres situation - $this->SituationDateStart = $this->EvenDateJugement; - $this->situationEnd(); - - // Enregistrement dans la timeline - $this->Timeline[] = array( - 'Situation' => $this->Situation, - 'Even' => $this->Even, - 'DateStart' => $this->SituationDateStart, - 'DateEnd' => $this->SituationDateEnd, - ); - file_put_contents('procol.log', print_r($this->Timeline, 1)."\n", FILE_APPEND); - } - - if ($this->debug) { - if ($result === true) { - file_put_contents('procol.log', "=> OK\n", FILE_APPEND); - } else { - file_put_contents('procol.log', "=> PASS\n", FILE_APPEND); - } - } - } - } - - /** - * Execution des conditions - * @param array $conditions - */ - protected function params($conditions) - { - $cNb = count($conditions); - $cIncr = 1; - foreach ($conditions as $cond) { - if ($this->debug) { - file_put_contents('procol.log', "\t".$cond['var']." ".$cond['op']." ".$cond['value']."\n", FILE_APPEND); - } - $result = $this->paramEval($cond['var'], $cond['op'], $cond['value']); - if ($result === false) { - return false; - } - if ($cNb == $cIncr) { - return true; - } - $cIncr++; - } - } - - /** - * Transformation des variables - * @param string $val - * @return number|mixed|NULL - */ - protected function paramValue($val) - { - if (is_numeric($val)) { - return (float) $val; - } - - if (is_array($val)) { - return $val; - } - - if (is_string($val) && property_exists($this, $val)) { - return $this->{$val}; - } - - if (is_string($val) && defined('self::'.$val)) { - return constant('self::'.$val); - } - - if (is_string($val)) { - return $val; - } - - return null; - } - - /** - * Evaluation de la condition - * @param string $var - * @param string $op - * @param string $value - * @return boolean|NULL - */ - protected function paramEval($var, $op, $value) - { - // Operation - switch ($op) { - case 'SET': - $this->{$var} = $value; - if ($this->debug) { - file_put_contents('procol.log', "\t\tSET ".$var." = ".$value."\n", FILE_APPEND); - } - return true; - break; - - case 'MIN': - $valueReal = $this->paramValue($value); - if ($this->debug) { - file_put_contents('procol.log', "\t".$this->{$var}." > ".$valueReal."\n", FILE_APPEND); - } - if ($this->{$var} !== null && $this->{$var} > $valueReal) { - return true; - } - return false; - break; - - case 'MAX': - $valueReal = $this->paramValue($value); - if ($this->debug) { - file_put_contents('procol.log', "\t".$this->{$var}." < ".$valueReal."\n", FILE_APPEND); - } - if ($this->{$var} !== null && $this->{$var} < $valueReal) { - return true; - } - return false; - break; - - case 'EGAL': - $valueReal = $this->paramValue($value); - if (is_array($valueReal)) { - if ($this->debug) { - file_put_contents('procol.log', "\t".$this->{$var}." = ".$value."\n", FILE_APPEND); - } - if (in_array($this->{$var}, $valueReal)) { - return true; - } - } elseif ($this->{$var} == $valueReal) { - if ($this->debug) { - file_put_contents('procol.log', "\t".$this->{$var}." = ".$valueReal."\n", FILE_APPEND); - } - return true; - } - return false; - break; - - case 'LIST': - $valueReal = $this->paramValue($value); - if ($this->debug) { - file_put_contents('procol.log', "\t".$this->{$var}." = ".print_r($valueReal, 1)."\n", FILE_APPEND); - } - if ($valueReal !== null && in_array($this->{$var}, $valueReal)) { - return true; - } - return false; - break; - } - - return null; - } -} diff --git a/library/Metier/Defaillance/DetectTable.php b/library/Metier/Defaillance/DetectTable.php deleted file mode 100644 index 79a087f5..00000000 --- a/library/Metier/Defaillance/DetectTable.php +++ /dev/null @@ -1,307 +0,0 @@ - 'PLAN', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'PlanPeriod', 'op' => 'EGAL', 'value'=> array(0,120)), - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => array( - '1407', // Modification de plan - '1409', // Modification du plan de continuation - '1413', // Arrêt du plan de continuation - '1414', // Arrêt du plan de redressement - '1101', // Arrêt du plan de sauvegarde - )), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'PL'), - ), - ), - // -- Period par defaut - array( - 'name' => 'PLAN-DUREE-DEFAUT1', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'PlanPeriod', 'op' => 'MAX', 'value'=> 1), - array( 'var' => 'PlanPeriod', 'op' => 'SET', 'value' => 120), - ), - ), - array( - 'name' => 'PLAN-DUREE-DEFAUT2', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'PlanPeriod', 'op' => 'MIN', 'value'=> 120), - array( 'var' => 'PlanPeriod', 'op' => 'SET', 'value' => 120), - ), - ), - // --- Period par default pour FJ spécifique - array( - 'name' => 'PLAN-DUREE-FJ1', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'PlanPeriod', 'op' => 'MAX', 'value'=> 1), - array( 'var' => 'FJ', 'op' => 'EGAL', 'value' => array( - 16,1600, // Exploitant agricole - 63,6316,6317,6318, // Société coopérative agricole - 5431,5432,5531,5532, // SMIA, SICA - 5631,5632,6532, - 6533,6534,6535, // GAEC, GFA, Gpt Agricole Foncier - 6597,6598, - )), - array( 'var' => 'PlanPeriod', 'op' => 'SET', 'value' => 180), - ), - ), - // --- Period par default pour FJ spécifique - array( - 'name' => 'PLAN-DUREE-FJ2', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'PlanPeriod', 'op' => 'MIN', 'value'=> 120), - array( 'var' => 'FJ', 'op' => 'EGAL', 'value' => array( - 16,1600, // Exploitant agricole - 63,6316,6317,6318, // Société coopérative agricole - 5431,5432,5531,5532, // SMIA, SICA - 5631,5632,6532, - 6533,6534,6535, // GAEC, GFA, Gpt Agricole Foncier - 6597,6598, - )), - array( 'var' => 'PlanPeriod', 'op' => 'SET', 'value' => '180'), - ), - ), - // --- Elimination du plan : période atteinte - array( - 'name' => 'PLAN-PERIOD-ATTEINTE', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'PL'), - array( 'var' => 'PlanDateEnd', 'op' => 'MIN', 'value' => 'DateToday'), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- Elimination du plan : appel de jugement - array( - 'name' => 'PLAN-APPEL-JUGEMENT', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'PL'), - array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 4), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'PA'), - ), - ), - // --- Elimination du plan : cutoff - array( - 'name' => 'PLAN-CUT-OFF', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'PL'), - array( 'var' => 'Cutoff', 'op' => 'EGAL', 'value' => true), - array( 'var' => 'ScoreSolv', 'op' => 'MIN', 'value' => 0), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- Début de procol - array( - 'name' => 'PROCOL-START', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenProcol'), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'P'), - ), - ), - // --- Pas de mention de la procol - array( - 'name' => 'PROCOL-EFFACEMENT-1', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 1), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- Ne pas mentionner la procol si CJ=1xxx - array( - 'name' => 'PROCOL-EFFACEMENT-2.1', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 2), - array( 'var' => 'FJ', 'op' => 'MIN', 'value' => 1000), - array( 'var' => 'FJ', 'op' => 'MAX', 'value' => 1999), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- Ne pas mentionner la procol si actif et CJ!=9xxx et even de plus d'un mois - array( - 'name' => 'PROCOL-EFFACEMENT-2.2', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 2), - array( 'var' => 'InseeActif', 'op' => 'EGAL', 'value' => 1), - array( 'var' => 'FJ', 'op' => 'MAX', 'value' => 9000), - array( 'var' => 'SituationNbMonthPast', 'op' => 'MIN', 'value' => 1), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- Pas Procol si actif RCS - array( - 'name' => 'PROCOL-EFFACEMENT-3', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 3), - array( 'var' => 'RcsActif', 'op' => 'EGAL', 'value' => 1), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- Le dernier jugement est un appel => Procol Suspendu - array( - 'name' => 'PROCOL-EFFACEMENT-4', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'EvenDelete', 'op' => 'EGAL', 'value' => 4), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'PA'), - ), - ), - // --- Procédure trop ancienne plus de 12 ans et actif - array( - 'name' => 'PROCOL-ANCIEN', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'InseeActif', 'op' => 'EGAL', 'value' => 1), - array( 'var' => 'SituationDateEnd', 'op' => 'MAX', 'value' => 'DateToday'), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- En Procol mais présence d'une annonce de cloture ou LJ avec Bilan publié ultérieurement - array( - 'name' => 'PROCOL-CLOTURE-LJ-BILAN', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => array( - 1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1311,1312,1313, - 1500,1501,1502,1503,1504 - )), - array( 'var' => 'BilanCloture', 'op' => 'MIN', 'value' => 'DateToday'), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- En Procol mais présence d'une annonce LJ avec Bilan publié ultérieurement, uniquement FJ!=1xxx - array( - 'name' => 'PROCOL-CLOTURE', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'FJ', 'op' => 'MIN', 'value' => 1999), - //Si l'evenement procol de départ, précédent est - array( 'var' => 'SituationLastEven', 'op' => 'EGAL', 'value' => array( - 1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1311,1312,1313,1314,1417 - )), - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => array( - 1502,1503 - )), - array( 'var' => 'BilanCloture', 'op' => 'MIN', 'value' => 'DateToday'), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'CL'), - ), - ), - // --- En procol mais cutoff manuel - array( - 'name' => 'PROCOL-CUT-OFF', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => 'P'), - array( 'var' => 'Cutoff', 'op' => 'EGAL', 'value' => true), - array( 'var' => 'ScoreSolv', 'op' => 'MIN', 'value' => 0), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- Absorbé ?? ICI uniquement lorsque Situation = '' - array( - 'name' => 'ABSORPTION', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => ''), - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenAbsorption'), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'A'), - ), - ), - // --- Dissolution ?? ICI uniquement lorsque Situation = '' - array( - 'name' => 'DISSOLUTION', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => ''), - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenDissolution'), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'D'), - ), - ), - // --- Dissolution mais bilan après événements ?? ICI uniquement lorsque Situation = '' - array( - 'name' => 'DISSOLUTION-AVEC-BILAN', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => ''), - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenDissolution'), - array( 'var' => 'BilanCloture', 'op' => 'MIN', 'value' => 'EvenDateJugement'), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => ''), - ), - ), - // --- Radiation RM - array( - 'name' => 'RADIATION-RM', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => ''), - array( 'var' => 'IsRM', 'op' => 'EGAL', 'value' => 1), - array( 'var' => 'InseeActif', 'op' => 'EGAL', 'value' => 0), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'RR'), - ), - ), - // --- Radiation RCS - array( - 'name' => 'RADIATION-RCS', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => ''), - array( 'var' => 'IsRCS', 'op' => 'EGAL', 'value' => 1), - array( 'var' => 'InseeActif', 'op' => 'EGAL', 'value' => 0), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'RR'), - ), - ), - // --- Radiation Publié 1 - array( - 'name' => 'RADIATION-PUB1', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => ''), - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenRadiation'), - array( 'var' => 'EtabActifNb', 'op' => 'EGAL', 'value' => 0), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'RP'), - ), - ), - // Radiation Publié 2 - array( - 'name' => 'RADIATION-PUB2', - 'value' => 'CONTINUE', - 'params' => array( - array( 'var' => 'Situation', 'op' => 'EGAL', 'value' => ''), - array( 'var' => 'Even', 'op' => 'EGAL', 'value' => 'ListEvenRadiation'), - array( 'var' => 'InseeActif', 'op' => 'EGAL', 'value' => 0), - array( 'var' => 'IsRCS', 'op' => 'EGAL', 'value' => 1), - array( 'var' => 'Situation', 'op' => 'SET', 'value' => 'RP'), - ), - ), -); diff --git a/library/Metier/Defaillance/EvenAbsorption.php b/library/Metier/Defaillance/EvenAbsorption.php deleted file mode 100644 index 0518f33d..00000000 --- a/library/Metier/Defaillance/EvenAbsorption.php +++ /dev/null @@ -1,5 +0,0 @@ - 1, //Vente aux enchères suite à saisie - 1010 => 1, //Déclaration de cessation de paiement - 1050 => 1, //Homologation de la conciliation - 1055 => 1, //Résolution de la conciliation - 1110 => 1, //Ouverture Sauvegarde Financière Accélérée - 1111 => 1, //Ouverture Sauvegarde Accélérée - 1115 => 1, //Plan de Sauvegarde Financière Accélérée - 1116 => 1, //Plan de Sauvegarde Accélérée - 1118 => 1, //Clôture de sauvegarde accélérée - 1119 => 1, //Clôture de sauvegarde financière accélérée - 1120 => 1, //Exécution du plan de sauvegarde - 1203 => 1, //Avis de dépôt de l'état de collocation - 1207 => 1, //Règlements amiables - 1416 => 1, //Jugement constatant la bonne exécution du plan - 1435 => 1, //Suspension de l'exécution provisoire - 1436 => 1, //Suspension provisoire des poursuites - 1500 => 2, //Clôture de la procédure - 1501 => 2, //Clôture de la procédure après cession totale - 1502 => 1, //Clôture de la procédure pour extinction du passif - 1503 => 2, //Clôture de la procédure pour insuffisance d'actif - 1504 => 2, //Clôture sauvegarde pour absence de projet de plan - 1505 => 1, //Appel de jugement - 1506 => 1, //Infirmation Jugement - 1507 => 4, //Extrait d'arrêt de la cour d'appel - 1514 => 1, //Clôture de la procédure de sauvegarde - 1515 => 1, //Arrêt divers - 1517 => 1, //Rectification d'une erreur matérielle - 1520 => 1, //Ordonnance - 1522 => 1, //Clôture de la procédure par dissolution de l'union - 1525 => 4, //Appel du ministère public - 1541 => 1, //Rétractation de prononcé de liquidation judiciaire sur tierce opposition - 1542 => 1, //Rétractation de jugement d'ouverture d'une procédure de sauvegarde sur tierce opposition - 1543 => 1, //Rétractation de jugement d'ouverture d'une procédure de redressement judiciaire sur tierce opposition - 1544 => 1, //Rétractation de jugement d'ouverture d'une procédure de liquidation judiciaire sur tierce opposition - 1545 => 1, //Rétractation de jugement d'ouverture sur tierce opposition - 1550 => 1, //Jugement d'homologation de l'accord - 1645 => 1, //Clôture du Rétablissement Professionnel - 1650 => 1, //Rétablissement Personnel - 1700 => 1, //Décision soumise à publicité - 1800 => 1, //Suppression des mentions relatives à une procédure collective du K-Bis (Art. R123-135) - 1801 => 1, //Clôture de la procédure collective (mention faite au K-Bis, Art. R631-43) - 1900 => 1, //Interdiction temporaire d'exercice de la profession de CAC - 1901 => 1, //Radiation de la liste des CAC -); diff --git a/library/Metier/Graydon/README b/library/Metier/Graydon/README deleted file mode 100755 index 4efa8d37..00000000 --- a/library/Metier/Graydon/README +++ /dev/null @@ -1,77 +0,0 @@ - -Graydon WebService -================== -Get the report, or place an order on a company. - -- Store report in database -- Move the report to an history if a more recent is available - -Identify item that can be interesting for us and our customer. - -a CLI could assemble all items, from the differents partners Graydon, Giant, Interne in order to -create an international database. - -How Graydon works -================= - -http://localhost:9080/CompanyData_webservice/services/SOAPPort_v1_2 - -getCompanyMatchesByAll -getCompanyMatchesByIdentifier -getCompanyMatchesByKeyword -getCompanyMatchesByName -getCompanyMatchesByPostCode - -getCompanyProducts -getCompanyReport - -getCompanyMatchIdentifiers -getCompanyMatchMethods - -getCountryAvailability -- By cli get regurlarly the available product by country (store it in database) - Country - Code - ServiceSpeed - enum { 'Normal', 'Express', 'Superflash', 'Immediate', 'ImmediateWithUpdate', 'Unknown', 'Delayed' } - Level - Type - enum { 'Database', 'Investigation', 'Unknown' } - DaysFrom - DaysTo - CompanyProductIdentifier => use in placeOrder - TypeHtml - TypeXml => is our prefer format - TypePdf - TypeDoc - -getCountryStylesheets - -placeOrder -checkOrders - -getDemoCompanies -ping - -Store report in database -======================== -getCompanyReport -IN => OrderReference - MimeType (html, xml, doc, pdf) -OUT => - - -Orders -====== -placeOrder -IN => ClientReference - CompanyProductIdentifier -OUT => - - - - -XML Data Schema -=============== -http://www.graydon.co.uk/GraydonXMLSchema/xsd/GraydonUKCompanySchema.xsd -http://www.graydon.co.uk/GraydonXMLSchema/documentation/GraydonUKCompanySchema/GraydonUKCompanySchema.html diff --git a/library/Metier/Graydon/Service.php b/library/Metier/Graydon/Service.php deleted file mode 100755 index c9ca446d..00000000 --- a/library/Metier/Graydon/Service.php +++ /dev/null @@ -1,51 +0,0 @@ -_wsdl = __DIR__ . DIRECTORY_SEPARATOR . 'GraydonCompanyData.wsdl'; - - //Set options - $options = array( - 'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS, - 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE, - ); - } - - /** - * - * @return stdClass - */ - protected function _AuthenticationParameters() - { - $params = new stdClass(); - $params->PartnerUserId = $this->PartnerUserId; - $params->PartnerPassword = $this->ParterPassword; - $params->PartnerClientId = ''; - $params->SessionID = ''; - return $params; - } - - /** - * - * @param string $country - */ - public function getCountryAvailability($country = null) - { - $client = $this->getSoapClient(); - - $params = new stdClass(); - $params->Authentication_Parameters = $this->_AuthenticationParameters(); - - if ($country !== null) { - $params->Country = $country; - } - - return $client->getCountryAvailability($params); - } -} diff --git a/library/Metier/Graydon/Wsdl/GraydonCompanyData.wsdl b/library/Metier/Graydon/Wsdl/GraydonCompanyData.wsdl deleted file mode 100755 index 05e804a8..00000000 --- a/library/Metier/Graydon/Wsdl/GraydonCompanyData.wsdl +++ /dev/null @@ -1,1705 +0,0 @@ - - - - - - - - - - All the request parameters for the 'getCompanyMatchesByIdentifier' operation. - - - - - - - - - - - - - All the request parameters for the 'getCompanyMatchesByName' operation. - - - - - - - - Full or partial name of the company to be matched. - - - - - City of the company being matched. Use this if applicable to narrow down the matched list returned. - - - - - - - - All the request parameters for the 'getCompanyMatchesByKeyword' operation. - - - - - - - - Keyword to perform the match with. This should be one or part of one of the words the company name is constituted of. - - - - - The city name of the company to be matched. Use exclusively with the 'Keyword' parameter. - - - - - Postcode of the company being matched. Use exclusively with the 'Keyword' parameter. - - - - - - - All response elements for the 'getCompanyMatch*' operations. - - - - - - - - - Client reference associate with match request. - - - - - - - All the request parameters for the 'getCompanyProducts' operation. - - - - - - - This parameter should be populated with the 'CompanyMatchIdentifier' returned in the 'getCompanyMatches*' operation response. -It is unique to the country matched company. - - - - - - - All the response elements for the 'getCompanyProducts' operation. - - - - - - - - - - - All the response elements for the 'getCompanyReport' operation. - - - - - - The value for this element determines whether 'ReportXML', 'ReportBinary' or 'ReportText' will be populated with the report. -For example if the 'ReportMimeType' value is 'pdf' then the 'ReportBinary' element contains the report. -'ReportMimeType' value is 'xml' then the 'ReportXML' element contains the report. -'ReportMimeType' value is 'html' then the 'ReportText' element contains the report. - - - - - The report as XML elements. The schema the XML relates to depends on individual partner configuration. -The default schema is the 'GraydonUKCompanySchema'. -This will be populated for reports requested with mime type 'xml' - - - - - - - - - - The report as a binary string. This will contain any binary format mime type requested. - - - - - The report as a text string. This will be populated for reports requested with mime type 'htmll'. - - - - - - - - - - - All the request parameters for the 'getCompanyReport' operation. - - - - - - - Language the resulting report should be in. The default is 'E' for English. - - - - - This parameter should be populated with the eqvilant 'OrderReference' element returned in the response for the 'placeOrder' operation. - - - - - The mime type the resulting report should be in. i.e. 'xml', 'html'. - - - - - - - All the request parameters for the 'getCountryAvailability' operation. - - - - - - - Specify the 'Country' parameter to return the available countries and products for a single country. Omit this parameter and all countries and their respective products are returned. - - - - - - - All the response elements for the 'getCompanyReport' operation. - - - - - - - - - - Parameters required for requesting the availability of products for all or a specified country - - - - - - Result of requesting the availability of - products for all or a specified country - - - - - - - - - This is the fault response. It is return if incorrect use of the webservice is detected or 'expected' and 'unexpected' errors are encountered. - - - - - - Unique transaction identifier. This - provides a quick and simple way to refer - to problem or suspect requests/responses - through the web service. - - - - - - The 'FaultType' can be 'expected' or 'unexpected' -'expected' describes errors that are encountered during the normal flow of processing service operations. These should be coded for by the partner. -'unexpected' can relate to connectivity, system or application errors that are not in the normal flow of processing. - - - - - The fault is a unquie identifier for the error encountered. - - - - - A description or stack trace of the error. - - - - - A 'tip' in English on possible solution to rectifying the error. - - - - - - - - All the request parameters for the 'getCompanyMatchesByPostCode' operation. - - - - - - - - Postal code for the company to be matched. This can be partial of full. - - - - - - - - - - - - - - - - - - - - - - - - Details logged on for the webservice request and - response - - - - - - - - - - - - - - - - - - - - - - - - Authentication parameters mandatory for every operation requested - - - - - - Graydon supplied unique client user identifier - - - - - Graydon supplied user identifier related password - - - - - - Partner supplied client identifier. Used for transaction auditing purposes. - - - - - Graydon supplied unique session identifier. For faster and more reliable response implementation of sessions use is recommended. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Standard service response information - - - - - - - Unique transaction identifier. -This provides a quick and simple way to refer to problem or suspect requests/responses through the web service. - - - - - Unique session identifier - - - - - Recorded date and time for receipt of the service request - - - - - Recorded date and time for delivery of the service response. - - - - - Service additional diagnostic information. Help to determine any problems whilst using the service. - - - - - - - - This details all information relating to the country and it's related products. - - - - - Country whose availability is being scrutinised. - - - - - - - - - All the details related to a product. - - - - - - - This is the speed of service available - for the product. This is only supplied - for products that require an agency - investigate of the subject company. - - - - - - The product level relates to the level of data available for this type of product. '1' representing the lowest. - - - - - Type of product this can either be 'Database' which means the report will be built from existing data on the database, -or 'Investigation' which requires a reporter to collate further information on the subject company and add it to the database in order for a report to be built. - - - - - - - - Number of delivery days from. - - - - - - Number of delivery days to. - - - - - This is a unique identifier that should be used to when the subsequent 'placeOrder' operation is used. - - - - - - - - - Standard company match parameters. - - - - - The country to find matches in. - - - - - Client reference relating to this match request. - - - - - - - Details of a subject company. - - - - - - Name of the subject company. - - - - - - - Unique match identifier, supplied to be - used for product availabilty checking. - - - - - - - - - - - Registered address for the subject company - - - - - - Trading address of the subject company - - - - - - - Date the subject company was - incorporated - - - - - - Date the subject company was known since. - - - - - Date for the subject company's annual return. - - - - - Date of the latest accounts held in association to the subject company. - - - - - Date the subject company's accounts were last filed. - - - - - - - - - - - - - - - - - A single or many 'CountryAndProduct' elements. - - - - - - - - - A single or many 'Product' elements. - - - - - - - - - - - Legal form for the subject company. - - - - - - - Unique graydon code used to define legal - form - - - - - - - Local country agency code used to define - legal form - - - - - - - Legal form description - - - - - - - - One or may 'Activity' elements - - - - - - - - - Activity of the subject company - - - - - The type of classification system for which Code is meaningful. Examples include SIC or NACE. - - - - - Activity description code. For example, if the Type is SIC (Standard Industrial Classification), the value for Code will be the company's SIC code. - - - - - The textual description of the Code. For example, if the Type is "NACE" and Code is '6420' the description would be 'A group engaged in the supply of communication products, services and equipment.' - - - - - - - All the response elements for the 'placeOrder' operation. - - - - - - - - - - - All the request parameters for the 'placeOrder' operation. - - - - - - - This parameter is user defined and can be used in conjuction with specific solutions provided by Graydon - - - - - This parameter should be populated with the person who created the order. It is mandatory. -Any future problems encountered due to the order detail can be corresponded through this email address. - - - - - This parameter should be populated with the 'CompanyProductIdentifier' returned in the response for the 'getCompanyProducts' operation. -Each 'Product' element in this response contains one of these elements with a session unique value. - - - - - - - - Order details. - - - - - Language of the ordered report - - - - - Name of the subject company - - - - - Speed of service for the ordered report. - - - - - Country of the subject company. - - - - - - Registered address of the subject - company. - - - - - - Company Identifiers used for the subject company. - - - - - - Partner's credit opinion value for the - subject company. - - - - - - Partner's credit opinion currency for the credit opinion. - - - - - Partner's credit opinion period for the credit opinion. - - - - - Client reference for the order. - - - - - Attention of detail for the order - - - - - Bankers details for the subject company - - - - - Special remarks on the subject company - - - - - - Telephone number for the subject - company. - - - - - - - - - All status and detail for a specific order - - - - - Graydon's unique order reference for this order. - - - - - - The current state of the order i.e. 'Complete' - - - - - The date the order was placed. - - - - - The date the order was completed - - - - - Date the order is due. This is only applicable to investigated orders. - - - - - - - - - - - - - - - - - - - - - - - - - - All the request parameters for the 'ping' operation. - - - - - - - The method to be used to ping the service. - - - - - - - All the response elements for the 'getDemoCompanies' operation. - - - - - - - Use this element to determine what state the service is in. -The possible values are 'ServiceAvailable', 'ServiceNotAvailable' - - - - - Information message in English about the state of the service. - - - - - - - - - All the request parameters for the 'getCompanyMatchIdentifiers' operation. - - - - - - - Specify a 'Country' parameter for an exact response on that country. No 'Country' parameter specified and all online countries and related identifiers are returned. - - - - - - - All the response elements for the 'getCompanyMatchIdentifiers' operation. - - - - - - - - - - - - - - - - - - - All request parameters for the 'checkOrders' operation. - - - - - - - Graydon's unique order reference, supplied when the order was orginally placed. Use when a single order is to be checked. - - - - - - Using this in conjunction with the 'DateFrom', 'DateTo' parameters is optional. Current date is assumed if not supplied. -This determines which state type i.e. 'Completed' the returned orders are in. - - - - - - Use this in conjunction with the - 'OrderState' and 'DateTo' parameters. - - - - - - - - All response elements for the 'checkOrders' operation. - - - - - - - - - - - - - - - - - - - Indentifiers used for the subject company. - - - - - Identifier for the subject company - - - - - Type of identifier for the subject company - - - - - Description in english for the type of identifier for the subject company. This is not required for matching. - - - - - - - One or many Company Identifiers - - - - - - - - - One or more 'OrderStatus' elements - - - - - - - - - - - - All the request parameters for the 'getDemoCompanies' operation. - - - - - - - Specify the 'Country' parameter to return the demostration companies for a single country. Omit this parameter and all countries and their respective demostration companies are returned. - - - - - - - All the response elements for the 'getDemoCompanies' operation. - - - - - - - - - - - - A single or many 'Company' elements. - - - - - - - - Company match identifier contains elements for company identfier per country. - - - - - - - - - - One or many 'CompanyMatchIdentifier' elements. - - - - - - - - - - All the request parameters for the 'getCompanyMatchMethods' operation. - - - - - - - Specify the 'Country' parameter and 'MatchMethods' for a single country will be in the response. No 'Country' parameter specified and 'MatchMethods' for every available online country will be returned. - - - - - - - All the response elements for the 'getCompanyMatchMethods' operation. - - - - - - - - - - - - All the available match methods per country. - - - - - Online country name. - - - - - - - - - - - - A single or many 'CompanyMatchMethod' elements. - - - - - - - - - Descriptive detail of the match method. -If more than one 'MatchMethod' is provided, then their order dictates the usage preference. - - - - - If this element is 'true' then this 'MatchMethod' iteration is to be considered the best match method within its context. - - - - - This is the matching method e.g. 'Keyword', 'Name' etc. - - - - - If 'true' then the 'City' parameter may also be supplied for the match. - - - - - If true then the 'PostCode' parameter may also be supplied for the match. - - - - - A description in English detailing the match methods and any possible idiosyncrasies - - - - - - - - A single or more 'MatchMethod' elements. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A single or many 'MimeType' elements. - - - - - The format of the report e.g. 'xml'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This contains the type of partner element as defined by the partner - - - - - This determines whether the 'Value' parmaeter contains 'Numeric' or 'String' formatted data. - - - - - This is the value of the partner element - - - - - - - - - - - - - - - - - - - - - Specify the 'Country' parameter to return the available countries and products for a single country. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - All the request parameters for the 'getCompanyMatchesByPostCode' operation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get a match for a company by using the appropriate identifier for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'CompanyIdentifier' parameter. -Determine which identifier should be supplied by using the 'getCompanyMatchIdentifiers' operation beforehand, this response with the identifier type used to search in the desired country. -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is a single 'Company' element within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - Get a list of matches for a company by using the company name and city for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Name', 'City' parameter (The last element is optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - Get a list of matches for a company by using the a company name keyword and city/postcode for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Keyword', 'City' and 'PostCode' parameter (Last two elements are optional). -Determine which identifier should be suDetermine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - Get the list of products and their availability for a subject company. Provide the 'CompanyMatchIdentifier' parameter (This is provided on each company match). -The subject company should be identified via a matching operation prior to this operations use. - - - - - - Get the report for your subject company. Provide the 'OrderReference' parameter which was returned when the 'placeOrder' operation was performed. -You can only get a company report once the originating order's state is either 'Completed', 'CompletedwithUpdate' or 'Delivered'. -Determine the order's state using the 'checkOrders' operation. -The 'MimeType' parameter determines which of these are populated with the report 'ReportXML', 'ReportBinary' and 'ReportText'. - - - - - - - Place an order for a report on the subject company. Provide the 'CompanyProductIdentifier' parameter returned from the 'getCompanyProducts'. -The subject company should be have it's product availability checked prior to this operations use. -The response contains a unique 'OrderReference' is returned, to be later used to get the report. -It also the 'OrderState' within the 'OrderStatus' element, use this to determine if the 'getReport' operation can be performed for the order. - - - - - - Get the availability of products and services for a single or all countries. Provide the 'Country' parameter when a single country is desired. -The response contains a single or multiple 'CountryAndProduct' elements which inturn cotains the 'Country' and multiple 'Product' elements with the relevant details. - - - - - - Get a list of matches for a company by using the company's postcode for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Name', 'City' parameter (The last element is optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - This operation can be performed in using two methods "basic" or "complete", as specified in the "PingMethod" parameter for the operation. -The "basic" method is simply to confirm that the 'GraydonCompanyData' web service is available. This could be used to log supposed availability of the service on a periodic basis. -The "complete" method actually performs a check on backend servers and is therefore more comprehensive. You could use this before performing a periodic batch operation, to determine whether it should be run. - - - - - - Get a list of company identifiers for a single or all country. Provide the 'Country' parameter to request identifiers for a single country. -Use this to determine which type of identifier can be used with the 'getCompanyMatchesByIdentifier' method. -The response contains an array of 'CompanyMatchIdentifier', each containing the related 'Country' and the 'CompanyIdentifier' element holding the 'Type' for that country. - - - - - - - Check the status and detail of a single or all order history within a given period. The period can be specified using the 'DateFrom' 'DateTo' parameters, along with the type of order state you wish returned using the 'OrderState' parameter. -A single order can be checked using just the 'OrderReference' parameter. -The response will contains the 'OrdersStatus' element which in turn holds one ore more 'OrderStatus' elements. This will have all the information relating to the order including it's unique 'OrderReference' element. -This can be used to retrieve the related report if the order state is 'completed'. -The maximum number of 'OrderStatus' elements returned is 250. - - - - - - Get the demonstration companies available for a single or all countries. Provide the 'Country' parameter when a single country is desired. -The response contains a single or multiple 'Company' elements which icontains the relevant details for the demonstration company. - - - - - - Get the available matching methods for a single or all countries. Provide the 'Country' parameter if you want methods for a single country and not all. -This helps determine the best search method to implement per country and the availability of additional search criteria such as 'City'. -The response is a single or array of 'CompanyMatchMethods' each contains the related country and an array of available 'MatchMethod' elements. -The order of the 'MatchMethods' elements determines order of preference for searching in that country. - - - - - - - Get the available Graydon XSL stylesheets for a particular country. -The stylesheets can be used to transform Graydon XML into HTML and are useful for determining how the GraydonCompanySchema is structured. - - - - - - - - - - Get a match for a company by using the appropriate identifier for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'CompanyIdentifier' parameter. -Determine which identifier should be supplied by using the 'getCompanyMatchIdentifiers' operation beforehand, this response with the identifier type used to search in the desired country. -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is a single 'Company' element within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - - - - - - - - Get a list of matches for a company by using the company name and city for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Name', 'City' parameter (The last element is optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - - - - - - - - Get a list of matches for a company by using the a company name keyword and city/postcode for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Keyword', 'City' and 'PostCode' parameter (Last two elements are optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - - - - - - - - Get the list of products and their availability for a subject company. Provide the 'CompanyMatchIdentifier' parameter (This is provided on each company match). -The subject company should be identified via a matching operation prior to this operations use. - - - - - - - - - - - - - Get the report for your subject company. Provide the 'OrderReference' parameter which was returned when the 'placeOrder' operation was performed. -You can only get a company report once the originating order's state is either 'Completed', 'CompletedwithUpdate' or 'Delivered'. -Determine the order's state using the 'checkOrders' operation. -The 'MimeType' parameter determines which of these are populated with the report 'ReportXML', 'ReportBinary' and 'ReportText'. - - - - - - - - - - - - - - - Place an order for a report on the subject company. Provide the 'CompanyProductIdentifier' parameter returned from the 'getCompanyProducts'. -The subject company should be have it's product availability checked prior to this operations use. -The response contains a unique 'OrderReference' is returned, to be later used to get the report. -It also the 'OrderState' within the 'OrderStatus' element, use this to determine if the 'getReport' operation can be performed for the order. - - - - - - - - - - - - - Get the availability of products and services for a single or all countries. Provide the 'Country' parameter when a single country is desired. -The response contains a single or multiple 'CountryAndProduct' elements which inturn cotains the 'Country' and multiple 'Product' elements with the relevant details. - - - - - - - - - - - - - - Get a list of matches for a company by using the company's postcode for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Name', 'City' parameter (The last element is optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - - - - - - - - This operation can be performed in using two methods "basic" or "complete", as specified in the "PingMethod" parameter for the operation. -The "basic" method is simply to confirm that the 'GraydonCompanyData' web service is available. This could be used to log supposed availability of the service on a periodic basis. -The "complete" method actually performs a check on backend servers and is therefore more comprehensive. You could use this before performing a periodic batch operation, to determine whether it should be run. - - - - - - - - - - - - - Get a list of company identifiers for a single or all country. Provide the 'Country' parameter to request identifiers for a single country. -Use this to determine which type of identifier can be used with the 'getCompanyMatchesByIdentifier' method. -The response contains an array of 'CompanyMatchIdentifier', each containing the related 'Country' and the 'CompanyIdentifier' element holding the 'Type' for that country. - - - - - - - - - - - - - Check the status and detail of a single or all order history within a given period. The period can be specified using the 'DateFrom' 'DateTo' parameters, along with the type of order state you wish returned using the 'OrderState' parameter. -A single order can be checked using just the 'OrderReference' parameter. -The response will contains the 'OrdersStatus' element which in turn holds one ore more 'OrderStatus' elements. This will have all the information relating to the order including it's unique 'OrderReference' element. -This can be used to retrieve the related report if the order state is 'completed'. -The maximum number of 'OrderStatus' elements returned is 250. - - - - - - - - - - - - - Get the demonstration companies available for a single or all countries. Provide the 'Country' parameter when a single country is desired. -The response contains a single or multiple 'Company' elements which icontains the relevant details for the demonstration company. - - - - - - - - - - - - - Get the available matching methods for a single or all countries. Provide the 'Country' parameter if you want methods for a single country and not all. -This helps determine the best search method to implement per country and the availability of additional search criteria such as 'City'. -The response is a single or array of 'CompanyMatchMethods' each contains the related country and an array of available 'MatchMethod' elements. -The order of the 'MatchMethods' elements determines order of preference for searching in that country. - - - - - - - - - - - - - - - - - - - - - - - - - - Graydon Company Data Webservice. Provides access to millions of companies across many countries. - - - - - diff --git a/library/Metier/Graydon/Wsdl/GraydonUKCommonTypes.xsd b/library/Metier/Graydon/Wsdl/GraydonUKCommonTypes.xsd deleted file mode 100755 index f25478fd..00000000 --- a/library/Metier/Graydon/Wsdl/GraydonUKCommonTypes.xsd +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Unique order reference assigned to the customer for company product ordered - - - - - - - - - - - - - - \ No newline at end of file diff --git a/library/Metier/Graydon/_sample/GraydonCompanyData.wsdl b/library/Metier/Graydon/_sample/GraydonCompanyData.wsdl deleted file mode 100755 index 718757ac..00000000 --- a/library/Metier/Graydon/_sample/GraydonCompanyData.wsdl +++ /dev/null @@ -1,1705 +0,0 @@ - - - - - - - - - - All the request parameters for the 'getCompanyMatchesByIdentifier' operation. - - - - - - - - - - - - - All the request parameters for the 'getCompanyMatchesByName' operation. - - - - - - - - Full or partial name of the company to be matched. - - - - - City of the company being matched. Use this if applicable to narrow down the matched list returned. - - - - - - - - All the request parameters for the 'getCompanyMatchesByKeyword' operation. - - - - - - - - Keyword to perform the match with. This should be one or part of one of the words the company name is constituted of. - - - - - The city name of the company to be matched. Use exclusively with the 'Keyword' parameter. - - - - - Postcode of the company being matched. Use exclusively with the 'Keyword' parameter. - - - - - - - All response elements for the 'getCompanyMatch*' operations. - - - - - - - - - Client reference associate with match request. - - - - - - - All the request parameters for the 'getCompanyProducts' operation. - - - - - - - This parameter should be populated with the 'CompanyMatchIdentifier' returned in the 'getCompanyMatches*' operation response. -It is unique to the country matched company. - - - - - - - All the response elements for the 'getCompanyProducts' operation. - - - - - - - - - - - All the response elements for the 'getCompanyReport' operation. - - - - - - The value for this element determines whether 'ReportXML', 'ReportBinary' or 'ReportText' will be populated with the report. -For example if the 'ReportMimeType' value is 'pdf' then the 'ReportBinary' element contains the report. -'ReportMimeType' value is 'xml' then the 'ReportXML' element contains the report. -'ReportMimeType' value is 'html' then the 'ReportText' element contains the report. - - - - - The report as XML elements. The schema the XML relates to depends on individual partner configuration. -The default schema is the 'GraydonUKCompanySchema'. -This will be populated for reports requested with mime type 'xml' - - - - - - - - - - The report as a binary string. This will contain any binary format mime type requested. - - - - - The report as a text string. This will be populated for reports requested with mime type 'htmll'. - - - - - - - - - - - All the request parameters for the 'getCompanyReport' operation. - - - - - - - Language the resulting report should be in. The default is 'E' for English. - - - - - This parameter should be populated with the eqvilant 'OrderReference' element returned in the response for the 'placeOrder' operation. - - - - - The mime type the resulting report should be in. i.e. 'xml', 'html'. - - - - - - - All the request parameters for the 'getCountryAvailability' operation. - - - - - - - Specify the 'Country' parameter to return the available countries and products for a single country. Omit this parameter and all countries and their respective products are returned. - - - - - - - All the response elements for the 'getCompanyReport' operation. - - - - - - - - - - Parameters required for requesting the availability of products for all or a specified country - - - - - - Result of requesting the availability of - products for all or a specified country - - - - - - - - - This is the fault response. It is return if incorrect use of the webservice is detected or 'expected' and 'unexpected' errors are encountered. - - - - - - Unique transaction identifier. This - provides a quick and simple way to refer - to problem or suspect requests/responses - through the web service. - - - - - - The 'FaultType' can be 'expected' or 'unexpected' -'expected' describes errors that are encountered during the normal flow of processing service operations. These should be coded for by the partner. -'unexpected' can relate to connectivity, system or application errors that are not in the normal flow of processing. - - - - - The fault is a unquie identifier for the error encountered. - - - - - A description or stack trace of the error. - - - - - A 'tip' in English on possible solution to rectifying the error. - - - - - - - - All the request parameters for the 'getCompanyMatchesByPostCode' operation. - - - - - - - - Postal code for the company to be matched. This can be partial of full. - - - - - - - - - - - - - - - - - - - - - - - - Details logged on for the webservice request and - response - - - - - - - - - - - - - - - - - - - - - - - - Authentication parameters mandatory for every operation requested - - - - - - Graydon supplied unique client user identifier - - - - - Graydon supplied user identifier related password - - - - - - Partner supplied client identifier. Used for transaction auditing purposes. - - - - - Graydon supplied unique session identifier. For faster and more reliable response implementation of sessions use is recommended. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Standard service response information - - - - - - - Unique transaction identifier. -This provides a quick and simple way to refer to problem or suspect requests/responses through the web service. - - - - - Unique session identifier - - - - - Recorded date and time for receipt of the service request - - - - - Recorded date and time for delivery of the service response. - - - - - Service additional diagnostic information. Help to determine any problems whilst using the service. - - - - - - - - This details all information relating to the country and it's related products. - - - - - Country whose availability is being scrutinised. - - - - - - - - - All the details related to a product. - - - - - - - This is the speed of service available - for the product. This is only supplied - for products that require an agency - investigate of the subject company. - - - - - - The product level relates to the level of data available for this type of product. '1' representing the lowest. - - - - - Type of product this can either be 'Database' which means the report will be built from existing data on the database, -or 'Investigation' which requires a reporter to collate further information on the subject company and add it to the database in order for a report to be built. - - - - - - - - Number of delivery days from. - - - - - - Number of delivery days to. - - - - - This is a unique identifier that should be used to when the subsequent 'placeOrder' operation is used. - - - - - - - - - Standard company match parameters. - - - - - The country to find matches in. - - - - - Client reference relating to this match request. - - - - - - - Details of a subject company. - - - - - - Name of the subject company. - - - - - - - Unique match identifier, supplied to be - used for product availabilty checking. - - - - - - - - - - - Registered address for the subject company - - - - - - Trading address of the subject company - - - - - - - Date the subject company was - incorporated - - - - - - Date the subject company was known since. - - - - - Date for the subject company's annual return. - - - - - Date of the latest accounts held in association to the subject company. - - - - - Date the subject company's accounts were last filed. - - - - - - - - - - - - - - - - - A single or many 'CountryAndProduct' elements. - - - - - - - - - A single or many 'Product' elements. - - - - - - - - - - - Legal form for the subject company. - - - - - - - Unique graydon code used to define legal - form - - - - - - - Local country agency code used to define - legal form - - - - - - - Legal form description - - - - - - - - One or may 'Activity' elements - - - - - - - - - Activity of the subject company - - - - - The type of classification system for which Code is meaningful. Examples include SIC or NACE. - - - - - Activity description code. For example, if the Type is SIC (Standard Industrial Classification), the value for Code will be the company's SIC code. - - - - - The textual description of the Code. For example, if the Type is "NACE" and Code is '6420' the description would be 'A group engaged in the supply of communication products, services and equipment.' - - - - - - - All the response elements for the 'placeOrder' operation. - - - - - - - - - - - All the request parameters for the 'placeOrder' operation. - - - - - - - This parameter is user defined and can be used in conjuction with specific solutions provided by Graydon - - - - - This parameter should be populated with the person who created the order. It is mandatory. -Any future problems encountered due to the order detail can be corresponded through this email address. - - - - - This parameter should be populated with the 'CompanyProductIdentifier' returned in the response for the 'getCompanyProducts' operation. -Each 'Product' element in this response contains one of these elements with a session unique value. - - - - - - - - Order details. - - - - - Language of the ordered report - - - - - Name of the subject company - - - - - Speed of service for the ordered report. - - - - - Country of the subject company. - - - - - - Registered address of the subject - company. - - - - - - Company Identifiers used for the subject company. - - - - - - Partner's credit opinion value for the - subject company. - - - - - - Partner's credit opinion currency for the credit opinion. - - - - - Partner's credit opinion period for the credit opinion. - - - - - Client reference for the order. - - - - - Attention of detail for the order - - - - - Bankers details for the subject company - - - - - Special remarks on the subject company - - - - - - Telephone number for the subject - company. - - - - - - - - - All status and detail for a specific order - - - - - Graydon's unique order reference for this order. - - - - - - The current state of the order i.e. 'Complete' - - - - - The date the order was placed. - - - - - The date the order was completed - - - - - Date the order is due. This is only applicable to investigated orders. - - - - - - - - - - - - - - - - - - - - - - - - - - All the request parameters for the 'ping' operation. - - - - - - - The method to be used to ping the service. - - - - - - - All the response elements for the 'getDemoCompanies' operation. - - - - - - - Use this element to determine what state the service is in. -The possible values are 'ServiceAvailable', 'ServiceNotAvailable' - - - - - Information message in English about the state of the service. - - - - - - - - - All the request parameters for the 'getCompanyMatchIdentifiers' operation. - - - - - - - Specify a 'Country' parameter for an exact response on that country. No 'Country' parameter specified and all online countries and related identifiers are returned. - - - - - - - All the response elements for the 'getCompanyMatchIdentifiers' operation. - - - - - - - - - - - - - - - - - - - All request parameters for the 'checkOrders' operation. - - - - - - - Graydon's unique order reference, supplied when the order was orginally placed. Use when a single order is to be checked. - - - - - - Using this in conjunction with the 'DateFrom', 'DateTo' parameters is optional. Current date is assumed if not supplied. -This determines which state type i.e. 'Completed' the returned orders are in. - - - - - - Use this in conjunction with the - 'OrderState' and 'DateTo' parameters. - - - - - - - - All response elements for the 'checkOrders' operation. - - - - - - - - - - - - - - - - - - - Indentifiers used for the subject company. - - - - - Identifier for the subject company - - - - - Type of identifier for the subject company - - - - - Description in english for the type of identifier for the subject company. This is not required for matching. - - - - - - - One or many Company Identifiers - - - - - - - - - One or more 'OrderStatus' elements - - - - - - - - - - - - All the request parameters for the 'getDemoCompanies' operation. - - - - - - - Specify the 'Country' parameter to return the demostration companies for a single country. Omit this parameter and all countries and their respective demostration companies are returned. - - - - - - - All the response elements for the 'getDemoCompanies' operation. - - - - - - - - - - - - A single or many 'Company' elements. - - - - - - - - Company match identifier contains elements for company identfier per country. - - - - - - - - - - One or many 'CompanyMatchIdentifier' elements. - - - - - - - - - - All the request parameters for the 'getCompanyMatchMethods' operation. - - - - - - - Specify the 'Country' parameter and 'MatchMethods' for a single country will be in the response. No 'Country' parameter specified and 'MatchMethods' for every available online country will be returned. - - - - - - - All the response elements for the 'getCompanyMatchMethods' operation. - - - - - - - - - - - - All the available match methods per country. - - - - - Online country name. - - - - - - - - - - - - A single or many 'CompanyMatchMethod' elements. - - - - - - - - - Descriptive detail of the match method. -If more than one 'MatchMethod' is provided, then their order dictates the usage preference. - - - - - If this element is 'true' then this 'MatchMethod' iteration is to be considered the best match method within its context. - - - - - This is the matching method e.g. 'Keyword', 'Name' etc. - - - - - If 'true' then the 'City' parameter may also be supplied for the match. - - - - - If true then the 'PostCode' parameter may also be supplied for the match. - - - - - A description in English detailing the match methods and any possible idiosyncrasies - - - - - - - - A single or more 'MatchMethod' elements. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A single or many 'MimeType' elements. - - - - - The format of the report e.g. 'xml'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This contains the type of partner element as defined by the partner - - - - - This determines whether the 'Value' parmaeter contains 'Numeric' or 'String' formatted data. - - - - - This is the value of the partner element - - - - - - - - - - - - - - - - - - - - - Specify the 'Country' parameter to return the available countries and products for a single country. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - All the request parameters for the 'getCompanyMatchesByPostCode' operation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get a match for a company by using the appropriate identifier for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'CompanyIdentifier' parameter. -Determine which identifier should be supplied by using the 'getCompanyMatchIdentifiers' operation beforehand, this response with the identifier type used to search in the desired country. -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is a single 'Company' element within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - Get a list of matches for a company by using the company name and city for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Name', 'City' parameter (The last element is optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - Get a list of matches for a company by using the a company name keyword and city/postcode for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Keyword', 'City' and 'PostCode' parameter (Last two elements are optional). -Determine which identifier should be suDetermine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - Get the list of products and their availability for a subject company. Provide the 'CompanyMatchIdentifier' parameter (This is provided on each company match). -The subject company should be identified via a matching operation prior to this operations use. - - - - - - Get the report for your subject company. Provide the 'OrderReference' parameter which was returned when the 'placeOrder' operation was performed. -You can only get a company report once the originating order's state is either 'Completed', 'CompletedwithUpdate' or 'Delivered'. -Determine the order's state using the 'checkOrders' operation. -The 'MimeType' parameter determines which of these are populated with the report 'ReportXML', 'ReportBinary' and 'ReportText'. - - - - - - - Place an order for a report on the subject company. Provide the 'CompanyProductIdentifier' parameter returned from the 'getCompanyProducts'. -The subject company should be have it's product availability checked prior to this operations use. -The response contains a unique 'OrderReference' is returned, to be later used to get the report. -It also the 'OrderState' within the 'OrderStatus' element, use this to determine if the 'getReport' operation can be performed for the order. - - - - - - Get the availability of products and services for a single or all countries. Provide the 'Country' parameter when a single country is desired. -The response contains a single or multiple 'CountryAndProduct' elements which inturn cotains the 'Country' and multiple 'Product' elements with the relevant details. - - - - - - Get a list of matches for a company by using the company's postcode for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Name', 'City' parameter (The last element is optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - This operation can be performed in using two methods "basic" or "complete", as specified in the "PingMethod" parameter for the operation. -The "basic" method is simply to confirm that the 'GraydonCompanyData' web service is available. This could be used to log supposed availability of the service on a periodic basis. -The "complete" method actually performs a check on backend servers and is therefore more comprehensive. You could use this before performing a periodic batch operation, to determine whether it should be run. - - - - - - Get a list of company identifiers for a single or all country. Provide the 'Country' parameter to request identifiers for a single country. -Use this to determine which type of identifier can be used with the 'getCompanyMatchesByIdentifier' method. -The response contains an array of 'CompanyMatchIdentifier', each containing the related 'Country' and the 'CompanyIdentifier' element holding the 'Type' for that country. - - - - - - - Check the status and detail of a single or all order history within a given period. The period can be specified using the 'DateFrom' 'DateTo' parameters, along with the type of order state you wish returned using the 'OrderState' parameter. -A single order can be checked using just the 'OrderReference' parameter. -The response will contains the 'OrdersStatus' element which in turn holds one ore more 'OrderStatus' elements. This will have all the information relating to the order including it's unique 'OrderReference' element. -This can be used to retrieve the related report if the order state is 'completed'. -The maximum number of 'OrderStatus' elements returned is 250. - - - - - - Get the demonstration companies available for a single or all countries. Provide the 'Country' parameter when a single country is desired. -The response contains a single or multiple 'Company' elements which icontains the relevant details for the demonstration company. - - - - - - Get the available matching methods for a single or all countries. Provide the 'Country' parameter if you want methods for a single country and not all. -This helps determine the best search method to implement per country and the availability of additional search criteria such as 'City'. -The response is a single or array of 'CompanyMatchMethods' each contains the related country and an array of available 'MatchMethod' elements. -The order of the 'MatchMethods' elements determines order of preference for searching in that country. - - - - - - - Get the available Graydon XSL stylesheets for a particular country. -The stylesheets can be used to transform Graydon XML into HTML and are useful for determining how the GraydonCompanySchema is structured. - - - - - - - - - - Get a match for a company by using the appropriate identifier for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'CompanyIdentifier' parameter. -Determine which identifier should be supplied by using the 'getCompanyMatchIdentifiers' operation beforehand, this response with the identifier type used to search in the desired country. -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is a single 'Company' element within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - - - - - - - - Get a list of matches for a company by using the company name and city for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Name', 'City' parameter (The last element is optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - - - - - - - - Get a list of matches for a company by using the a company name keyword and city/postcode for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Keyword', 'City' and 'PostCode' parameter (Last two elements are optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - - - - - - - - Get the list of products and their availability for a subject company. Provide the 'CompanyMatchIdentifier' parameter (This is provided on each company match). -The subject company should be identified via a matching operation prior to this operations use. - - - - - - - - - - - - - Get the report for your subject company. Provide the 'OrderReference' parameter which was returned when the 'placeOrder' operation was performed. -You can only get a company report once the originating order's state is either 'Completed', 'CompletedwithUpdate' or 'Delivered'. -Determine the order's state using the 'checkOrders' operation. -The 'MimeType' parameter determines which of these are populated with the report 'ReportXML', 'ReportBinary' and 'ReportText'. - - - - - - - - - - - - - - - Place an order for a report on the subject company. Provide the 'CompanyProductIdentifier' parameter returned from the 'getCompanyProducts'. -The subject company should be have it's product availability checked prior to this operations use. -The response contains a unique 'OrderReference' is returned, to be later used to get the report. -It also the 'OrderState' within the 'OrderStatus' element, use this to determine if the 'getReport' operation can be performed for the order. - - - - - - - - - - - - - Get the availability of products and services for a single or all countries. Provide the 'Country' parameter when a single country is desired. -The response contains a single or multiple 'CountryAndProduct' elements which inturn cotains the 'Country' and multiple 'Product' elements with the relevant details. - - - - - - - - - - - - - - Get a list of matches for a company by using the company's postcode for the country being matched in. Specify the 'Country' parameter within the 'CompanyMatches_Parameters', also supply the 'Name', 'City' parameter (The last element is optional). -Determine which search method is available and which of these is the best using the 'getCompanyMatchMethods', the response will give you an array of available match methods. -The response is an array of 'Company' elements within the 'CompanyMatches' element, this has all the information on the matched company held in many elements. -If no companies are found to match the given search criteria a 'graydonComanyData_Fault' is thrown containing appropriate error information. - - - - - - - - - - - - - This operation can be performed in using two methods "basic" or "complete", as specified in the "PingMethod" parameter for the operation. -The "basic" method is simply to confirm that the 'GraydonCompanyData' web service is available. This could be used to log supposed availability of the service on a periodic basis. -The "complete" method actually performs a check on backend servers and is therefore more comprehensive. You could use this before performing a periodic batch operation, to determine whether it should be run. - - - - - - - - - - - - - Get a list of company identifiers for a single or all country. Provide the 'Country' parameter to request identifiers for a single country. -Use this to determine which type of identifier can be used with the 'getCompanyMatchesByIdentifier' method. -The response contains an array of 'CompanyMatchIdentifier', each containing the related 'Country' and the 'CompanyIdentifier' element holding the 'Type' for that country. - - - - - - - - - - - - - Check the status and detail of a single or all order history within a given period. The period can be specified using the 'DateFrom' 'DateTo' parameters, along with the type of order state you wish returned using the 'OrderState' parameter. -A single order can be checked using just the 'OrderReference' parameter. -The response will contains the 'OrdersStatus' element which in turn holds one ore more 'OrderStatus' elements. This will have all the information relating to the order including it's unique 'OrderReference' element. -This can be used to retrieve the related report if the order state is 'completed'. -The maximum number of 'OrderStatus' elements returned is 250. - - - - - - - - - - - - - Get the demonstration companies available for a single or all countries. Provide the 'Country' parameter when a single country is desired. -The response contains a single or multiple 'Company' elements which icontains the relevant details for the demonstration company. - - - - - - - - - - - - - Get the available matching methods for a single or all countries. Provide the 'Country' parameter if you want methods for a single country and not all. -This helps determine the best search method to implement per country and the availability of additional search criteria such as 'City'. -The response is a single or array of 'CompanyMatchMethods' each contains the related country and an array of available 'MatchMethod' elements. -The order of the 'MatchMethods' elements determines order of preference for searching in that country. - - - - - - - - - - - - - - - - - - - - - - - - - - Graydon Company Data Webservice. Provides access to millions of companies across many countries. - - - - - diff --git a/library/Metier/Graydon/_sample/Readme.txt b/library/Metier/Graydon/_sample/Readme.txt deleted file mode 100755 index bf610b7d..00000000 --- a/library/Metier/Graydon/_sample/Readme.txt +++ /dev/null @@ -1,33 +0,0 @@ -Graydon UK Web Services -This document explains the PHP scripts used to communicate with the Web Service functions. - -Run Requests: - 1) Install PHP onto the computer. - 2) Add the php root directory to the system PATH. - 3) From the command line run the php scripts passing the correct command line options. - -Examples: - 1) php checkorders.php Delivered 0 " " 2008-10-02 - 2) php getCompanyMatchesByKeyword.php "United Kingdom" Company " " " " - 3) php companyproducts.php "UNITED KINGDOM:National1:GR064240" - -Php version: -5.2.8 - -Web Service: - requests - checkorders: Returns a list of orders that match the search criteria. - - companyproducts: Returns a list of products for a company that match the company match identifier. - - getCompanyMatchesByKeyword: Returns a list of Companies that match the search criteria. - -Command Line Arguments: -All the scripts use command line arguments, the two constant arguments for all scripts is the -username and password. Both the username and password are used by the web service to authenticate -the request. -argument 1 = Username -argument 2 = Password -argument 3 = Function parameters -. = Function parameters -. = Function parameters -. = Function parameters -argument x = Function parameters - diff --git a/library/Metier/Graydon/_sample/checkorders.php b/library/Metier/Graydon/_sample/checkorders.php deleted file mode 100755 index 1d4263a7..00000000 --- a/library/Metier/Graydon/_sample/checkorders.php +++ /dev/null @@ -1,61 +0,0 @@ -. - * The output will consist of a list of the transaction identifier, the user id, the company name - * and a list of the product codes for that company. - * Command line arguments - * 1) Username - * 2) Password - * 3) Order State ( , , , , , ) - * 4) Order Reference - * 5) Client Reference - * 6) Date ( YYYY-MM-DD xsd format ) - */ - // Create a soap client -$client = new SoapClient("GraydonCompanyData.wsdl", array('features' => SOAP_SINGLE_ELEMENT_ARRAYS)); -// Create the authentication parameters object -$authentication = new StdClass(); -// Initialise the authentication parameters -$authentication->PartnerUserId = $argv[1]; -$authentication->PartnerPassword = $argv[2]; -$authentication->PartnerClientId = ''; -$authentication->SessionID = ''; - -// Create a new request parameters object -$request = new StdClass(); -// Initialise the parameters object -$request->Authentication_Parameters = $authentication; -$request->OrderState = $argv[3]; -$request->OrderReference = $argv[4]; -$request->ClientReference = $argv[5]; -$request->DateFrom = $argv[6]; -try { - // Make request to the web service - $result = $client->checkOrders($request); - // Print out the result - print "\nThe Returned data: "; - print "\n * Service Log: "; - print "\n * Transaction Identifier - "; - print $result->Service_Log->TransactionIdentifier; - print "\n * Partner User Id - "; - print $result->Service_Log->PartnerUserId; - print "\n * Orders: "; - // Get the orders returned from the request - $orders = $result->CheckOrders->OrderStatus; - $count = count($orders); - // For each order - for ($i = 0; $i < $count; $i ++) { - // Print out the order details - print "\n *Order: "; - print print $orders[$i]->Order->Name; - print "\n * Order Reference - "; - print $orders[$i]->OrderReference; - print "\n * Order State - "; - print $orders[$i]->OrderState; - } -} catch (SoapFault $exception) { - // Print the exception - print "\n Exception "; - var_dump($exception->detail); -} diff --git a/library/Metier/Graydon/_sample/companyproducts.php b/library/Metier/Graydon/_sample/companyproducts.php deleted file mode 100755 index 418f53fc..00000000 --- a/library/Metier/Graydon/_sample/companyproducts.php +++ /dev/null @@ -1,55 +0,0 @@ -. - * The output will consist of a list of the transaction identifier, the user id, the company name - * and a list of the product codes for that company. - * Command line arguments - * 1) Username - * 2) Password - * 3) Company Match Identifier - */ -// Create a soap client -$client = new SoapClient("GraydonCompanyData.wsdl"); -// Create the authentication parameters object -$authentication = new StdClass(); -// Initialise the authentication parameters -$authentication->PartnerUserId = $argv[1]; -$authentication->PartnerPassword = $argv[2]; -$authentication->PartnerClientId = ''; -$authentication->SessionID = ''; - -// Create the company identifier object -$identifier = $argv[3]; - -// Create the getCompanyProducts parameters object -$parameters = new StdClass(); -// Initialise the parameters -$parameters->Authentication_Parameters = $authentication; -$parameters->CompanyMatchIdentifier = $identifier; -try { - // Make a request on the webservice - $result = $client->getCompanyProducts($parameters); - // Output the xml - print "\nThe Returned data: "; - print "\n * Service Log: "; - print "\n * Transaction Identifier - "; - print $result->Service_Log->TransactionIdentifier; - print "\n * Partner User Id - "; - print $result->Service_Log->PartnerUserId; - print "\n * Company: "; - print $result->Company->Name; - print "\n * Products: "; - $array = $result->Products->Product; - $count = count($array); - // For each Product - for ($i = 0; $i < $count; $i ++) { - // Output the product name - print "\n * Product Code - "; - print $array[$i]->Code; - } -} catch (SoapFault $exception) { - // Print the exception - print "\n Exception "; - var_dump($exception->detail); -} diff --git a/library/Metier/Graydon/_sample/getCompanyMatchesByKeyword.php b/library/Metier/Graydon/_sample/getCompanyMatchesByKeyword.php deleted file mode 100755 index 3332462f..00000000 --- a/library/Metier/Graydon/_sample/getCompanyMatchesByKeyword.php +++ /dev/null @@ -1,64 +0,0 @@ -. - * The output will consist of the transaction identifier, the user id and for each company matching - * to the keyword its name and its CompanyMatchIdentifier. - * Command line arguments - * 1) Username - * 2) Password - * 3) Country - * 4) Keyword - * 5) City - * 6) PostCode - */ - -// Create a soap client -$client = new SoapClient("GraydonCompanyData.wsdl"); -// Create the authentication parameters object -$authentication = new StdClass(); -// Initialise the authentication parameters -$authentication->PartnerUserId = $argv[1]; -$authentication->PartnerPassword = $argv[2]; -$authentication->PartnerClientId = ''; -$authentication->SessionID = ''; - -// Create a new country parameters object -$company = new StdClass(); -// Initialise the country object -$company->Country = $argv[3]; -$company->ClientReference = ''; - -// Create the request parameters -$request = new StdClass(); -// Initialise the request object -$request->Authentication_Parameters = $authentication; -$request->CompanyMatches_Parameters = $company; -$request->Keyword = $argv[4]; -$request->City = $argv[5]; -$request->PostCode = $argv[6]; -try { - // Make a request on the web service - $result = $client->getCompanyMatchesByKeyword($request); - // Print out the result - print "\nThe Returned data: "; - print "\n * Service Log: "; - print "\n * Transaction Identifier - "; - print $result->Service_Log->TransactionIdentifier; - print "\n * Partner User Id - "; - print $result->Service_Log->PartnerUserId; - print "\n * Companies: "; - // Get the list of companies - $companies = $result->CompanyMatches->Company; - $count = count($companies); - for ($i = 0; $i < $count; $i ++) { - print "\n * Company - "; - print $companies[$i]->Name; - print "\n * Company Match Identifier - "; - print $companies[$i]->CompanyMatchIdentifier; - } -} catch (SoapFault $exception) { - // Print the exception - print "\n Exception "; - var_dump($exception->detail); -} diff --git a/library/Metier/Infogreffe/DocAC.php b/library/Metier/Infogreffe/DocAC.php deleted file mode 100755 index 07ca6d2d..00000000 --- a/library/Metier/Infogreffe/DocAC.php +++ /dev/null @@ -1,627 +0,0 @@ -conn = Zend_Registry::get('doctrine'); - } else { - $this->conn = $conn; - } - - // Set type - $this->type_document = 'AC'; - } - - /** - * Défini le SIREN - * @param string $siren - * @return void - */ - public function setSiren($siren) - { - $this->siren = $siren; - } - - /** - * @param $onlyDb - * @return array - */ - public function getList($onlyDb = false) - { - $this->mode_diffusion = 'XL'; - $this->reference_client = 'list-' . $this->siren; - - // Requete WebService - $actesXML = null; - if ($onlyDb === false) { - //Infogreffe webservice - try { - $xml = $this->callRequest(); - $requestOk = true; - } catch (Exception $e) { - $requestOk = false; - //file_put_contents('debug.log', $e->getMessage()); - //@todo : get error message - //echo $e->getMessage(); - } - if ($requestOk === true) { - // Set All line state to 0 - try { - $this->conn->update('jo.greffes_actes', - array('actif' => 0), array('siren' => $this->siren)); - } catch (\Doctrine\DBAL\DBALException $e) { - } - $actesXML = $this->formatList($xml); - } - } - - // Lecture de la base de données - $columns = array( - 'siren', - 'numRC', - 'LPAD(numGreffe,4,0) AS numGreffe', - 'pdfLink', - 'pdfSize', - 'pdfPage', - 'num_depot', - 'date_depot', - 'date_acte', - 'LPAD(num_acte,2,0) AS num_acte', - 'type_acte', - 'type_acte_libelle', - 'nbpages_acte', - 'decision_nature', - 'decision_libelle', - 'mode_diffusion', - ); - try { - $qb = $this->conn->createQueryBuilder(); - $qb->select($columns)->from('jo.greffes_actes') - ->where('siren=:siren')->setParameter('siren', $this->siren)->andWhere('actif=1') - ->orderBy('date_depot', 'DESC')->orderBy('num_depot', 'DESC') - ->orderBy('num_acte', 'ASC')->orderBy('date_acte', 'DESC'); - $stmt = $qb->execute(); - } catch (\Doctrine\DBAL\DBALException $e) { - throw new Exception(__METHOD__ . ': ' . $e->getMessage()); - } - - $actes = array(); - if ($stmt->rowCount() > 0) { - $rows = $stmt->fetchAll(\PDO::FETCH_OBJ); - foreach ($rows as $row) { - $item = new stdClass(); - $item->File = $row->pdfLink; - $item->FileSize = $row->pdfSize; - $item->FileNumberOfPages = $row->pdfPage; - $item->DepotNum = $row->num_depot; - $item->DepotDate = $row->date_depot; - $item->ActeNum = $row->num_acte; - $item->ActeDate = $row->date_acte; - $item->ActeNumberOfPages = $row->nbpages_acte; - $item->ActeType = $row->type_acte; - $item->ActeTypeLabel = $row->type_acte_libelle; - $item->ActeDecisionNature = $row->decision_nature; - $item->ActeDecisionLabel = $row->decision_libelle; - - $decisions = $row->decision_nature; - if (!empty($row->decision_nature) && !empty($row->decision_libelle)) { - $decisions.= ' : '; - } - $decisions.= $row->decision_libelle; - - $item->infos[] = $decisions; - - $mode_diffusion = explode(',', $row->mode_diffusion); - if (in_array('T', $mode_diffusion) || !empty($item->File)) { - $item->ModeDiffusion = 'T'; - } elseif (in_array('C', $mode_diffusion)) { - $item->ModeDiffusion = 'C'; - } else { - $item->ModeDiffusion = ''; - } - - $actes[] = $item; - } - } - - return $actes; - } - - /** - * Commande Téléchargement - * @param string $depotDate - * @param int $depotNum - * @param string $acteType - * @param string $acteDate - * @param int $acteNum - * @param int $orderId - * @throws Exception - * @return string - * Return the full path of the file - */ - public function getCommandeT($depotDate, $depotNum, $acteType, $acteDate, $acteNum, $orderId = null) - { - // Lire dans la base de données - $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(); - - if ($stmt->rowCount() == 0) { - throw new Exception('Not exist'); - } - - $row = $stmt->fetch(\PDO::FETCH_OBJ); - - $this->mode_diffusion = 'T'; - $this->reference_client = 'T'.date('YmdHis'); - $this->greffe = $row->numGreffe; - $this->dossier_millesime = substr($row->numRC, 0, 2); - $this->dossier_statut = substr($row->numRC, 2, 1); - $this->dossier_chrono = substr($row->numRC, 3); - $this->date_depot = $row->date_depot; - $this->num_depot = $row->num_depot; - $this->date_acte = $row->date_acte; - $this->num = $row->num_acte; - - //Needed element for filename - $date = $row->date_acte; - if ($date == '0000-00-00') { - $date = $row->date_depot; - } - $type = $row->type_acte; - $num = $row->num_acte; - $options = $row->numGreffe . '-' . substr($row->numRC, 0, 2) . '-' . substr($row->numRC, 2, 1) . '-' . substr($row->numRC, 3) . '-' . $row->num_depot; - - $dir = $this->getFilePath($date); - if (! file_exists($this->config->storage->path . '/' . $dir)) { - mkdir($this->config->storage->path . '/' . $dir, 0777, true); - } - - // Set filename - $filename = $dir . '/' . $this->getFileName($date, $num, $type, $options); - - if ($row->pdfLink != '') { - - // Set the filename - $filename = $dir . '/' . $row->pdfLink; - - // Check if filename exist - if (!file_exists($this->config->storage->path . '/' . $filename)) { - throw new Exception('File not found', self::INT); - } - } elseif (file_exists($this->config->storage->path . '/' . $filename)) { - - // Analyser le fichier - Nombre de page et taille - $infos = $this->pdfInfos($this->config->storage->path . '/' . $filename); - - // Enregistrer les infos du fichier dans la base de données - if (false !== $infos) { - $this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']); - } else { - $this->dbSetFile(basename($filename)); - } - } else { - try { - $xml = $this->callRequest(); - } catch (Exception $e) { - throw new Exception($e->getMessage(), $e->getCode()); - } - - $acte = $this->formatItem($xml); - $url = $acte['actes'][0]['url_acces']; - if (empty($url)) { - throw new Exception('File url not given'); - } - - if ($orderId !== null) { - $this->conn->update('sdv1.greffe_commandes_ac', array( - 'cmdUrl' => $url, - 'dateCommande' => date('YmdHis')), - array('id' => $orderId)); - } - - // Récupérer le fichier - $getfile = $this->download($url, $filename); - - // Analyser le fichier - Nombre de page et taille - $infos = $this->pdfInfos($getfile); - - // Enregistrer les infos du fichier dans la base de données - if (false !== $infos) { - $this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']); - } else { - $this->dbSetFile(basename($filename)); - } - } - - return $filename; - } - - /** - * Commande courrier - * @param string $depotDate - * @param int $depotNum - * @param string $acteType - * @param string $acteDate - * @param int $acteNum - * @param string $reference - * @throws Exception - * @return boolean - */ - public function getCommandeC($depotDate, $depotNum, $acteType, $acteDate, $acteNum, $reference = '') - { - // Lire dans la base de données - $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(); - - if ($stmt->rowCount() == 0) { - throw new Exception('Not exist'); - } - - $this->mode_diffusion = 'C'; - $this->reference_client = $reference; - - $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->dossier_millesime = substr($row->numRC, 0, 2); - $this->dossier_statut = substr($row->numRC, 2, 1); - $this->dossier_chrono = substr($row->numRC, 3); - $this->num_depot = $row->num_depot; - $this->type_acte = $row->type_acte; - $this->date_acte = $row->date_acte; - $this->num = $row->num_acte; - - // Faire la requete - try { - $xml = $this->callRequest(); - } catch (Exception $e) { - // La prise en charge du courrier est effective - if ($e->getCode() != 17) { - throw new Exception($e->getMessage()); - } - } - - return true; - } - - /** - * - * @param string $date - * Date de l'acte au format AAAA-MM-JJ - * @param string $num - * Numéro de l'acte - * @param string $type - * Type de l'acte - * @param string $options - * (Numéro du Greffe)-(dossier_millesime)-(dossier_statut)-(dossier_chrono)-(num_depot) - * @return string - */ - public function getFileName($date, $num, $type, $options) - { - $date = substr($date, 0, 4) . substr($date, 5, 2) . substr($date, 8, 2); - return 'acte-' . $this->siren . '-' . $type . '-' . $date . '-' . $options . '-' . $num . '.pdf'; - } - - /** - * - * @param string $date - * Date de l'acte au format AAAA-MM-JJ - * @return string - */ - public function getFilePath($date) - { - return 'actes/' . substr($date, 0, 4) . '/' . substr($date, 5, 2); - } - - /** - * Format XML to Array for a list of items - * @param string $xml - * @return array - */ - protected function formatList($xml) - { - $doc = new DOMDocument(); - $doc->loadXML($xml); - - $liste_depot_acte = $doc->getElementsByTagName('liste_depot_acte')->item(0); - $depot_actes = $liste_depot_acte->getElementsByTagName('depot_acte'); - $actes = array(); - foreach ($depot_actes as $depot_acte) { - $acte = array(); - - $acte['num_gest'] = array(); - $num_gest = $depot_acte->getElementsByTagName('num_gest')->item(0); - $acte['num_gest']['greffe'] = $num_gest->getElementsByTagName('greffe')->item(0)->nodeValue; - $acte['num_gest']['dossier_millesime'] = $num_gest->getElementsByTagName('dossier_millesime')->item(0)->nodeValue; - $acte['num_gest']['dossier_statut'] = $num_gest->getElementsByTagName('dossier_statut')->item(0)->nodeValue; - $acte['num_gest']['dossier_chrono'] = $num_gest->getElementsByTagName('dossier_chrono')->item(0)->nodeValue; - - $acte['num_siren'] = $depot_acte->getElementsByTagName('num_siren')->item(0)->nodeValue; - $acte['num_depot'] = $depot_acte->getElementsByTagName('num_depot')->item(0)->nodeValue; - $acte['date_depot'] = $depot_acte->getElementsByTagName('date_depot')->item(0)->nodeValue; - - $infoActes = $depot_acte->getElementsByTagName('acte'); - $acte['depot'] = array(); - foreach ($infoActes as $infoActe) { - $actenum = array(); - $actenum['date_acte'] = $infoActe->getElementsByTagName('date_acte')->item(0)->nodeValue; - if ($infoActe->getElementsByTagName('date_acte')->item(0)->nodeValue == '') { - $actenum['date_acte'] = '0000-00-00'; - } - $actenum['num_acte'] = $infoActe->getElementsByTagName('num_acte')->item(0)->nodeValue; - $actenum['type_acte'] = $infoActe->getElementsByTagName('type_acte')->item(0)->nodeValue; - $actenum['type_acte_libelle'] = $infoActe->getElementsByTagName('type_acte_libelle')->item(0)->nodeValue; - $actenum['nbpages_acte'] = $infoActe->getElementsByTagName('nbpages_acte')->item(0)->nodeValue; - $decision = $infoActe->getElementsByTagName('decision')->item(0); - if ($decision) { - $actenum['decision'] = array(); - $actenum['decision']['nature'] = $decision->getElementsByTagName('nature')->item(0)->nodeValue; - $actenum['decision']['libelle'] = $decision->getElementsByTagName('libelle')->item(0)->nodeValue; - } - - $actenum['mode_diffusion'] = array(); - $mode_diffusion = $infoActe->getElementsByTagName('mode_diffusion')->item(0)->getElementsByTagName('mode'); - foreach ($mode_diffusion as $mode) { - $actenum['mode_diffusion'][] = $mode->getAttribute('type'); - } - $acte['depot'][] = $actenum; - } - //Fin listes des infos acte - - //Enregistrer dans la bdd - $this->dbUpdateItem($acte); - - //Génération de l'index pour le tri - if (!empty($acte['date_depot'])) { - $date = $acte['date_depot']; - } else { - $date = ''; - } - - if (!empty($date)) { - $datef = substr($date, 0, 4).substr($date, 5, 2).substr($date, 8, 2); - $key = $datef.'-'.$acte['num_depot']; - //Affectation liste générale avec un index permettant le tri - $actes[$key] = $acte; - } - //Prise en compte de l'acte -1 - if ($acte['num_depot']==-1) { - $actes[0] = $acte; - } - } - - //Tri suivant la date d'acte ou de depot - krsort($actes); - return $actes; - } - - /** - * Format XML to Array for one item - * @param string $xml - * @return array - */ - protected function formatItem($xml) - { - $doc = new DOMDocument(); - $doc->loadXML($xml); - - $depot_acte = $doc->getElementsByTagName('depot_acte')->item(0); - - $info = array(); - $info['num_gest'] = array(); - - $num_gest = $depot_acte->getElementsByTagName('num_gest')->item(0); - - $info['num_gest']['greffe'] = $num_gest->getElementsByTagName('greffe')->item(0)->nodeValue; - $info['num_gest']['dossier_millesime'] = $num_gest->getElementsByTagName('dossier_millesime')->item(0)->nodeValue; - $info['num_gest']['dossier_statut'] = $num_gest->getElementsByTagName('dossier_statut')->item(0)->nodeValue; - $info['num_gest']['dossier_chrono'] = $num_gest->getElementsByTagName('dossier_chrono')->item(0)->nodeValue; - - $info['num_siren'] = $depot_acte->getElementsByTagName('num_siren')->item(0)->nodeValue; - $info['num_depot'] = $depot_acte->getElementsByTagName('num_depot')->item(0)->nodeValue; - $info['date_depot'] = $depot_acte->getElementsByTagName('date_depot')->item(0)->nodeValue; - - $infoActes = $depot_acte->getElementsByTagName('acte'); - $info['actes'] = array(); - foreach ($infoActes as $infoActe) { - $actenum = array(); - $actenum['date_acte'] = $infoActe->getElementsByTagName('date_acte')->item(0)->nodeValue; - $actenum['num_acte'] = $infoActe->getElementsByTagName('num_acte')->item(0)->nodeValue; - $actenum['type_acte'] = $infoActe->getElementsByTagName('type_acte')->item(0)->nodeValue; - $actenum['type_acte_libelle'] = $infoActe->getElementsByTagName('type_acte_libelle')->item(0)->nodeValue; - $actenum['nbpages_acte'] = $infoActe->getElementsByTagName('nbpages_acte')->item(0)->nodeValue; - - $decision = $infoActe->getElementsByTagName('decision')->item(0); - if ($decision) { - $actenum['decision'] = array(); - $actenum['decision']['nature'] = $decision->getElementsByTagName('nature')->item(0)->nodeValue; - $actenum['decision']['libelle'] = $decision->getElementsByTagName('libelle')->item(0)->nodeValue; - } - $actenum['url_acces'] = htmlspecialchars_decode($infoActe->getElementsByTagName('url_acces')->item(0)->nodeValue); - $info['actes'][] = $actenum; - } - return $info; - } - - - /** - * Update informations about an item in database - * @param array $list - */ - protected function dbUpdateItem($list) - { - foreach ($list['depot'] as $depot) { - $data = array( - 'siren' => $list['num_siren'], - 'numRC' => $list['num_gest']['dossier_millesime']. - $list['num_gest']['dossier_statut'].$list['num_gest']['dossier_chrono'], - 'numGreffe' => $list['num_gest']['greffe'], - 'num_depot' => $list['num_depot'], - 'date_depot' => $list['date_depot'], - 'date_acte' => $depot['date_acte'], - 'num_acte' => $depot['num_acte'], - 'type_acte' => $depot['type_acte'], - 'type_acte_libelle' => $depot['type_acte_libelle'], - 'nbpages_acte' => $depot['nbpages_acte'], - 'decision_nature' => empty($depot['decision']['nature']) ? '' : $depot['decision']['nature'] , - 'decision_libelle' => empty($depot['decision']['libelle']) ? '' : $depot['decision']['libelle'] , - 'mode_diffusion' => join(',', $depot['mode_diffusion']), - 'actif' => 1, - ); - - try { - $sql = "SELECT * FROM jo.greffes_actes - WHERE siren=:siren AND num_depot=:depotNum AND date_depot=:depotDate - AND num_acte=:acteNum ORDER BY dateInsert"; - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('siren', $this->siren); - $stmt->bindValue('depotNum', intval($list['num_depot'])); - $stmt->bindValue('depotDate', $list['date_depot']); - $stmt->bindValue('acteNum', intval($depot['num_acte'])); - $stmt->execute(); - // Insert - if ($stmt->rowCount() == 0) { - $data['dateInsert'] = date('YmdHis'); - try { - $result = $this->conn->insert('jo.greffes_actes', $data); - } catch (\Doctrine\DBAL\DBALException $e) { - throw new Exception($e->getMessage()); - } - } - // Update - 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_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; - } - - /** - * Set file informations in database - * @param string $filename - * @param int $size - * @param int $numberOfPage - * @param string $version - * @return boolean - */ - protected function dbSetFile($filename, $size = 0, $numberOfPage = '', $version = '') - { - $data = array( - 'pdfLink' => $filename, - 'pdfSize' => $size, - 'pdfPage' => $numberOfPage, - 'pdfVer' => $version, - 'pdfDate' => date('Ymd'), - ); - - $identifier = array( - 'siren' => $this->siren, - 'num_depot' => $this->num_depot, - 'date_depot' => $this->date_depot, - 'date_acte' => $this->date_acte, - 'num_acte' => $this->num, - ); - - try { - $result = $this->conn->update('jo.greffes_actes', $data, $identifier); - } catch (\Doctrine\DBAL\DBALException $e) { - throw new Exception($e->getMessage()); - } - - if ($result) { - return true; - } - - return false; - } -} diff --git a/library/Metier/Infogreffe/DocBI.php b/library/Metier/Infogreffe/DocBI.php deleted file mode 100755 index f4961d77..00000000 --- a/library/Metier/Infogreffe/DocBI.php +++ /dev/null @@ -1,584 +0,0 @@ -conn = Zend_Registry::get('doctrine'); - } 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; - } - - /** - * - * @param $onlyDb - * @return array - */ - public function getList($onlyDb = false) - { - $this->mode_diffusion = 'XL'; - $this->reference_client = 'list-' . $this->siren; - - // Requete WebService - $bilansXML = null; - if ($onlyDb === false) { - // Infogreffe webservice - try { - $xml = $this->callRequest(); - $requestOk = true; - } catch (Exception $e) { - $requestOk = false; - // @todo : get error message - } - if ($requestOk === true) { - // Set All line state to 0 - try { - $this->conn->update('jo.greffes_bilans', - array('actif' => 0), array('siren' => $this->siren)); - } catch (\Doctrine\DBAL\DBALException $e) { - } - $bilansXML = $this->formatList($xml); - } - } - - // Lecture de la base de données - $columns = array( - 'siren', - 'numRC', - 'LPAD(numGreffe,4,0) AS numGreffe', - 'pdfLink', - 'pdfSize', - 'pdfPage', - 'millesime', - 'num_depot', - 'date_cloture', - 'type_comptes', - 'mode_diffusion', - 'duree_exercice', - 'saisie_date', - 'saisie_code', - 'pages', - ); - try { - $qb = $this->conn->createQueryBuilder(); - $qb->select($columns)->from('jo.greffes_bilans') - ->where('siren=:siren')->setParameter('siren', $this->siren)->andWhere('actif=1') - ->orderBy('date_cloture', 'DESC')->orderBy('num_depot', 'DESC') - ->orderBy('date_cloture', 'DESC'); - $stmt = $qb->execute(); - } catch (\Doctrine\DBAL\DBALException $e) { - throw new Exception(__METHOD__ . ': ' . $e->getMessage()); - } - - $bilans = array(); - if ($stmt->rowCount() > 0) { - $rows = $stmt->fetchAll(\PDO::FETCH_OBJ); - foreach ($rows as $row) { - $item = new stdClass(); - $item->File = $row->pdfLink; - $item->FileSize = $row->pdfSize; - $item->NumberOfPages = $row->pdfPage; - $item->Millesime = $row->millesime; - $item->NumDepot = $row->num_depot; - $item->DateCloture = $row->date_cloture; - if (empty($row->type_comptes)) { - $item->Type = 'sociaux'; - } else { - $item->Type = $row->type_comptes; - } - $mode_diffusion = explode(',', $row->mode_diffusion); - - if (in_array('T', $mode_diffusion) || !empty($item->File)) { - $item->ModeDiffusion = 'T'; - } elseif (in_array('C', $mode_diffusion)) { - $item->ModeDiffusion = 'C'; - } else { - $item->ModeDiffusion = ''; - } - $item->DureeExercice = $row->duree_exercice; - - /** - * Following data are not as expected as the type and other data could change - * Only num depot don't change. - */ - $item->SaisieDate = $row->saisie_date; - $item->SaisieCode = $row->saisie_code; - switch ($row->saisie_code) { - case '00': $item->SaisieLabel = "Bilan saisi sans anomalie"; break; - case '01': $item->SaisieLabel = "Bilan saisi avec des incohérences comptables à la source du document (issues du remettant)"; break; - case '02': $item->SaisieLabel = "Bilan avec Actif, Passif ou Compte de Résultat nul"; break; - case '03': $item->SaisieLabel = "Bilan incomplet (des pages manquent)"; break; - case '04': $item->SaisieLabel = "Bilan complet non détaillé (seuls les totaux et sous totaux sont renseignés)"; break; - case '05': $item->SaisieLabel = "Bilan reçu en double exemplaire"; break; - case '06': $item->SaisieLabel = "Bilan intermédiaire - Situation provisoire"; break; - case '07': $item->SaisieLabel = "Bilan illisible"; break; - case 'A7': $item->SaisieLabel = "Bilan illisible, présentant un cadre gris très foncés (dans lesquels sont inscrits en général les totaux)"; break; - case 'B7': $item->SaisieLabel = "Bilan manuscrits"; break; - case 'C7': $item->SaisieLabel = "Bilan illisible, présentant des caractères trop gras"; break; - case 'D7': $item->SaisieLabel = "Bilan scanné en biais ou qui présentent des pages rognées"; break; - case 'E7': $item->SaisieLabel = "Bilan numérisés trop clairement (comme une imprimante dont la cartouche est presque vide)"; break; - case 'F7': $item->SaisieLabel = "Bilan illisible"; break; - case '08': $item->SaisieLabel = "Bilan consolidé"; break; - case '09': $item->SaisieLabel = "Déclaration d'impôts"; break; - case '10': $item->SaisieLabel = "Document autre que bilan"; break; - case '11': $item->SaisieLabel = "Bilan de clôture de liquidation"; break; - case '12': $item->SaisieLabel = "Bilan de Société financière"; break; - case '13': $item->SaisieLabel = "Bilan de Société d'assurance"; break; - case '14': $item->SaisieLabel = "Bilan de Société immobilière"; break; - case '15': $item->SaisieLabel = "Bilan de Société étrangère"; break; - default: $item->SaisieLabel = ""; break; - } - $bilans[] = $item; - } - } - - return $bilans; - } - - - /** - * Download file - * @param string $dateCloture - * Format AAAA-MM-DD - * @param string $type - * sociaux ou consolides - * @params int $orderId - * Id de commande pour l'enregistrement dans la table de gestion - * @throws Exception - * @return string - * Return path (not complete) and filename - */ - public function getCommandeT($dateCloture = null, $type = 'sociaux', $orderId = null) - { - // Lire dans la base de données - $columns = array( - 'siren', - 'numRC', - 'LPAD(numGreffe,4,0) AS numGreffe', - 'pdfLink', - 'millesime', - 'num_depot', - 'date_cloture', - 'type_comptes', - ); - $qb = $this->conn->createQueryBuilder(); - $qb->select($columns)->from('jo.greffes_bilans') - ->where('siren=:siren')->setParameter('siren', $this->siren) - ->andWhere('date_cloture=:date')->setParameter('date', $dateCloture); - if ($type == 'sociaux' || $type == '') { - $qb->andWhere("(type_comptes='sociaux' OR type_comptes='')"); - } else { - $qb->andWhere('type_comptes=:type')->setParameter('type', $type); - } - $qb->orderBy('dateInsert', 'DESC')->orderBy('num_depot', 'DESC'); - $stmt = $qb->execute(); - - if ($stmt->rowCount() == 0) { - throw new Exception("Element doesn't exist"); - } - - $row = $stmt->fetch(\PDO::FETCH_OBJ); - - $this->mode_diffusion = 'T'; - $this->reference_client = 'T'.date('YmdHis'); - $this->greffe = $row->numGreffe; - $this->dossier_millesime = substr($row->numRC, 0, 2); - $this->dossier_statut = substr($row->numRC, 2, 1); - $this->dossier_chrono = substr($row->numRC, 3); - $this->num_depot = $row->num_depot; - $this->date_cloture = $row->date_cloture; - $this->type_comptes = $row->type_comptes; - - $dir = $this->getFilePath($type, $dateCloture); - if (! file_exists($this->config->storage->path . '/' . $dir)) { - mkdir($this->config->storage->path . '/' . $dir, 0777, true); - } - - //Set the filename - $filename = $dir . '/' . $this->getFileName($type, $dateCloture); - - if ($row->pdfLink != '') { - - //Check if filename exist - if (! file_exists($this->config->storage->path . '/' . $filename)) { - throw new Exception('File not found', self::INT); - } - } elseif (file_exists($this->config->storage->path . '/' . $filename)) { - - //Analyser le fichier - Nombre de page et taille - $infos = $this->pdfInfos($this->config->storage->path . '/' . $filename); - - //Enregistrer les infos du fichier dans la base de données - if (false !== $infos) { - $this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']); - } else { - $this->dbSetFile(basename($filename)); - } - } else { - try { - $xml = $this->callRequest(); - } catch (Exception $e) { - throw new Exception($e->getMessage(), $e->getCode()); - } - - $bilan = $this->formatItem($xml); - $url = $bilan['url_acces']; - if (empty($url)) { - throw new Exception('File url not given'); - } - - if ($orderId !== null) { - $this->conn->update('sdv1.greffe_commandes_bi', array( - 'cmdUrl' => $url, - 'dateCommande' => date('YmdHis')), - array('id' => $orderId)); - } - - //Récupérer le fichier - $getfile = $this->download($url, $filename); - - //Analyser le fichier - Nombre de page et taille - $infos = $this->pdfInfos($getfile); - - //Enregistrer les infos du fichier dans la base de données - if (false !== $infos) { - $this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']); - } else { - $this->dbSetFile(basename($filename)); - } - } - - return $filename; - } - - /** - * @todo : Vérifier fonctionnement - * @param string $dateCloture - * @param string $type - * @param string $reference - * @throws Exception - * @return boolean - */ - public function getCommandeC($dateCloture = null, $type = 'sociaux', $reference = '') - { - $this->mode_diffusion = 'C'; - - // Lire dans la base de données - $columns = array( - 'siren', - 'numRC', - 'LPAD(numGreffe,4,0) AS numGreffe', - 'pdfLink', - 'millesime', - 'num_depot', - 'date_cloture', - 'type_comptes', - ); - $qb = $this->conn->createQueryBuilder(); - $qb->select($columns)->from('jo.greffes_bilans') - ->where('siren=:siren')->setParameter('siren', $this->siren) - ->andWhere('date_cloture=:date')->setParameter('date', $dateCloture); - if ($type == 'sociaux') { - $qb->andWhere("(type_comptes='sociaux' OR type_comptes='')"); - } else { - $qb->andWhere('type_comptes=:type')->setParameter('type', $type); - } - $stmt = $qb->execute(); - - if ($stmt->rowCount() == 0) { - throw new Exception('Not exist'); - } - - $this->reference_client = $reference; - - $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->dossier_millesime = substr($row->numRC, 0, 2); - $this->dossier_statut = substr($row->numRC, 2, 1); - $this->dossier_chrono = substr($row->numRC, 3); - $this->num_depot = $row->num_depot; - $this->date_cloture = $row->date_cloture; - - //Faire la requete - try { - $xml = $this->callRequest(); - } catch (Exception $e) { - //La prise en charge du courrier est effective - if ($e->getCode() != 17) { - throw new Exception($e->getMessage()); - } - } - - return true; - } - - /** - * Name of file - * @param string $type - * @param string $dateCloture - * Format : AAAA-MM-JJ - * @return string - */ - public function getFileName($type, $dateCloture) - { - if ($type == '') { - $type = 'sociaux'; - } - $date = substr($dateCloture, 0, 4).substr($dateCloture, 5, 2).substr($dateCloture, 8, 2); - - return 'bilan-' . $this->siren . '-' . $type . '-' . $date . '.pdf'; - } - - /** - * Path of file - * @param string $type - * @param string $dateCloture - * Format : AAAA-MM-JJ - * @return string - */ - public function getFilePath($type, $dateCloture) - { - if ($type == '') { - $type = 'sociaux'; - } - return 'bilans' . '/' . $type . '/' . substr($dateCloture, 0, 4); - } - - /** - * Format XML to Array for a list of items - * @param string $xml - * @return array - */ - protected function formatList($xml) - { - //Parse XML to make an array - $doc = new DOMDocument(); - $doc->loadXML($xml); - $liste_bilan_complet = $doc->getElementsByTagName('liste_bilan_complet')->item(0); - $bilan_complet = $liste_bilan_complet->getElementsByTagName('bilan_complet'); - - $bilans = array(); - if (count($bilan_complet) > 0) { - foreach ($bilan_complet as $element) { - $bilan = array(); - $num_gest = $element->getElementsByTagName('num_gest')->item(0); - $bilan['num_gest']['greffe'] = $num_gest->getElementsByTagName('greffe')->item(0)->nodeValue; - $bilan['num_gest']['dossier_millesime'] = $num_gest->getElementsByTagName('dossier_millesime')->item(0)->nodeValue; - $bilan['num_gest']['dossier_statut'] = $num_gest->getElementsByTagName('dossier_statut')->item(0)->nodeValue; - $bilan['num_gest']['dossier_chrono'] = $num_gest->getElementsByTagName('dossier_chrono')->item(0)->nodeValue; - $bilan['dossier_millesime'] = $num_gest->getElementsByTagName('dossier_millesime')->item(0)->nodeValue; - $bilan['dossier_statut'] = $num_gest->getElementsByTagName('dossier_statut')->item(0)->nodeValue; - $bilan['dossier_chrono'] = $num_gest->getElementsByTagName('dossier_chrono')->item(0)->nodeValue; - $bilan['num_siren'] = $element->getElementsByTagName('num_siren')->item(0)->nodeValue; - $bilan['date_cloture'] = $element->getElementsByTagName('date_cloture')->item(0)->nodeValue; - $bilan['date_cloture_iso'] = $element->getElementsByTagName('date_cloture_iso')->item(0)->nodeValue; - $bilan['millesime'] = $element->getElementsByTagName('millesime')->item(0)->nodeValue; - $bilan['num_depot'] = $element->getElementsByTagName('num_depot')->item(0)->nodeValue; - $bilan['type_comptes'] = $element->getElementsByTagName('type_comptes')->item(0)->nodeValue; - $mode_diffusion = $element->getElementsByTagName('mode_diffusion')->item(0)->getElementsByTagName('mode'); - foreach ($mode_diffusion as $mode) { - $bilan['mode_diffusion'][] = $mode->getAttribute('type'); - } - - //Enregistrer dans la bdd - $this->dbUpdateItem($bilan); - - //Génération de l'index pour le tri - $date = $bilan['date_cloture_iso']; - if (!empty($date)) { - $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 - $bilans[$key] = $bilan; - } - } - } - krsort($bilans); - return $bilans; - } - - /** - * Format XML to Array for one item - * @param string $xml - * @return array - */ - protected function formatItem($xml) - { - $doc = new DOMDocument(); - $doc->loadXML($xml); - $bilan_complet = $doc->getElementsByTagName('bilan_complet')->item(0); - $bilan = array(); - $bilan['num_gest'] = array(); - $num_gest = $bilan_complet->getElementsByTagName('num_gest')->item(0); - $bilan['num_gest']['greffe'] = $num_gest->getElementsByTagName('greffe')->item(0)->nodeValue; - $bilan['num_gest']['dossier_millesime'] = $num_gest->getElementsByTagName('dossier_millesime')->item(0)->nodeValue; - $bilan['num_gest']['dossier_statut'] = $num_gest->getElementsByTagName('dossier_statut')->item(0)->nodeValue; - $bilan['num_gest']['dossier_chrono'] = $num_gest->getElementsByTagName('dossier_chrono')->item(0)->nodeValue; - $bilan['num_siren'] = $bilan_complet->getElementsByTagName('num_siren')->item(0)->nodeValue; - $bilan['date_cloture'] = $bilan_complet->getElementsByTagName('date_cloture')->item(0)->nodeValue; - $bilan['date_cloture_iso'] = $bilan_complet->getElementsByTagName('date_cloture_iso')->item(0)->nodeValue; - $bilan['millesime'] = $bilan_complet->getElementsByTagName('millesime')->item(0)->nodeValue; - $bilan['num_depot'] = $bilan_complet->getElementsByTagName('num_depot')->item(0)->nodeValue; - $bilan['type_comptes'] = $bilan_complet->getElementsByTagName('type_comptes')->item(0)->nodeValue; - $bilan['url_acces'] = $bilan_complet->getElementsByTagName('url_acces')->item(0)->nodeValue; - - return $bilan; - } - - /** - * Update informations about an item in database - * @param array $list - * @return boolean - */ - protected function dbUpdateItem($list) - { - // Insert or Update - $data = array( - 'siren' => $list['num_siren'], - 'numRC' => $list['num_gest']['dossier_millesime']. - $list['num_gest']['dossier_statut'].$list['num_gest']['dossier_chrono'], - //'numRC2' => '', - 'numGreffe' => intval($list['num_gest']['greffe']), - 'millesime' => $list['millesime'], - 'num_depot' => $list['num_depot'], - 'date_cloture' => $list['date_cloture_iso'], - 'type_comptes' => $list['type_comptes'], - 'mode_diffusion' => join(',', $list['mode_diffusion']), - 'actif' => 1, - ); - - try { - $sql = "SELECT * FROM jo.greffes_bilans - WHERE siren=:siren AND num_depot=:num AND date_cloture=:date ORDER BY dateInsert"; - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('siren', $this->siren); - $stmt->bindValue('num', $list['num_depot']); - $stmt->bindValue('date', $list['date_cloture_iso']); - $stmt->execute(); - // Insert - if ($stmt->rowCount() == 0) { - $data['dateInsert'] = date('YmdHis'); - try { - $result = $this->conn->insert('jo.greffes_bilans', $data); - } catch (\Doctrine\DBAL\DBALException $e) { - throw new Exception($e->getMessage()); - } - } - // Update - 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()); - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - throw new Exception($e->getMessage()); - } - - if ($result) { - return true; - } - - return false; - } - - /** - * Set file informations in database - * @param string $filename - * @param int $size - * @param int $numberOfPage - * @param string $version - * @return boolean - */ - public function dbSetFile($filename, $size = 0, $numberOfPage = '', $version = '') - { - $data = array( - 'pdfLink' => $filename, - 'pdfSize' => $size, - 'pdfPage' => $numberOfPage, - 'pdfVer' => $version, - 'pdfDate' => date('Ymd'), - ); - - $identifier = array( - 'siren' => $this->siren, - 'date_cloture' => $this->date_cloture, - 'type_comptes' => $this->type_comptes, - ); - - try { - $result = $this->conn->update('jo.greffes_bilans', $data, $identifier); - } catch (\Doctrine\DBAL\DBALException $e) { - throw new Exception($e->getMessage()); - } - - if ($result) { - return true; - } - - return false; - } -} diff --git a/library/Metier/Infogreffe/DocST.php b/library/Metier/Infogreffe/DocST.php deleted file mode 100755 index d219e38f..00000000 --- a/library/Metier/Infogreffe/DocST.php +++ /dev/null @@ -1,165 +0,0 @@ -conn = Zend_Registry::get('doctrine'); - } else { - $this->conn = $conn; - } - - // Set type - $this->type_document = 'ST'; - } - - /** - * Défini le SIREN - * @param string $siren - * @return void - */ - public function setSiren($siren) - { - $this->siren = $siren; - } - - public function getList() - { - } - - public function getCommandeT() - { - $this->mode_diffusion = 'T'; - $this->reference_client = 'T'.date('YmdHis'); - - $dir = $this->getFilePath($type, $dateCloture); - if (! file_exists($this->config->storage->path . '/' . $dir)) { - mkdir($this->config->storage->path . '/' . $dir, 0777, true); - } - - //Set the filename - $filename = $dir . '/' . $this->getFileName($type, $dateCloture); - - try { - $xml = $this->callRequest(); - } catch (Exception $e) { - throw new Exception($e->getMessage(), $e->getCode()); - } - - $item = $this->formatItem($xml); - $url = $item['url_acces']; - if (empty($url)) { - throw new Exception('File url not given'); - } - - if ($orderId !== null) { - $this->conn->update('sdv1.greffe_commandes_st', array( - 'cmdUrl' => $url, - 'dateCommande' => date('YmdHis')), - array('id' => $orderId)); - } - - //Récupérer le fichier - $getfile = $this->download($url, $filename); - - //Analyser le fichier - Nombre de page et taille - $infos = $this->pdfInfos($getfile); - - //Enregistrer les infos du fichier dans la base de données - if (false !== $infos) { - $this->dbSetFile(basename($filename), $infos['size'], $infos['pages'], $infos['version']); - } else { - $this->dbSetFile(basename($filename)); - } - - - return $filename; - } - - /** - * Name of file - * @param string $type - * @param string $dateCloture - * Format : AAAA-MM-JJ - * @return string - */ - public function getFileName($type, $dateCloture) - { - if ($type=='') { - $type = 'sociaux'; - } - $date = substr($dateCloture, 0, 4).substr($dateCloture, 5, 2).substr($dateCloture, 8, 2); - - return 'ST-' . $this->siren . '-' . $type . '-' . $date . '.pdf'; - } - - /** - * Path of file - * @param string $type - * @param string $dateCloture - * Format : AAAA-MM-JJ - * @return string - */ - public function getFilePath($type, $dateCloture) - { - return 'statut/' . $type . '/' . substr($dateCloture, 0, 4); - } - - /** - * Format XML to Array for a list of items - * @param string $xml - * @return array - */ - protected function formatList($xml) - { - } - - /** - * Format XML to Array for one item - * @param string $xml - * @return array - */ - protected function formatItem($xml) - { - } - - /** - * Update informations about an item in database - * @param array $list - * @return boolean - */ - protected function dbUpdateItem($list) - { - } - - /** - * Set file informations in database - * @param string $filename - * @param int $size - * @param int $numberOfPage - * @param string $version - * @return boolean - */ - public function dbSetFile($filename, $size = 0, $numberOfPage = '', $version = '') - { - } -} diff --git a/library/Metier/Infogreffe/README b/library/Metier/Infogreffe/README deleted file mode 100755 index bedb12a6..00000000 --- a/library/Metier/Infogreffe/README +++ /dev/null @@ -1,54 +0,0 @@ - -INFOGREFFE ----------- - -Document - AC => - BI => - ST => - -File name pattern - -AC => acte-[siren]-[type]-[YYYYMMdd]-[num].pdf - siren = [0-9]{9} - type = - num = [0-9]{2} - - Files are store in actes/YYYY/MM/filename.pdf - -BI => bilan-[siren]-[type]-[YYYYMMdd].pdf - siren = [0-9]{9} - type = [consolide|sociaux] - - Files are store in bilans/[type]/[YYYY]; - -ST => statut- - - Files are store in status/ - -Configuration -------------- - -Add to the main configuration (application.ini), these keys : - - infogreffe.cache.path => path for storing cache file - - infogreffe.cache.time => define end of life for the cache in hours - - infogreffe.storage.path => - - - infogreffe.wsdl = infogreffe.wsdl - - infogreffe.url = https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE - - infogreffe.uri = https://webservices.infogreffe.fr/ - - infogreffe.user = 85000109 - - infogreffe.password = 166 - - - -- Rattraper l'historique des documents et les liés à jo.greffes_bilans et jo.greffes_actes - Attention : Type de document 1 et 2 - Vérifier que nous possèdons le maximum d'infos sur l'association type 1 et 2 - Sinon passer une moulinette, pour chaque siren, récupérer la liste et analyse avec la table actes_files - - jo.greffes_actes : Ajout d'une colonne type_acte2 - - Il est possible sans le type de trouver le fichier - - SELECT siren, count(siren) as nb FROM `actes_files` WHERE `type_libelle` = '' GROUP BY siren ORDER BY nb DESC diff --git a/library/Metier/Infogreffe/Service.php b/library/Metier/Infogreffe/Service.php deleted file mode 100755 index 31ee2153..00000000 --- a/library/Metier/Infogreffe/Service.php +++ /dev/null @@ -1,419 +0,0 @@ -config = $c->profil->infogreffe; - if (null === $this->config) { - throw new Exception('Unable to load configuration file.'); - } - - $this->cacheFiletime = $c->profil->infogreffe->cache->time; - } - - public function callRequest() - { - $fromCache = false; - if ($this->mode_diffusion == 'XL' && $this->fileIsCache()) { - $fromCache = true; - } - - if ($fromCache) { - $xml = $this->fileFromCache(); - } else { - $xml = $this->getProduitsXML(); - } - - $this->error($xml); - - if ($this->mode_diffusion == 'XL') { - $this->fileTocache($xml); - } - - return $xml; - } - - /** - * Save data in cache - * @param string $xml - */ - protected function fileTocache($xml) - { - $filename = $this->type_document . '-' . $this->siren . '.xml'; - $file = $this->config->cache->path . DIRECTORY_SEPARATOR . $filename; - file_put_contents($file, $xml); - } - - /** - * - * @param string $xml - * @return string - */ - protected function fileFromCache() - { - $filename = $this->type_document . '-' . $this->siren . '.xml'; - $file = $file = $this->config->cache->path . DIRECTORY_SEPARATOR . $filename; - return file_get_contents($file); - } - - /** - * - * @return boolean - */ - protected function fileIsCache() - { - $filename = $this->type_document . '-' . $this->siren . '.xml'; - $file = $file = $this->config->cache->path . DIRECTORY_SEPARATOR . $filename; - if (!file_exists($file)) { - return false; - } - - $dateFile = filemtime($file); - $now = mktime(date('G'), date('i'), date('s'), date('m'), date('d'), date('Y')); - $maxTime = mktime( - date('G', $dateFile)+$this->cacheFiletime, - date('i', $dateFile), - date('s', $dateFile), - date("m", $dateFile), - date("d", $dateFile), - date("Y", $dateFile) - ); - - if ($now>$maxTime) { - return true; - } - - return false; - } - - /** - * Detect error - * @param string $xml - * @throws Exception - */ - protected function error($xml) - { - if (!empty($xml)) { - $doc = new DOMDocument(); - $load = $doc->loadXML($xml, LIBXML_NOERROR | LIBXML_NOWARNING); - if (!$load) { - $tmp = explode('-', $xml); - $errNum = intval($tmp[0]); - $errMsg = $tmp[1]; - throw new Exception($errMsg, $errNum); - } - } else { - throw new Exception('XML content is empty.'); - } - } - - /** - * Download file from URL - * @todo : Use Guzzle - * @param string $url - * @param string $filename - * @throws Exception - * @return string - */ - protected function download($url, $filename) - { - $file = $this->config->storage->path . '/' . $filename; - - try { - $client = new Zend_Http_Client($url); - $client->setStream(); - $response = $client->request('GET'); - if ($response->isSuccessful() && substr($response->getBody(), 0, 4)=='%PDF') { - if (copy($response->getStreamName(), $file)) { - return $file; - } else { - throw new Exception("Erreur lors de l'ecriture du fichier"); - } - } else { - throw new Exception("Fichier non PDF"); - } - } catch (Zend_Http_Client_Exception $e) { - throw new Exception($e->getMessage()); - } - } - - /** - * Pdf information - * @param string $pdf - * @return array - * pages => number of pages - * version => pdf version - * size => pdf filesize - */ - public function pdfInfos($pdf) - { - if (false !== ($file = file_get_contents($pdf))) { - //Number of page - $pages = preg_match_all("/\/Page\W/", $file, $matches); - - //Pdf Version - preg_match("/^\%PDF\-(.*)\s/U", $file, $matches); - $version = $matches[1]; - - //Pdf size - $size = filesize($pdf); - - return array( - 'pages' => $pages, - 'version' => $version, - 'size' => $size, - ); - } - - return false; - } - - /** - * Define XML for the request - */ - protected function setXML() - { - //Construct the request - $xml = new SimpleXMLElement(''); - $emetteur = $xml->addChild('emetteur'); - $emetteur->addChild('code_abonne', $this->config->user); - $emetteur->addChild('mot_passe', $this->config->password); - - $code_requete = $emetteur->addChild('code_requete'); - $code_requete->addChild('type_profil', 'A'); - $code_requete->addChild('origine_emetteur', 'IC'); - - // C = Commande de documents - $code_requete->addChild('nature_requete', 'C'); - - $code_requete->addChild('type_document', $this->type_document); - $code_requete->addChild('type_requete', 'S'); // S = Simple - - // Mode de diffusion : C = Courrier, T = Téléchargement, M = Mail, XL = XML - $mode_diffusion = $code_requete->addChild('mode_diffusion'); - if ($this->mode_diffusion=='XL') { - //On ajoute tout les types de diffusions pour XL - $mode_diffusion->addChild('mode')->addAttribute('type', 'C'); - $mode_diffusion->addChild('mode')->addAttribute('type', 'T'); - } - $mode_diffusion->addChild('mode')->addAttribute('type', $this->mode_diffusion); - - $code_requete->addChild('media', 'WS'); - - $commande = $xml->addChild('commande'); - $commande->addChild('num_siren', $this->siren); - - if ($this->mode_diffusion!='XL') { - // Commande de documents : bilan saisie ou bilan complet - if (($this->type_document=='BS' || $this->type_document=='BI')) { - $num_gest = $commande->addChild('num_gest'); - $num_gest->addChild('greffe', $this->greffe); - $num_gest->addChild('dossier_millesime', $this->dossier_millesime); - $num_gest->addChild('dossier_statut', $this->dossier_statut); - $num_gest->addChild('dossier_chrono', $this->dossier_chrono); - $commande->addChild('num_depot', $this->num_depot); - //Date de cloture au format dd/MM/yyyy - $commande->addChild('date_cloture', $this->date_cloture); - } - // Commande de documents : actes - elseif ($this->type_document=='AC') { - $num_gest = $commande->addChild('num_gest'); - $num_gest->addChild('greffe', $this->greffe); - $num_gest->addChild('dossier_millesime', $this->dossier_millesime); - $num_gest->addChild('dossier_statut', $this->dossier_statut); - $num_gest->addChild('dossier_chrono', $this->dossier_chrono); - $commande->addChild('num_depot', $this->num_depot); - $liste_actes = $commande->addChild('liste_actes'); - $liste_actes->addChild('acte')->addAttribute('num', $this->num); - } - } - - //Set Command ID - $commande->addChild('reference_client', $this->reference_client); - - $xml = str_replace('', '', $xml->asXML()); - - $this->xml = $xml; - } - - /** - * Send XML Request - * We have some problem to use SOAP so we use CURL - * @throws Exception - * @return string XML Response - */ - protected function getProduitsXML() - { - $this->setXML(); - - $req = $this->xml; - - if ($this->debug) { - file_put_contents($this->type_document.'-'.$this->siren.'-'.$this->mode_diffusion.'.query', $this->xml); - } - - //Create XML request - $post = ''. - ''. - ''. - ''. - ''.$req.''. - ''. - ''. - ''; - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $this->config->url); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($ch, CURLOPT_COOKIEFILE, true); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $post); - $response = curl_exec($ch); - - if (curl_errno($ch)) { - throw new Exception(curl_error($ch)); - } - - //Remove SOAP part of XML - $response = str_replace("", '', $response); - $response = str_replace('', '', $response); - - if ($this->debug) { - file_put_contents($this->type_document.'-'.$this->siren.'-'.$this->mode_diffusion.'.response', $response); - } - - return $response; - } -} diff --git a/library/Metier/Infogreffe/wsdl/prod.wsdl b/library/Metier/Infogreffe/wsdl/prod.wsdl deleted file mode 100755 index afa38472..00000000 --- a/library/Metier/Infogreffe/wsdl/prod.wsdl +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Service Soap Experian, Service Produit - - - - - diff --git a/library/Metier/Infogreffe/wsdl/test.wsdl b/library/Metier/Infogreffe/wsdl/test.wsdl deleted file mode 100755 index 7113c94c..00000000 --- a/library/Metier/Infogreffe/wsdl/test.wsdl +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Service Soap Experian, Service Produit - - - - - diff --git a/library/Metier/Insee/MInsee.php b/library/Metier/Insee/MInsee.php deleted file mode 100644 index 1586167b..00000000 --- a/library/Metier/Insee/MInsee.php +++ /dev/null @@ -1,8157 +0,0 @@ -conn = Zend_Registry::get('doctrine'); - $this->iBodacc = new Metier_Bodacc_MBodacc(); - - if (Zend_Registry::isRegistered('logger')) { - $this->logger = Zend_Registry::get('logger'); - } - } - - /** - * Défini une date limite de prise en compte des événements - * @param string $date AAAAMMJJ - */ - public function setEvenLimit($date) - { - $this->companyEvenDateStop = $date; - } - - /** - * Test de la validité du siren demandé - * @param int SIREN à tester - * @param int NIC (facultatif) - * @param mixed Message textuel d'erreur à afficher en cas d'erreur ou false - * @return mixed true, false ou Message d'erreur passé en paramètre - */ - public function valideSiren($siren, $nic='', $erreur=false) - { - $siren = str_pad($siren, 9, '0', STR_PAD_LEFT); - if (!empty($nic)) { - $nic = str_pad($nic, 5, '0', STR_PAD_LEFT); - } - //Siren non précisé ou incorrect. - if (!Metier_Util_String::valideData($siren, 9, 9, 'N')) { - return $erreur; - } - // Siren vide - elseif (intval($siren) == 0) { - return $erreur; - } else { - if (!isset($nic) || trim($nic)=='') { - $somme = 0; - // Traitement IMPAIR - for ($i=0; $i<=8; $i+=2) { - $somme+= (integer) substr($siren, $i, 1); - } - // Traitement PAIR - for ($i=1; $i<=7; $i+=2) { - $var_tmp = (string) (2*((integer)substr($siren, $i, 1))); - $som_tmp = 0; - for ($j=0; $jvalideSiren($siren)) { - return -1; - } - // Nic de format incorrect. - elseif (!Metier_Util_String::valideData($numEtab, 1, 4, 'N')) { - return -1; - } else { - for ($cle = 0; $cle < 10; $cle++) { - if ($this->valideSiren($siren, ''.$nic.''.$cle)) { - return $cle; - } - } - } - - return -1; - } - - /** - * Vérifie si le n° de département est un département français valide - * @param int Numéro de département Français - * @return bool - */ - public function isDepartement($dept) - { - return array_key_exists($dept, self::$tabDep); - } - - /** - * Retourne le libellé du département si département français valide - * @param int Numéro de département Français - * @return string Libellé département - */ - public function getDepartement($dept, $article=false) - { - if ($article) { - return self::$tabDepArt[$dept]; - } - - return self::$tabDep[$dept]; - } - - /** - * Effectif moyen - * @param string $trancheEffectif - * @return number - */ - public function getEffectifMoyen($trancheEffectif) - { - $trancheEffectif = $trancheEffectif*1; - if ($trancheEffectif == 0) { - return 0; - } elseif ($trancheEffectif == 53) { - return 10000; - } else { - $libEffectif = self::$tabEffectif[$trancheEffectif]; - $tabTmp = explode('à', $libEffectif); - $eff_min = trim(str_replace(' ', '', $tabTmp[0])); - $tabTmp = explode('salari', $tabTmp[1]); - $eff_max = trim(str_replace(' ', '', $tabTmp[0])); - return floor(($eff_min+$eff_max)/2); - } - } - - /** - * Retourne le code forme juridique d'une entreprise. - * @param int Numéro de SIREN (9 chiffres) ou SIRET (14 chiffres) - * @return string Forme Juridique sur 4 caractères ou falseen cas d'erreur ou si inexistant - */ - public function getFJInsee($siren_siret) - { - $len = strlen($siren_siret); - if ($len == 9) { - $siren = $siren_siret; - } elseif ($len == 14) { - $siren = $siren_siret; - } else { - return false; - } - - try { - $stmt = $this->conn->prepare('SELECT CJ FROM insee.identite WHERE SIREN=:siren'); - $stmt->bindValue('siren', $siren); - $stmt->execute(); - return $stmt->fetch(\PDO::FETCH_ASSOC); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return false; - } - - /** - * Recherche Etablissements - * - * @param string $raisonSociale - * @param string $adresse - * @param string $codePostal - * @param string $ville - * @param string $siege - * @param int $actif - * @param int $deb - * @param int $nbRep - * @param int $maxRep - * @param string $pertinence - * @param bool $uniquementAvecSiren - * @param string $ape_etab - * @param int $fj - * @return array - */ - public function rechercheEtab($raisonSociale, $adresse='', $codePostal='', $ville='', $siege='', $actif=2, $deb=0, $nbRep=20, $maxRep=200, $pertinence=false, $uniquementAvecSiren='', $ape_etab='', $fj=null) - { - $tabAdr = $this->structureVoie(strtoupper($adresse)); - $numAdresse = preg_replace('/^0+/', '', ''.$tabAdr['num']*1); - $adresse = Metier_Util_String::trimAccent($tabAdr['libVoie']); - $formR = array( - 'type' => 'ent', - 'siret' => '', - 'raisonSociale' => $raisonSociale, - 'numVoie' => $numAdresse, - 'voie' => $adresse, - 'cpVille' => $codePostal.' '.$ville, - 'actif' => $actif, - 'siege' => $siege, - 'fj' => $fj, - ); - if ($ape_etab != '') { - $formR['naf'] = $ape_etab; - } - - require_once 'Metier/sphinx/rechercheFonc.php'; - if ($uniquementAvecSiren == '') { - $result = rechercheEnt($formR, $deb, $nbRep, $maxRep); - } else { - $result = rechercheEnt($formR, $deb, $nbRep, $maxRep, $uniquementAvecSiren); - } - - return $result; - } - - /** - * Recherche dirigeant - * @param string $nom - * @param string $prenom - * @param string $fonction - * @param string $dateNaiss - * @param string $villeNaiss - * @param number $deb - * @param integer $nbRep - * @param integer $maxRep - * @param string $pertinence - * @return array - */ - public function rechercheDir($nom, $prenom='', $fonction='', $dateNaiss='', $villeNaiss='', $deb=0, $nbRep=20, $maxRep=200, $pertinence=false) - { - if ($this->logger !== null) { - $this->logger->info("rechercheDir de $nom, $prenom, $fonction, $dateNaiss, $villeNaiss (Max Rep=$nbRep)"); - } - $jour = $mois = $annee = ''; - if ($dateNaiss != '' && $dateNaiss != '//' && $dateNaiss != '0/0/0') { - $tabDateNaiss = explode('/', $dateNaiss); - $jour = $tabDateNaiss[0]*1; - if ($jour < 1 || $jour > 31) { - $jour = ''; - } - - $mois = $tabDateNaiss[1]*1; - if ($mois < 1 || $mois > 12) { - $mois = ''; - } - - $annee = $tabDateNaiss[2]*1; - if ($annee > 0 && $annee < 100) { - $annee = ('19'.$annee)*1; - } - if ($annee < 1800 || $annee > date('Y')*1) { - $annee = ''; - } - } - $formR = array( - 'type' => 'dir', - 'nom' => $nom, - 'prenom' => $prenom, - 'dirDateNaissAAAA' => $annee, - 'dirDateNaissMM' => $mois, - 'dirDateNaissJJ' => $jour, - // 'departement' => 'D', - 'cpVille' => $villeNaiss, - ); - - $result = array(); - require_once 'Metier/sphinx/rechercheFonc.php'; - $result = rechercheDir($formR, $deb, $nbRep, $maxRep); - - return $result; - } - - /** - * Vérifie si le code voie est une abréviation autorisée (selon la Norme AFNOR XP Z 10-011) - * @param string $codeVoie - * @return boolean - */ - public function isCodeVoie($codeVoie) - { - return array_key_exists($codeVoie, $this->tabCodeVoie); - } - - /** - * Retourne le libellé du code voie selon les abréviations autorisées pour les types de voie (Norme AFNOR XP Z 10-011) - * @param string Code voie - * @return string Libellé de la voie - */ - public function getCodeVoie($codeVoie) - { - return $this->tabCodeVoie[$codeVoie]; - } - - /** - * Initialise la table des codes NAF 4 et 5 positions - */ - protected function setTabCodesNaf() - { - if (count($this->tabCodesNaf)==0) { - $cacheNaf = dirname(__FILE__) . '/../Table/CodesNaf.php'; - $cacheNace = dirname(__FILE__) . '/../Table/CodesNace.php'; - if (file_exists($cacheNaf)) { - $this->tabCodesNaf = include $cacheNaf; - $this->tabCodesNace = include $cacheNace; - } else { - $tabNafs = $tabNace = array(); - $stmt = $this->conn->executeQuery("SELECT codNaf700 AS naf, libNaf700 AS LibNaf FROM jo.tabNaf4"); - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $tabNafs[$row->naf] = $row->LibNaf; - } - $stmt = $this->conn->executeQuery("SELECT codNaf5 AS naf, libNaf5 AS LibNaf, codNaf1 FROM jo.tabNaf5"); - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $tabNafs[$row->naf] = $row->LibNaf; - $tabNace[$row->naf] = $row->codNaf1.preg_replace('/^0/', '', substr($row->naf, 0, 4)); - } - $this->tabCodesNaf = $tabNafs; - $this->tabCodesNace = $tabNace; - } - } - } - - /** - * - * @param unknown $code_naf - * @return array - */ - public function getLibelleNaf($code_naf) - { - if ($code_naf == '') { - return ''; - } - - $this->setTabCodesNaf(); - - return $this->tabCodesNaf[$code_naf]; - } - - /** - * - * @return multitype: - */ - public function getCodesNaf() - { - $this->setTabCodesNaf(); - return array_keys($this->tabCodesNaf); - } - - /** - * Initialise la table des codes NAFA rev 2 - */ - protected function setTabCodesNafa() - { - if (count($this->tabCodesNafa)==0) { - $cache = dirname(__FILE__) . '/../Table/CodesNafa.php'; - if (file_exists($cache)) { - $this->tabCodesNafa = include $cache; - } else { - $tabNafs = array(); - try { - $stmt = $this->conn->executeQuery("SELECT codNafa AS nafa, libNafa FROM jo.tabNafa"); - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $result[$row->naf] = $row->libNafa; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - $this->tabCodesNafa = $result; - } - } - } - - /** - * Libelle Nafa - * @param unknown $code_nafa - * @return string|multitype: - */ - public function getLibelleNafa($code) - { - if ($code == '') { - return ''; - } - - $this->setTabCodesNafa(); - return $this->tabCodesNafa[$code]; - } - - /** - * Liste des événements - * @param string $siren - * @param string $nic - * @param integer $iDeb - * @param integer $iMax - * @return array - */ - public function getEvenements($siren, $nic = null, $iDeb = 0, $iMax = 1000) - { - $nic = intval($nic); - - $tabRet = array(); - - $sqlIdentifiant = "insSIREN=$siren"; - if (!empty($nic)) { - $sqlIdentifiant.= " AND insNIC=$nic "; - } - - if (empty($nic)) { - $tabSupId = $this->getEvenementsAssocId($siren); - if (count($tabSupId) > 0) { - $sqlIdentifiant.= " OR id IN(".join(',', $tabSupId).")"; - } - } - - $sql = "SELECT id, LPAD(insSIREN,9,0) as insSIREN, siretValide, LPAD(insNIC,5,0) as insNIC, - insLIBCOM, insSIEGE, insAUXILT, insORIGINE, insTEFET, insAPET700, insAPRM, insMODET, - insMARCHET, insSAISONAT, insACTIVNAT, insENSEIGNE, insL1_NOMEN, insL2_COMP, insL4_VOIE, - insL3_CADR, insNUMVOIE, insINDREP, insTYPVOIE, insLIBVOIE, insL5_DISP, insL6_POST, - insCODPOS, insL7_ETRG, insRPET, insDEPCOM, insCODEVOIE, insDREACTET, insEXPLET, insDAPET, - insLIEUACT, insACTISURF, insDEFET, insTEL, insCJ, insCIVILITE, insTEFEN, insAPEN700, - insMODEN, insMARCHEN, insNOMEN, insTYPCREH, insEVE, insDATEVE, insTRAN, insNICTRAN, - insMNICSIEGE, insMNOMEN, insMCJ, insMAPEN, insFiller1, insFiller2, insMMARCHEN, - insMORDIN, insEFENCENT, insSIGLE, insNBETEXPL, insNICSIEGE, insDEPCOMEN, - insFiller3, insMENSEIGNE, insMAPET, insMNATURE, insMADRESSE, insMEFET, insMSINGT, - insMTELT, insMMARCHET, insMAUXILT, insSINGT, insEFETCENT, insSIRETPS, insDESTINAT, - insDATEMAJ, idFlux, dirNom, dirNomUsage, dirPrenom, insDCRET, insDCREN, insPRODPART, - insSIRETASS, insDREACTEN, insEXPLEN, insFiller4, insDEFEN, insMONOREG, insREGIMP, - insMONOACT, insMSIGLE, insMEXPLEN, insRPEN, insMEXPLET, insTYPETAB, insDAPEN - FROM insee.insee_even WHERE $sqlIdentifiant ORDER BY insDATEMAJ DESC LIMIT $iDeb, $iMax"; - - try { - $stmt = $this->conn->executeQuery($sql); - while ($even = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $libDet = ''; - if ($even['insMNOMEN'] == 1) { - $libDet.= 'Modification de la raison sociale : '.$even['insNOMEN']; - $strPre = $this->getInfoPrecedente($siren, $even['insNIC'], $even['insDATEVE'], 'NOMEN'); - if ($strPre != '' && $strPre != $even['insNOMEN']) { - $libDet.=" (Précédent : $strPre)"; - } - $libDet.= ', '; - } - if ($even['insMENSEIGNE'] == 1) { - $libDet.= 'Modification de l\'enseigne : '.$even['insENSEIGNE']; - $strPre = $this->getInfoPrecedente($siren, $even['insNIC'], $even['insDATEVE'], 'ENSEIGNE'); - if ($strPre != '' && $strPre != $even['insENSEIGNE']) { - $libDet.= " (Précédent : $strPre)"; - } - $libDet.= ', '; - } - if ($even['insMSIGLE'] == 1) { - $libDet.= 'Modification du sigle : '.$even['insSIGLE']; - $strPre = $this->getInfoPrecedente($siren, $even['insNIC'], $even['insDATEVE'], 'SIGLE'); - if ($strPre != '' && $strPre != $even['insSIGLE']) { - $libDet.=" (Précédent : $strPre)"; - } - $libDet.= ', '; - } - if ($even['insMAPEN'] == 1) { - $libDet.= 'Modification de l\'activité de l\'entreprise : '.$even['insAPEN700'].' - '.$this->getLibelleNaf($even['insAPEN700']); - $strPre = $this->getInfoPrecedente($siren, $even['insNIC'], $even['insDATEVE'], 'APEN'); - if ($strPre != '' && $strPre != $even['insAPEN700']) { - $libDet.=" (Précédent : $strPre - ".$this->getLibelleNaf($strPre).')'; - } - $libDet.= ', '; - } - if ($even['insMAPET'] == 1) { - $libDet.= 'Modification de l\'activité de l\'établissement : '.$even['insAPET700'].' - '.$this->getLibelleNaf($even['insAPET700']); - $strPre = $this->getInfoPrecedente($siren, $even['insNIC'], $even['insDATEVE'], 'APET'); - if ($strPre != '' && $strPre != $even['insAPET700']) { - $libDet.=" (Précédent : $strPre - ".$this->getLibelleNaf($strPre).')'; - } - $libDet.= ', '; - } - if ($even['insMNICSIEGE'] == 1) { - $libDet.='Modification du nic du siège : '.$even['insNICSIEGE']; - $strPre = $this->getInfoPrecedente($siren, $even['insNIC'], $even['insDATEVE'], 'NIC'); - if ($strPre != '' && $strPre != $even['insNICSIEGE']) { - $libDet.=" (Précédent : $strPre)"; - } - $libDet.=', '; - } - if ($even['insMADRESSE'] == 1) { - $libDet.='Modification de l\'adresse : '.$even['insL2_COMP'].' '.$even['insL3_CADR'].' '.$even['insL4_VOIE'].' '.$even['insL5_DISP'].' '.$even['insL6_POST'].' '.$even['insL7_ETRG']; - $strPre = $this->getInfoPrecedente($siren, $even['insNIC'], $even['insDATEVE'], 'ADRESSE'); - if ($strPre != '' && $strPre != $even['insL2_COMP'].' '.$even['insL3_CADR'].' '. - $even['insL4_VOIE'].' '.$even['insL5_DISP'].' '.$even['insL6_POST'].' '.$even['insL7_ETRG']) { - $libDet.=" (Précédent : $strPre)"; - } - $libDet.=', '; - } - if ($even['insMEFET'] == 1) { - $libDet.= 'Modification de l\'effectif : '.$even['insEFENCENT'].' (Tranche '.$even['insTEFET'].'), '; - } - if ($even['insEXPLET'] == 'O') { - $strTmp = 'Exploitant'; - } elseif ($even['insEXPLET'] == 'N') { - $strTmp = 'Non exploitant participant au système productif'; - } elseif ($even['insEXPLET'] == 'X') { - $strTmp = 'Non exploitant ne participant pas au système productif'; - } - if ($even['insMEXPLET'] == 1) { - $libDet.= 'Modification du caractère exploitant de l\'établissement : '.$strTmp.', '; - } - if ($even['insEXPLEN'] == 'O') { - $strTmp = 'Exploitant'; - } elseif ($even['insEXPLEN'] == 'N') { - $strTmp = 'Non exploitant participant au système productif'; - } elseif ($even['insEXPLEN'] == 'X') { - $strTmp = 'Non exploitant ne participant pas au système productif'; - } - if ($even['insMEXPLEN'] == 1) { - $libDet.= 'Modification du caractère exploitant de l\'entreprise : '.$strTmp.', '; - } - if ($even['insMCJ'] == 1) { - $libDet.= 'Modification de la forme juridique : '.$even['insCJ'].' - '.$this->getLibelleFJ($even['insCJ']); - $strPre = $this->getInfoPrecedente($siren, $even['insNIC'], $even['insDATEVE'], 'CJ'); - if ($strPre != '' && $strPre != $even['insCJ']) { - $libDet.= " (Précédent : $strPre - ".$this->getLibelleFJ($even['insCJ']).')'; - } - $libDet.=', '; - } - if ($even['insAUXILT'] == 1) { - $strTmp = 'Auxiliaire'; - } else { - $strTmp = 'Non auxiliaire'; - } - if ($even['insMAUXILT'] == 1) { - $libDet.= 'Modification du caractère auxiliaire de l\'établissement : '.$strTmp.', '; - } - - if (trim($even['insDESTINAT']) != '' && $even['insDESTINAT'] != 'NR' && $even['insDESTINAT']*1 != 9) { - $libDet.= $this->tabDestinat['i'.trim($even['insDESTINAT'])].', '; - } - - $libDet.= $this->tabTypEtab['i'.trim($even['insTYPETAB'])].', '; - - $typeSiretAss = ''; - if ($even['insSIREN'] != $siren) { - if (substr($even['insSIRETASS'], 0, 9) == $siren) { - switch ($even['insPRODPART']*1) { - case 1: $typeSiretAss = 'Loueur de fond'; break; - case 2: $typeSiretAss = 'Locataire du fond'; break; - case 3: $typeSiretAss = 'Prestataire de personnel'; break; - } - - $dateEve = $even['insDATEVE']; - $dateMaj = $even['insDATEMAJ']; - if (str_replace('-', '', $dateEve*1) == 0) { - $dateEve = $dateMaj; - } - - $tabRet[] = array( - 'codeEven' => 'I'.$even['insEVE'], - 'nic' => substr($even['insSIRETASS'], 9, 5), - 'siretAssocie' => ''.$even['insSIREN'].$even['insNIC'], - 'typeSiretAss' => $typeSiretAss, - 'siege' => $even['insSIEGE'], - 'libEven' => "Modification d'une entreprise/établissement lié",//$tabEvenInsee['i'.trim($even['insEVE'])], - 'libEvenDet' => '',//substr($libDet,0,-3), - 'dateMAJ' => $dateMaj, - 'dateEven' => $dateEve, - ); - } - - if (substr($even['insSIRETPS'], 0, 9) == $siren) { - $typeSiretAss = 'Prédécesseur ou Successeur'; - $dateEve = $even['insDATEVE']; - $dateMaj = $even['insDATEMAJ']; - if (str_replace('-', '', $dateEve*1) == 0) { - $dateEve = $dateMaj; - } - - $tabRet[] = array( - 'codeEven' => 'I'.$even['insEVE'], - 'nic' => substr($even['insSIRETPS'], 9, 5), - 'siretAssocie' =>''.$even['insSIREN'].$even['insNIC'], - 'typeSiretAss' => $typeSiretAss, - 'siege' => $even['insSIEGE'], - 'libEven' => "Modification d'une entreprise/établissement lié",//$tabEvenInsee['i'.trim($even['insEVE'])], - 'libEvenDet' => '',//substr($libDet,0,-3), - 'dateMAJ' => $dateMaj, - 'dateEven' => $dateEve, - ); - } - } else { - switch (intval($even['insPRODPART'])) { - case 1: $typeSiretAss = 'Loueur de fond'; break; - case 2: $typeSiretAss = 'Locataire du fond'; break; - case 3: $typeSiretAss = 'Prestataire de personnel'; break; - } - - $siretAss = $even['insSIRETASS']; - if (intval($siretAss) == 0) { - $tabPS = array(); - $siretAss = $even['insSIRETPS']; - if ($siretAss*1 > 0) { - $tabPS = $this->getIdentiteLight(substr($siretAss, 0, 9)); - } - $tabEt = $this->getIdentiteLight($siren); - if ($tabPS['actif']==1 && $tabEt['actif']==0) { - $typeSiretAss = 'Successeur'; - } elseif ($tabPS['actif'] == 0 && $tabEt['actif'] == 1) { - $typeSiretAss = 'Prédécesseur'; - } else { - $typeSiretAss = 'Prédécesseur ou Successeur'; - } - } - - $dateEve = $even['insDATEVE']; - $dateMaj = $even['insDATEMAJ']; - if (str_replace('-', '', $dateEve*1) == 0) { - $dateEve = $dateMaj; - } - - $tabRet[] = array( - 'codeEven' => 'I'.$even['insEVE'], - 'nic' => $even['insNIC'], - 'siretAssocie' => $siretAss, - 'typeSiretAss' => $typeSiretAss, - 'siege' => $even['insSIEGE'], - 'libEven' => $this->tabEvenInsee['i'.trim($even['insEVE'])], - 'libEvenDet' => substr($libDet, 0, -2), - 'dateMAJ' => $dateMaj, - 'dateEven' => $dateEve, - ); - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $tabRet; - } - - /** - * Compte le nombre d'événements - * @param string $siren - * @param string $nic - * @return integer - */ - public function getEvenementsCount($siren, $nic = null) - { - $nic = intval($nic); - - $tabRet = $tabId = array(); - - $sqlIdentifiant = "insSIREN=$siren"; - if (!empty($nic)) { - $sqlIdentifiant.= " AND insNIC=$nic"; - } - - if (empty($nic)) { - $tabSupId = $this->getEvenementsAssocId($siren); - if (count($tabSupId) > 0) { - $sqlIdentifiant.= " OR id IN(".join(',', $tabSupId).")"; - } - } - - $sql = "SELECT count(*) AS nb FROM insee.insee_even WHERE $sqlIdentifiant ORDER BY insDATEMAJ DESC"; - try { - $stmt = $this->conn->executeQuery($sql); - $result = $stmt->fetch(\PDO::FETCH_OBJ); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - return $result->nb; - } - - /** - * Recherche les identifiants des événements INSEE associés - * @param string $siren - * @return array - */ - protected function getEvenementsAssocId($siren) - { - $tabSupId = array(); - - if ($this->tabAssocId === null) { - $siretDeb = $siren.'00000'; - $siretFin = $siren.'99999'; - - // Recherche d'évènement pour lesquels le SIREN est ASSOCIE - try { - $stmt = $this->conn->executeQuery("SELECT id FROM insee.insee_even - WHERE insSIREN != $siren AND insSIRETASS BETWEEN $siretDeb AND $siretFin - GROUP BY insSIREN, ROUND(insSIRETASS/100000) ORDER BY insDATEMAJ DESC"); - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $tabSupId[] = $row->id; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - // Recherche d'évènement pour lesquels le SIREN est Prédécesseur ou Successeur - try { - $stmt = $this->conn->executeQuery("SELECT id FROM insee.insee_even - WHERE insSIREN != $siren AND insSIRETASS BETWEEN $siretDeb AND $siretFin - GROUP BY insSIREN, ROUND(insSIRETPS/100000) ORDER BY insDATEMAJ DESC"); - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $tabSupId[] = $row->id; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - $this->tabAssocId = $tabSupId; - } else { - $tabSupId = $this->tabAssocId; - } - - return $tabSupId; - } - - - /** - * Libelle FJ - * @param string $code_forme_juridique - * @param string $court - * @return string|unknown - */ - public function getLibelleFJ($code_forme_juridique, $court=false) - { - $fj = $code_forme_juridique * 1; - if ($fj > 0 && $fj < 10000) { - try { - $stmt = $this->conn->prepare("SELECT libelle AS LibFJ, libelleCourt AS LibCourt FROM jo.tabFJur WHERE code = :fj"); - $stmt->bindValue('fj', $fj); - $stmt->execute(); - $result = $stmt->fetch(\PDO::FETCH_OBJ); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - $libLong = $result->LibFJ; - $libCourt = $result->LibCourt; - if ($court) { - if ($libCourt == '') { - if (strlen($libLong) > 20) { - return substr($libLong, 0, 17).'...'; - } else { - return $libLong; - } - } - - return $libCourt; - } else { - return $libLong; - } - } - - if ($court) { - return "En chiffrement"; - } - - return 'En instance de chiffrement'; - } - - /** - * Codes FJ - * @return array - */ - public function getCodesFJ() - { - $tabFJ = array(); - $cache = dirname(__FILE__) . '/../Table/CodesFJ.php'; - if (file_exists($cache)) { - $result = include $cache; - } else { - try { - $stmt = $this->conn->executeQuery("SELECT code AS FJ, libelle AS libFJ FROM jo.tabFJur WHERE code >= 1000"); - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $result[$row->FJ] = str_replace('"', '\"', $row->LibFJ); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - return array_keys($result); - } - - /** - * Découpe une ligne d'adresse textuelle en un tableau contenant les différentes composantes de l'adresse - *
Array (
-     *      [adrComp0] => Maison des associations
-     *      [num]      => 33
-     *      [typeVoie] => R
-     *      [libVoie]  => Louis Blanc
-     *      [cp]		=> ...
-     *      [ville]	=> ... Si contenu dans l'adresse
-     * )
- * - * @param string $strLigneDAdresse La ligne d'adresse textuelle (ex : Maison des associations, 33 rue Louis Blanc - * @return array tableau contenant l'adresse structurée ici - */ - public function structureVoie($strLigneDAdresse) - { - $tabRet = $tabAdr = array(); - $strLigneDAdresse = trim($strLigneDAdresse); - if ($strLigneDAdresse == '') { - return $tabRet; - } - $tabLignes = explode(',', preg_replace('/,$/', '', $strLigneDAdresse)); - foreach ($tabLignes as $strLigneDAdresse) { - $strLigneDAdresse = Metier_Util_String::trimAccent($strLigneDAdresse); - $strLigneDAdresse = preg_replace('/[^0-9a-zA-Z]/', ' ', $strLigneDAdresse); - $strLigneDAdresse = trim(preg_replace('/ +/', ' ', $strLigneDAdresse)); - //echo "1. Adresse nettoyées = $strLigneDAdresse".PHP_EOL; - $adrAvecCP = preg_match("/(.*)([0-9]{5,5}|[0-9][0-9] [0-9]{3,3})([\D]*)/", $strLigneDAdresse, $tabAdrTmp); - if ($adrAvecCP) { - //echo "Adresse avec Code Postal\n"; - //print_r($tabAdrTmp); - $strLigneDAdresse = trim($tabAdrTmp[1]); - $tabRet['cp'] = $tabAdrTmp[2]; - $tabRet['ville'] = trim(strtoupper($tabAdrTmp[3])); - }// else echo "Adresse sans Code Postal\n"; - $adrAvecNum=preg_match("/^([0-9]{1,4})(.*)/", $strLigneDAdresse, $tabAdrTmp); - if ($adrAvecNum) { - //echo "Adresse avec Numéro de voie\n"; - //print_r($tabAdrTmp); - $tabRet['num'] = $tabAdrTmp[1]; - if (preg_match("/^\s(B|BIS|T|TER|Q|a|c|d|e|f|g|h|i|j|k|l|m|n|o|p|s)\s(.*)/i", $tabAdrTmp[2], $tabAdrTmp2)) { //echo "Adresse avec Bis, Ter, Q...\n"; - //print_r($tabAdrTmp2); - $tabRet['indRep'] = strtoupper(trim($tabAdrTmp2[1])); - $typeVoie = trim($tabAdrTmp2[2]); - } else { - $typeVoie = trim($tabAdrTmp[2]); - } - } else { - $typeVoie = trim($strLigneDAdresse); - } - // On récupère le type de voie si possible et le libellé de la voie - $voieTrouvee = false; - foreach ($this->tabCodeVoie as $code => $voie) { - if (preg_match("/^($voie |$voie".'s '."|$code )(.*)/i", $typeVoie, $tabAdrTmp)) { - //echo "Adresse avec type de voie\n"; - //print_r($tabAdrTmp); - $tabRet['typeVoie'] = $code; - $tabRet['libVoie'] = trim(strtoupper($tabAdrTmp[2])); - $voieTrouvee = true; - break; - } - } - if (!$voieTrouvee) { - $tabAdr[] = $typeVoie; - } - } - foreach ($tabAdr as $k => $ligne) { - $tabRet['adrComp'.$k] = trim(strtoupper($ligne)); - } - - if (!isset($tabRet['libVoie'])) { - $tabRet['libVoie']=$ligne; - unset($tabRet['adrComp'.$k]); - } - - if (isset($tabRet['adrComp0'])) { - if ($tabRet['adrComp0'] == 'BIS' || $tabRet['adrComp0'] == 'B') { - $tabRet['indRep'] = 'B'; - $tabRet['adrComp0'] = ''; - } elseif ($tabRet['adrComp0'] == 'TER' || $tabRet['adrComp0'] == 'T') { - $tabRet['indRep'] = 'T'; - $tabRet['adrComp0'] = ''; - } - } - - return $tabRet; - } - - /** - * Liste des établissements par siren/nic - * @param string $siren - * @param string $nic - * @param int $deb - * @param int $nbRep - * @param int $maxRep - * @param int $dep - * @param int $actif - * @param int $siege - */ - public function getEtablissements($siren, $nic='', $deb=0, $nbRep=20, $maxRep=200, $dep=0, $actif=-1, $siege=null) - { - $this->setTabCodesNaf(); - $deb = $deb*1; - $dep = $dep*1; - $nbRep = $nbRep*1; - - $strInfo = ''; - - $fields = "'Etab' as Loc, e.id, e.source, e.source_id, e.triCode, e.autre_id, - LPAD(e.siren, 9, 0) AS siren, LPAD(e.nic, 5, 0) AS nic, e.siege, e.raisonSociale, - e.enseigne, e.sigle, LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, - e.adr_comp, LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, e.adr_dep, LPAD(e.adr_com,3,0) AS adr_com, - LPAD(e.tel,10,0) AS tel, LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep, e.teff_etab, - CONCAT(e.siren, e.nic) AS siret, e.actif, e.identite_pre, IF(e.siege=2,0.5,e.siege) AS triSiege, - IF (e.adr_dep=99, (SELECT libPays FROM jo.tabPays p WHERE p.codePaysInsee=e.adr_com LIMIT 0,1) , 'France') AS libPays"; - - $strActif = $strDep = ''; - if (intval($actif) == 1) { - $strActif = ' AND e.actif=1 '; - } elseif (intval($actif) == 0) { - $strActif = ' AND e.actif=0 '; - } - - $strSiege = ''; - if ($siege === null) { - $strSiege = ''; - } elseif ($siege == 1) { - $strSiege = 'AND e.siege=1 '; - } elseif ($siege == 0) { - $strSiege = 'AND e.siege IN(0,2) '; - } - - $listeEtab = array(); - - // --- Search with "departement" - if ($dep > 0 && $dep < 99999) { - if ($dep < 96) { - $strDep = 'AND adr_cp BETWEEN '.$dep.'000 AND '.$dep.'999'; - } elseif ($dep > 9999) { - $strDep = "AND adr_cp BETWEEN $dep AND $dep"; - } else { - $strDep = 'AND adr_cp BETWEEN '.$dep.'00 AND '.$dep.'99'; - } - $sqlWhere = "siren=$siren $strDep $strActif $strSiege"; - } - // --- Search without NIC - elseif ($nic == '') { - $sqlWhere = "e.siren=$siren $strActif $strSiege"; - } - // --- Search with NIC - else { - $sqlWhere = "siren=$siren AND (nic=$nic OR siege=1) $strActif $strSiege"; - } - - try { - $stmt = $this->conn->executeQuery("SELECT count(*) AS nb FROM jo.etablissements e WHERE $sqlWhere"); - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $nbTot = $result->nb; - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - $sqlOrder = "ORDER BY triSiege DESC, e.actif DESC, e.nic DESC"; - $sqlLimit = "LIMIT $deb, $nbRep"; - - // --- Vérification du SIREN - if ($nbTot == 0 && $actif == -1) { - require_once 'Metier/sphinx/rechercheFonc.php'; - $liste = verificationDuSiret($siren); - if ($liste != false) { - //print 'Essayez :
'; - $listeSiren=array(); - foreach ($liste as $s) { - if (sommeDeControle($s) != 0) { - //print 'erreur somme de controle sur '.$s.' ('.sommeDeControle($s).')
'; - } else { - $listeSiren[]=$s; - } - } - $strSiren = implode(',', $listeSiren); - - try { - $stmt = $this->conn->executeQuery("SELECT count(*) AS nb FROM jo.etablissements - WHERE siren IN ($strSiren) AND siege=1"); - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $nbTot = $result->nb; - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - $sql = "SELECT $fields FROM jo.etablissements e - WHERE siren IN ($strSiren) AND siege=1 - ORDER BY e.rang DESC, e.actif DESC, e.nic ASC $sqlLimit"; - $strInfo = 'Siren saisi invalide'; - } - } else { - $sql = "SELECT $fields FROM jo.etablissements e - WHERE $sqlWhere $sqlOrder $sqlLimit"; - } - - try { - $stmt = $this->conn->executeQuery($sql); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - // --- Affichage de la liste des établissements - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tel = sprintf('%010d', strtr($row['tel'], array('-'=>'', '/'=>'', '.'=>'', ','=>''))); - if ($tel != '0000000000') { - $tel = implode('.', str_split($tel, 2)); - } else { - $tel = ''; - } - - $fax = sprintf('%010d', strtr($row['fax'], array('-'=>'', '/'=>'', '.'=>'', ','=>''))); - if ($fax != '0000000000') { - $fax = implode('.', str_split($fax, 2)); - } else { - $fax = ''; - } - - // Cas des noms vides à l'INSEE (une centaine) - $nom = trim($row['raisonSociale']); - if ($nom == '') { - $nom = preg_replace('/,.*$/', '', $row['identite_pre']); - } - - $tabRet[] = array( - 'Localisation' => $row['Loc'], - 'id' => $row['id'], - 'Pertinence' => 100, - 'Source' => $row['source'], - 'SoruceId' => $row['source_id'], - 'Siret' => $row['siret'], - 'Siege' => $row['siege'], - 'Nom' => $nom, - 'Sigle' => $row['sigle'], - 'Enseigne' => $etab['enseigne'], - 'Adresse' => trim(preg_replace('/ +/', ' ', trim($row['adr_num'] .' '. - $row['adr_btq'] .' '. $row['adr_typeVoie'] .' '. $row['adr_libVoie']))), - 'Adresse2' => trim(preg_replace('/ +/', ' ', $row['adr_comp'])), - 'CP' => $row['adr_cp'], - 'Ville' => $row['adr_ville'], - 'Pays' => ($row['adr_dep'] != 99 ? $row['libPays'] : 'France'), - 'Tel' => $tel, - 'Fax' => $fax, - 'FJ' => $row['cj'], - 'FJLib' => $this->getLibelleFJ($row['cj']), - 'Siren' => $row['siren'], - 'Nic' => $row['nic'], - 'Actif' => $row['actif'], - 'NafEtab' => $row['ape_etab'], // Etablissement - 'NafEnt' => $row['ape_entrep'], // Entreprise - 'NafEtabLib' => $this->getLibelleNaf($row['ape_etab']), - 'NafEntLib' => $this->getLibelleNaf($row['ape_entrep']), - 'EffEtTr' => $row['teff_etab'], - 'EffEtTrLib' => self::$tabEffectif[$row['teff_etab']], - ); - } - } - - // Evite l'affichage d'un 0 inutile sur l'Extranet - if ($dep == 0) { - $dep = ''; - } - - return array( - 'criteres' => array( - 'autreId' => $id, - 'dep' => $dep, - ), - 'info' => $strInfo, - 'nbReponses' => count($tabRet), - 'nbReponsesTotal' => $nbTot, - 'reponses' => $tabRet - ); - } - - /** - * Liste des établissements par Identifiant TEL/AUTRE - * @param string $typeId - * @param string $id - * @param int $deb - * @param int $nbRep - * @param int $maxRep - * @param int $dep - * @param int $actif - * @return array - */ - public function getEtablissementsParId($typeId, $id, $deb=0, $nbRep=20, $maxRep=200, $dep=0, $actif=2) - { - $this->setTabCodesNaf(); - $deb = $deb*1; - $dep = $dep*1; - - $nbRep = $nbRep*1; - $limit = "LIMIT $deb, $nbRep"; - - $filtreActif = ''; - if ($actif == 1 || $actif == 0) { - $filtreActif = " AND WHERE actif=$actif"; - } - - $fields = "'Etab' as Loc, e.id, e.source, e.source_id, e.triCode, e.autre_id, - LPAD(e.siren, 9, 0) AS siren, LPAD(e.nic, 5, 0) AS nic, e.siege, e.raisonSociale, - e.enseigne, e.sigle, LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, - e.adr_comp, LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, e.adr_dep, LPAD(e.adr_com,3,0) AS adr_com, - LPAD(e.tel,10,0) AS tel, LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep, - CONCAT(e.siren, e.nic) AS siret, e.actif, - IF (e.adr_dep=99, (SELECT libPays FROM jo.tabPays p WHERE p.codePaysInsee=e.adr_com) , 'France') AS libPays"; - - if ($typeId == 'TEL') { - if ($this->logger !== null) { - $this->logger->info("Recherche par TEL de $id avec un maximum de $nbRep réponses"); - } - try { - $stmt = $this->conn->executeQuery("SELECT count(*) AS nb FROM jo.etablissements - WHERE TEL=$id OR FAX=$id $filtreActif"); - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $nbTot = $result->nb; - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - try { - $stmt = $this->conn->executeQuery("SELECT $fields FROM jo.etablissements e - WHERE TEL=$id OR FAX=$id $filtreActif - ORDER BY e.siege DESC, e.actif DESC $limit"); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } elseif ($typeId == 'AUTRE') { - /** Formatage des numéros de RC **/ - $tabId = array($id); - if (preg_match('/(\d*)(\D)(\d*)/', $id, $matches)) { - if (strlen($matches[1])<=2) { - // Années du type 54 ou 07 - if ($matches[1] > date('y')) { - $deb = '19'.$matches[1]; - } else { - $deb = '20'.$matches[1]; - } - } - // Années du type 1900 ou 2000 - else { - $deb = substr($matches[1], 2, 2); - } - $numero = $matches[3]*1; - for ($i=strlen($numero); $i<=7; $i++) { - $tabId[] = $matches[1].$matches[2].sprintf('%0'.$i.'s', $numero); - $tabId[] = $deb.$matches[2].sprintf('%0'.$i.'s', $numero); - } - } - $strId = implode("','", $tabId); - - /** Gestion du numéro de département ou CP **/ - $strDep =''; - if ($dep > 0 && $dep < 99999) { - if ($dep < 96) { - $strDep = 'AND adr_cp BETWEEN '.$dep.'000 AND '.$dep.'999'; - } elseif ($dep > 9999) { - $strDep = "AND adr_cp BETWEEN $dep AND $dep"; - } else { - $strDep = 'AND adr_cp BETWEEN '.$dep.'00 AND '.$dep.'99'; - } - } - - try { - $stmt = $this->conn->executeQuery("SELECT count(*) AS nb FROM jo.etablissements - WHERE autre_id IN ('$strId') $filtreActif $strDep"); - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $nbTot = $result->nb; - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - try { - $stmt = $this->conn->executeQuery("SELECT $fields FROM jo.etablissements e - WHERE autre_id IN ('$strId') $filtreActif $strDep - ORDER BY siege DESC $limit"); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRet[] = array( - 'Localisation' => $row['Loc'], - 'id' => $row['id'], - 'Pertinence' => 100, - 'Source' => $row['source'], - 'SourceId' => $row['source_id'], - 'Siret' => $row['siret'], - 'Siege' => $row['siege'], - 'Nom' => $row['raisonSociale'], - 'Sigle' => $row['sigle'], - 'Enseigne' => $row['enseigne'], - 'Adresse' => trim(preg_replace('/ +/', ' ', trim($row['adr_num'] .' '. - $row['adr_btq'] .' '. $row['adr_typeVoie'] .' '. $row['adr_libVoie']))), - 'Adresse2' => trim(preg_replace('/ +/', ' ', $row['adr_comp'])), - 'CP' => $row['adr_cp'], - 'Ville' => $row['adr_ville'], - 'Pays' => ($row['adr_dep'] != 99 ? $row['libPays'] : 'France'), - 'Tel' => $row['tel'], - 'Fax' => $row['fax'], - 'FJ' => $row['cj'], - 'FJLib' => $this->getLibelleFJ($row['cj']), - 'Siren' => $row['siren'], - 'Nic' => $row['nic'], - 'Actif' => $row['actif'], - 'NafEtab' => $row['ape_etab'], // Etablissement - 'NafEnt' => $row['ape_entrep'], // Entreprise - 'NafEtabLib' => $this->getLibelleNaf($row['ape_etab']), - 'NafEntLib' => $this->getLibelleNaf($row['ape_entrep']), - ); - } - } - - // Evite l'affichage d'un 0 inutile sur l'Extranet - if ($dep == 0) { - $dep = ''; - } - - return array( - 'criteres' => array( - 'autreId' => $id, - 'dep' => $dep, - ), - 'nbReponses' => count($tabRet), - 'nbReponsesTotal' => $nbTot, - 'reponses' => $tabRet - ); - } - - /** - * Retourne juste si un siren existe - * - * @param integer $siren - * @return bool - */ - public function sirenExiste($siren) - { - $siren = $siren*1; - try { - $stmt = $this->conn->executeQuery("SELECT id FROM jo.etablissements WHERE siren=$siren LIMIT 0,1"); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmt->rowCount()) { - return true; - } - - return false; - } - - /** - * Retourne l'identité issue de la table établissements - * - * @param integer $siren - * @return bool - */ - public function getIdentiteLight($siren, $nic=0, $id=0) - { - $siren = $siren*1; - $nic = $nic*1; - $id = $id*1; - $limit = ''; //LIMIT O,1' ; - if ($id > 0 && $siren < 1000) { - $where = " id=$id "; - } elseif ($nic != 0) { - $where = " siren=$siren AND nic=$nic "; - } elseif ($siren != 0) { - $where=" siren=$siren "; - } else { - return array(); - } - - $tabRet = array(); - - try { - $stmt = $this->conn->executeQuery("SELECT e.id, e.source, e.source_id, e.autre_id, - LPAD(e.siren, 9, 0) as siren, LPAD(e.nic, 5, 0) as nic, e.siege, e.autre_id, e.triCode, - e.raisonSociale, e.enseigne, e.sigle, e.adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, - e.adr_comp, LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, LPAD(e.tel,10,0) AS tel, - LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep, e.adr_dep, - LPAD(e.adr_com,3,0) AS adr_com, e.capital, e.capitalDev, e.capitalSrc, e.tca, - e.teff_entrep, e.teff_etab, CONCAT(LPAD(e.siren,9,0), LPAD(e.nic,5,0)) as siret, - e.actif, e.identite_pre FROM jo.etablissements e - WHERE $where ORDER BY siege DESC, actif DESC, nic DESC $limit"); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($stmt->rowCount() > 0) { - $etab = $stmt->fetch(\PDO::FETCH_ASSOC); - $nom = trim($etab['raisonSociale']); - // Cas des noms vides à l'INSEE (une centaine) - if ($nom == '') { - $nom = preg_replace('/,.*$/', '', $etab['identite_pre']); - } - - $tabRet = array( - 'id' => $etab['id'], - 'Siret' => $etab['siret'], - 'Siege' => $etab['siege'], - 'Nom' => $nom, - 'Tribunal' => $etab['triCode'], - 'Sigle' => $etab['sigle'], - 'Enseigne' => $etab['enseigne'], - 'Adresse' => trim(preg_replace('/ +/', ' ', trim( - $etab['adr_num'] .' '. $etab['adr_btq'] .' '. - $etab['adr_typeVoie'] .' '. $etab['adr_libVoie']))), - 'Adresse2' => trim(preg_replace('/ +/', ' ', $etab['adr_comp'])), - 'AdresseNum' => $etab['adr_num'], - 'AdresseBtq' => $etab['adr_btq'], - 'AdresseVoie' => $etab['adr_typeVoie'], - 'AdresseRue' => $etab['adr_libVoie'], - 'CP' => $etab['adr_cp'], - 'Ville' => $etab['adr_ville'], - 'Tel' => $etab['tel'], - 'Fax' => $etab['fax'], - 'FJ' => $etab['cj'], - 'FJ_lib' => $this->getLibelleFJ($etab['cj']), - 'Siren' => $etab['siren'], - 'Nic' => $etab['nic'], - 'Actif' => $etab['actif'], - 'NafEtab' => $etab['ape_etab'], - 'NafEnt' => $etab['ape_entrep'], - 'NafEntLib' => $this->getLibelleNaf($etab['ape_entrep']), - 'NafEtabLib' => $this->getLibelleNaf($etab['ape_etab']), - 'AutreId' => $etab['autre_id'], - 'Source' => $etab['source'], - 'SourceId' => $etab['source_id'], - 'Dept' => $etab['adr_dep'], - 'codeCommune' => $etab['adr_com'], - 'Capital' => $etab['capital'], - 'CapitalDev' => $etab['capitalDev'], - 'TrancheCA' => $etab['tca'], - 'TrancheCALib' => self::$tabTCA[$etab['tca']], - 'EffEnTr' => $etab['teff_entrep'], - 'EffEnTrLib' => self::$tabEffectif[$etab['teff_entrep']], - 'EffEtTr' => $etab['teff_etab'], - 'EffEtTrLib' => self::$tabEffectif[$etab['teff_etab']], - ); - } - - return $tabRet; - } - - /** - * Retourne la liste des devise - * - * @param string $codeDevise Code ISO devise - * @return Devise ou liste des devises (si pas de code ISO en entrée) - */ - public function getDevises($codeIso = '') - { - $tabRet = array(); - if (trim($codeIso) != '') { - $strWhere = "devIso='$codeIso'"; - } else { - $strWhere = '1'; - } - try { - $stmt = $this->conn->executeQuery("SELECT devIso, devNom FROM jo.tabDevises WHERE $strWhere"); - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_OBJ)) { - $tabRet[$row->devIso] = $row->devNom; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $tabRet; - } - - /** - * Retourne la liste des mandataires/administrateurs/oppositions d'une ou plusieurs cours d'appel - * - * @param array $arrIdCA Id S&D de la cour d'appel - * @param bool $condense Par défaut retourne un tableau concatenant Nom, prenom, adresse complète - * @param array $type Type d'opposition. Ex array('A','M') pour Admin/Mandataires. Autres: a'V'ocat,'H'uissier,'N'otaire - * @return Liste des Mandataires/Administrateurs de la cours d'appel - */ - public function getMandataires($arrIdCA=array(), $condense=true, $type=array()) - { - if (count($arrIdCA) > 0) { - $strIdCA = 'AND ( coursAppel in ('.implode(',', $arrIdCA).') OR coursAppel2 in ('.implode(',', $arrIdCA).') )'; - } else { - $strIdCA = ''; - } - - if (count($type) > 0) { - $strType = "AND type in ('".implode("','", $type)."') "; - } else { - $strType = ''; - } - - if (!$condense) { - $fields = 'id,sirenGrp,sirenMand,Nom,Prenom,type,tribunal,Statut,adresse,adresseComp,cp,ville,tel,fax,email,web,contact'; - } else { - $fields = "id, CONCAT(Nom,' ',Prenom,' ',adresse,' ',adresseComp,' ',cp,' ',ville) as Mand"; - } - try { - $stmt = $this->conn->executeQuery("SELECT $fields FROM jo.tabMandataires WHERE 1 $strIdCA $strType ORDER BY sirenGrp"); - if ($stmt->rowCount() > 0) { - if (!$condense) { - return $stmt->fetchAll(\PDO::FETCH_ASSOC); - } else { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRet[$row['id']] = preg_replace('/ +/', ' ', $row['Mand']); - } - return $tabRet; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return array(); - } - - /** - * Retourne la liste des mandataires/administrateurs/oppositions correspondant à un nom - * - * @param string $nom Nom du mandataire - * @param bool $condense Par défaut retourne un tableau concatenant Nom, prenom, adresse complète - * @param array $type Type d'opposition. Ex array('A','M') pour Admin/Mandataires. Autres: a'V'ocat,'H'uissier,'N'otaire - * @return Liste des Mandataires/Administrateurs de la cours d'appel - */ - public function searchMandataires($nom, $condense=true, $type=array(), $cpDep=0) - { - $strIdCA="AND (Nom LIKE '%$nom%' OR Prenom LIKE '%$nom%') "; - - if (count($type) > 0) { - $strType="AND type in ('".implode("','", $type)."') "; - } else { - $strType=''; - } - - if ($cpDep > 0 && $cpDep < 100) { - $strCp = "AND cp BETWEEN $cpDep"."000 AND $cpDep"."999 "; - } elseif ($cpDep > 99 && $cpDep < 1000) { - $strCp = "AND cp BETWEEN $cpDep"."00 AND $cpDep"."99 "; - } elseif ($cpDep > 999) { - $strCp = "AND cp=$cpDep "; - } else { - $strCp =''; - } - - if (!$condense) { - $fields = 'id,sirenGrp,sirenMand,Nom,Prenom,type,tribunal,Statut,adresse,adresseComp,cp,ville,tel,fax,email,web,contact'; - } else { - $fields = "id, CONCAT(Nom,' ',Prenom,' ',adresse,' ',adresseComp,' ',cp,' ',ville) as Mand"; - } - - try { - $stmt = $this->conn->executeQuery("SELECT $fields FROM jo.tabMandataires WHERE 1 $strIdCA $strType $strCp ORDER BY sirenGrp"); - if ($stmt->rowCount() > 0) { - if (!$condense) { - return $stmt->fetchAll(\PDO::FETCH_ASSOC); - } else { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRet[$row['id']] = preg_replace('/ +/', ' ', $row['Mand']); - } - return $tabRet; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $tabRet; - } - - /** - * Récupère les informations du mandataire - * - * @param integer $idMand Identifiant SD du mandataire - * @return array - */ - public function getMandataire($idMand) - { - $fields = 'id,sirenGrp,sirenMand,Nom,Prenom,type,coursAppel,coursAppel2,tribunal,Statut,stagiaire,adresse,adresseComp,cp,ville,tel,fax,email,web,contact'; - try { - $stmt = $this->conn->executeQuery("SELECT $fields FROM jo.tabMandataires WHERE id=$idMand"); - if ($stmt->rowCount() > 0) { - return $stmt->fetch(\PDO::FETCH_ASSOC); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return array(); - } - - - public function getHuissiers($arrIdCA=array(), $condense=true) - { - if (count($arrIdCA)>0) { - $strIdCA = "AND tribunal in ('".implode("','", $arrIdCA)."')"; - } else { - $strIdCA = ''; - } - if (!$condense) { - $fields = 'id,sirenGrp,sirenMand,Nom,Prenom,type,tribunal,Statut,adresse,adresseComp,cp,ville,tel,fax,email,web,contact'; - } else { - $fields = "id, CONCAT(Nom,' ',Prenom,' ',adresse,' ',adresseComp,' ',cp,' ',ville) as Mand"; - } - - try { - $stmt = $this->conn->executeQuery("SELECT $fields FROM jo.tabMandataires WHERE 1 AND type='H' $strIdCA ORDER BY sirenGrp"); - if ($stmt->rowCount()) { - if (!$condense) { - return $stmt->fetchAll(\PDO::FETCH_ASSOC); - } else { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRet[$row['id']] = preg_replace('/ +/', ' ', $row['Mand']); - } - return $tabRet; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $tabRet; - } - - /** - * Retourne l'identite Textuelle d'un mandataires/administrateurs - * - * @param integer $idMand Id S&d du mandataire - * @return string Mandataire - */ - public function getMandatairesParId($idMand) - { - if ($idMand > 0) { - try { - $stmt = $this->conn->executeQuery("SELECT CONCAT(Nom,' ',Prenom,' ',adresse,' ',adresseComp,' ',cp,' ',ville) as Mand - FROM jo.tabMandataires WHERE id=$idMand"); - if ($stmt->rowCount()) { - return $stmt->fetch(\PDO::FETCH_ASSOC); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - return ''; - } - - /** - * - * @param unknown $siren - * @param number $nic - * @param number $id - * @return boolean|Ambigous - */ - public function getNaf4($siren, $nic=0, $id=0) - { - $tabRet = array(); - $siren = $siren*1; - $nic = $nic*1; - $id = $id*1; - if ($siren == 0) { - return false; - } - if ($nic != 0) { - $where = "siren=$siren AND nic=$nic "; - } else { - $where = "siren=$siren AND siege=1 "; - } - - try { - $stmt = $this->conn->executeQuery("SELECT siren, nic, apen5, apen4, apet5, apet4 FROM insee.bascule WHERE $where"); - if ($stmt->rowCount() == 0) { - return false; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - $tabRet = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabRet['apen4_lib'] = $this->getLibelleNaf($tabRet['apen4']); - $tabRet['apet4_lib'] = $this->getLibelleNaf($tabRet['apet4']); - - return $tabRet; - } - - public function getIdentiteEntrepriseHisto($siren) - { - $notices = array( - // Date AAAAMMJJ => Nom table - 20080401 => 'notice_200804', - 20080501 => 'notice_200805stats', - 20081201 => 'notice_200812', - 20090901 => 'notice_200909', - 20091001 => 'notice_200910', - 20091201 => 'notice_200912', - 20100301 => 'notice_201003', - 20100601 => 'notice_201006', - 20100901 => 'notice_201009', - 20101201 => 'notice_201012', - 20110301 => 'notice_201103', - 20110601 => 'notice_201106', - 20110901 => 'notice_201109', - 20111201 => 'notice_201112', - 20120301 => 'notice_201203', - 20120601 => 'notice_201206', - 20120901 => 'notice_201209', - 20121201 => 'notice_201212', - 20131201 => 'fichier_france_entiere_201312_D_1', - 20140101 => 'fichier_france_entiere_201401_D_1', - 20140601 => 'fichier_france_entiere_201406_D_1', - 20140901 => 'fichier_france_entiere_201409_D_1', - 20141201 => 'fichier_france_entiere_201412_D_1', - 20150301 => 'fichier_france_entiere_201503_D_1', - ); - - $identite = array(); - - if ($this->companyEvenDateStop === null) { - $date = date('Ymd'); - } else { - $date = $this->companyEvenDateStop; - } - - $sql = "SELECT CONCAT(LPAD(e.insSIREN,9,0), LPAD(e.insNIC,5,0)) AS Siret, - LPAD(e.insSIREN,9,0) AS Siren, - LPAD(e.insNIC,5,0) AS Nic, - e.insSIEGE AS Siege, - e.insNOMEN AS Nom, - e.insCODPOS AS CP, - e.insCJ AS FJ, - e.insAPEN700 AS NafEnt, - e.insAPEN700 AS NafEtab, - e.insTEFEN AS EffEnTr, - e.insEFENCENT AS Effectif, - e.insDCRET AS DateCreaEt, - e.insDCREN AS DateCreaEn, - e.insEVE, - i.insRECME AS RECME - FROM insee.insee_even e - LEFT OUTER JOIN insee.insee_notices i ON (i.insSIREN=e.insSIREN AND i.insNIC=e.insNIC) - WHERE e.insSIREN=:siren AND idFlux<:date ORDER BY idFlux DESC, insSIEGE DESC LIMIT 0,1"; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('siren', $siren); - $stmt->bindValue('date', $date); - $stmt->execute(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($stmt->rowCount() > 0) { - $identite = $stmt->fetch(\PDO::FETCH_ASSOC); - } - // --- Recherche dans le stock - else { - $notices = array_reverse($notices, true); - foreach ($notices as $noticeDate => $notice) { - if ($date > $noticeDate) { - break; - } - } - - $sql = "SELECT CONCAT(LPAD(e.SIREN,9,0), LPAD(e.NIC,5,0)) AS Siret, - LPAD(e.SIREN,9,0) AS Siren, - LPAD(e.NIC,5,0) AS Nic, - e.SIEGE AS Siege, - e.NOMEN_LONG AS Nom, - e.CODPOS AS CP, - e.CJ AS FJ, - e.APEN700 AS NafEnt, - e.APEN700 AS NafEtab, - e.TEFEN AS EffEnTr, - e.EFENCENT AS Effectif, - e.DCRET AS DateCreaEt, - insDCREN AS DateCreaEn - i.insRECME AS RECME - FROM insee.$notice e - LEFT OUTER JOIN insee.insee_notices i ON (i.insSIREN=e.SIREN AND i.insNIC=e.NIC) - WHERE e.insSIREN=:siren AND idFlux<:date ORDER BY idFlux DESC, insSIEGE DESC LIMIT 0,1"; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('siren', $siren); - $stmt->bindValue('date', $date); - $stmt->execute(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($stmt->rowCount() > 0) { - $identite = $stmt->fetch(\PDO::FETCH_ASSOC); - } - } - if (count($identite) > 0) { - // --- Actif - $identite['Actif'] = 1; - if (array_key_exists('insEVE', $identite)) { - if (in_array($identite['insEVE'], array( - 'M0F', // Fermeture de l'entreprise - 'FF', // Fermeture de l'entreprise - '400', // Suppression d'un double - '410', // Cessation juridique de l'entreprise - '420', // Absence d'activité de l'entreprise (cessation économique de l'entreprise) - 'SC', // Suppression par le calage - 'SU', // Cessation juridique - 'SS', // Fermeture (ou désactivation) siège - 'RI', // Refus d'inscription du SIREN au RCS - ))) { - $identite['Actif'] = 0; - } - } - - // --- Capital - $sql = "SELECT valeur FROM jo.rncs_modifs - WHERE champs='capitalMontant' AND siren=:siren AND flux<:date - ORDER BY flux DESC LIMIT 0,1"; - try { - $stmt = $this->conn->prepare($sql); - $stmt->bindValue('siren', $siren); - $stmt->bindValue('date', $date); - $stmt->execute(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - $identite['Capital'] = ''; - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $identite['Capital'] = $result->valeur; - } - - // --- Situation Juridique - $identite['SituationJuridique'] = ''; - $tabProcol = $this->getAnnoncesLegales($siren, 0, 'P', false); - if (count($tabProcol) > 0) { - $tabDates = array(); - foreach ($tabProcol as $iProcol => $procol) { - $tabDates[] = $procol['dateJugement']; - } - rsort($tabDates); - $dateProcol = str_replace('-', '', $tabDates[0])*1; - if ($this->dureePlan > 0 && date('Ymd') < $this->finPlan) { - $identite['SituationJuridique'] = 'PL'; - } - // Plan révolu - elseif ($this->dureePlan > 0 && date('Ymd') >= $this->finPlan) { - $identite['SituationJuridique'] = ''; - } - // Appel de jugement - elseif ($this->appelJugement) { - $identite['SituationJuridique'] = 'PA'; - } - // En cours de procédure - else { - $identite['SituationJuridique'] = 'P'; - } - } - // Absorption - elseif (count($this->getAnnoncesLegales($siren, 0, 'A', false)) > 0) { - $identite['SituationJuridique'] = 'A'; - } - // Dissolution - elseif (count($this->getAnnoncesLegales($siren, 0, 'D', false)) > 0) { - $identite['SituationJuridique'] = 'D'; - } - // Fin Situation Juridique - - return $identite; - } - - return false; - } - - /** - * - * @param string $siren - * @param int $nic - * @param int $id - * @param string $forceVerif - * @param string $accesDist - * @return array - */ - public function getIdentiteEntreprise($siren, $nic=0, $id=0, $forceVerif=false, $accesDist=true) - { - if ($this->debugtime) { - $timer = array('debutIdentite'=>microtime(true)); - $tdebIni = microtime(1); - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;getIdentiteEntreprise Début ---\n", FILE_APPEND); - } - - $siren = $siren*1; - $nic = $nic*1; - $id = $id*1; - $limit = ''; - - // Liste des établissements - if ($id > 0 && $siren < 1000) { - $where = " id=$id "; - } elseif ($nic != 0) { - $where = " siren=$siren AND nic=$nic "; - } elseif ($siren != 0) { - $where = " siren=$siren "; - } - try { - $stmt = $this->conn->executeQuery("SELECT e.id, e.source, e.source_id, e.triCode, e.autre_id, LPAD(e.siren,9,0) as siren, LPAD(e.nic,5,0) as nic, e.siege, e.autre_id, - e.raisonSociale, e.enseigne, e.sigle, LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, - e.adr_comp, LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, LPAD(e.tel,10,0) AS tel, LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep, - e.capital, e.capitalDev, e.capitalSrc, CONCAT(e.siren, e.nic) as siret, e.actif, - e.age_entrep, e.age_etab, e.tca, e.tcaexp, e.teff_entrep, e.teff_etab FROM jo.etablissements e - WHERE $where ORDER BY siege DESC, actif DESC, nic DESC $limit"); - $nbEtab = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($nbEtab > 0) { - $etab = $stmt->fetch(\PDO::FETCH_ASSOC); - $nic = $etab['nic']; - } - $timer['tableEtablissements'] = microtime(true); - - // Si aucun résultat et siren est valide, on part chez Infogreffe - if ($accesDist && $nbEtab == 0 && $this->valideSiren($siren)) { - $iGeffes = new Metier_Partenaires_MGreffes(); - $etabG = $iGeffes->getIdentite($siren); - if ($etabG) { - $adr = $this->structureVoie($etabG['Adresse']); - // Date de dernière MAJ - $lastMaj = str_replace('-', '', $etabG['DateRadiation'])*1; - if (str_replace('-', '', $etabG['DateCreation'])*1 > $lastMaj) { - $lastMaj = str_replace('-', '', $etabG['DateCreation'])*1; - } - if (str_replace('-', '', $etabG['DateUpdate'])*1 > $lastMaj) { - $lastMaj = str_replace('-', '', $etabG['DateUpdate'])*1; - } - - $etab = array( - 'id' => $etabG['id'], - 'siret' => $etabG['Siret'], - 'siege' => $etabG['Siege'], - 'raisonSociale' => $etabG['Nom'], - 'sigle' => $etabG['Sigle'], - 'enseigne' => $etabG['Enseigne'], - 'Adresse' => $etabG['Adresse'], - 'adr_comp' => $etabG['Adresse2'], - 'adr_num' => $adr['num'], - 'adr_btq' => $adr['adr_btq'], - 'adr_typeVoie' => $adr['typeVoie'], - 'adr_libVoie' => $adr['libVoie'], - 'adr_dep' => substr($etabG['CP'], 0, 2), - 'adr_cp' => $etabG['CP'], - 'adr_ville' => $etabG['Ville'], - 'tel' => $etabG['Tel'], - 'fax' => $etabG['Fax'], - 'cj' => $etabG['FJ'], - 'siren' => $etabG['Siren'], - 'nic' => $etabG['Nic'], - 'actif' => $etabG['Actif'], - 'ape_etab' => $etabG['NafEtab'], - 'ape_entrep' => $etabG['NafEnt'], - 'autre_id' => $etabG['NumRC'], - 'dateMAJ' => Metier_Util_Date::dateT('Ymd', 'Y-m-d', $lastMaj), - ); - } - $timer['accesInfogreffeCarInconnu'] = microtime(true); - } - - // Informations locales issues de la table infos_entrep - if ($siren > 100) { - try { - $stmt = $this->conn->executeQuery("SELECT raisonSociale, isin, nscrl, tel, fax, web, mail, - latitude, longitude, precis, dateCreation, dateFermeture, naf, naf_lib, ca, effectif, - nbEtab, activite, LPAD(sirenDoublon,9,'0') AS sirenDoublon, waldec FROM jo.infos_entrep WHERE siren=$siren"); - if ($stmt->rowCount() > 0) { - $tab = $stmt->fetch(\PDO::FETCH_ASSOC); - $waldec = $tab['waldec']; - if (!array_key_exists('sirenDoublon', $tab)) { - $stmt = $this->conn->executeQuery("SELECT LPAD(siren,9,'0') AS sirenDoublon FROM jo.infos_entrep WHERE sirenDoublon=$siren"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $tab['sirenDoublon'] = $result->sirenDoublon; - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - try { - $stmt = $this->conn->executeQuery("SELECT CONCAT(LPAD(SIREN,9,0), LPAD(NIC,5,0)) AS siret - FROM jo.etablissements - WHERE SIREN=$siren AND SIEGE=1 ORDER BY ACTIF%10 DESC, NIC DESC"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $siretSiege = $result->siret; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - $timer['infosEntrep'] = microtime(true); - } - - // Informations INSEE - $moisNonDiff = 0; - if ($siren > 100) { - if ($nic > 0) { - $strNic = "AND NIC=$nic"; - } else { - $strNic = "AND NIC<100000 AND SIEGE=1"; - } - try { - $stmt = $this->conn->executeQuery("SELECT ACTIF%10 AS ACTIF, actifEco%10 AS actifEco, - NOM, NOM2, SIGLE, ENSEIGNE, ADR_NUMVOIE, ADR_BTQ, ADR_TYPVOIE, ADR_LIBVOIE, - ADR_LIBCOM, ADR_CP, ADR_COMP, ADR_DISTSP, PAYS, TRIM(LEADING '0' FROM DCREN) AS DCREN, - SIEGE, AUXILT, SAISONAT, CJ, CIVILITE, NBETAB, APE_ENT, APE_ETAB, PROCOL, PROCOL_TYPE, - PROCOL_DATE, CAPITAL, EFF_ENT, NUMRC, TEL, FAX, DIR_FCT, DIR_IDEN, DIR_DATEN, - DIR_LIEUN, CAPITAL_DATE, CAPITAL_DEV, TRIM(LEADING '0' FROM DCRET) AS DCRET, - TEFF_ENT, ADR_DEP, LPAD(ADR_COM,3,0) AS ADR_COM, TCA, TCAEXP, EFF_ET, TEFF_ET, - CODEVOIE, DATE_MAJ, APRM, ACTIVNAT, ORIGINE, MODET, EXPLET, LIEUACT, ACTISURF, DEFET, - MODEN, PRODPART, EXPLEN, MONOREG, REGIMP, MONOACT, DEFEN, DEFET, IDENTITE_PRE, - insL1_NOMEN, insL2_COMP, insL3_CADR, insL4_VOIE, insL5_DISP, insL6_POST, insL7_ETRG, - dateMajRNVP, insCATEGORIE, insIND_PUBLIPO, RPET, ARRONET, CTONET, DU, TU, UU, TCD, - ZEMET, ESAANN, ESAAPEN, DREACTET, AMINTRET, DREACTEN, AMINTREN, NOMEN_LONG, CEDEX, - EPCI, NOM_COM, NATETAB, PRODET, PRODEN, hexavia - FROM insee.identite WHERE SIREN=$siren $strNic ORDER BY SIEGE DESC, ACTIF DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $tabInsee = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabNotice = $this->getInfosNotice($siren, $nic); - $tabInsee['TCA_AN'] = $tabNotice['insEAEANT']; - $tabInsee['RECME'] = $tabNotice['insRECME']; - // On force l'indicateur "actifEco" à 0 si l'établissement est juridiquement inactif - if ($tabInsee['ACTIF']*1 == 0) { - $tabInsee['actifEco'] = 0; - } - if (trim($tabInsee['CODEVOIE'])=='') { - $codeCommune = $tabInsee['ADR_DEP'].sprintf("%03s", $tabInsee['ADR_COM']); - $tabInsee['CODEVOIE'] = $this->getCodeVoieRivoli($codeCommune, $tabInsee['ADR_TYPVOIE'], $tabInsee['ADR_LIBVOIE']); - } - } - // Siren absent de l'Insee - else { - $tabInsee = array( - 'CIVILITE' => 0, - 'NBETAB' => 1, - 'TEL' => $etab['tel'], - 'FAX' => $etab['fax'], - 'Web' => '', - 'Mail' => '', - 'CJ' => $etab['cj'], - 'CJ_lib' => $this->getLibelleFJ($etab['cj']), - 'ACTIF' => $etab['actif'], - 'APE_ETAB' => $etab['ape_etab'] ? $etab['ape_etab'] : $etab['ape_entrep'], - 'APE_ENT' => $etab['ape_entrep'] ? $etab['ape_entrep'] : $etab['ape_etab'], - 'CAPITAL' => $etab['capital'], - 'CAPITAL_DEV' => $etab['capitalDev'], - 'ADR_DEP' => $etab['adr_dep'], - 'TEFF_ENT' => $etab['teff_entrep'], - 'DEFEN' => '', - 'TEFF_ET' => $etab['teff_etab'], - 'DEFET' => '', - 'TCA' => $etab['tca'], - 'TCA_AN' => '', - 'TCAEXP' => $etab['tcaexp'], - ); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - // Nombre d'etablissements - $nbEtab = 0; - try { - $stmt = $this->conn->executeQuery("SELECT count(*) AS nbEtabs FROM jo.etablissements - WHERE siren=$siren AND NIC<100000 AND ACTIF%10=1"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $nbEtab = $result->nbEtabs; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - try { - $stmt = $this->conn->executeQuery("SELECT mois FROM insee.insee_nondiff - WHERE siren=$siren"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $moisNonDiff = $result->mois; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - $timer['tableIdentite'] = microtime(true); - } - // Default - else { - $tabInsee = array( - 'CIVILITE' => 0, - 'NBETAB' => 1, - 'TEL' => $etab['tel'], - 'FAX' => $etab['fax'], - 'Web' => '', - 'Mail' => '', - 'CJ' => $etab['cj'], - 'CJ_lib' => $this->getLibelleFJ($etab['cj']), - 'ACTIF' => $etab['actif'], - 'APE_ETAB' => $etab['ape_etab'] ? $etab['ape_etab'] : $etab['ape_entrep'], - 'APE_ENT' => $etab['ape_entrep'] ? $etab['ape_entrep'] : $etab['ape_etab'], - 'CAPITAL' => '', - 'CAPITAL_DEV' => '', - 'ADR_DEP' => $etab['adr_dep'], - ); - $nbEtab = 'N/C'; - } - - // Complement Identitaire - if (intval($siren) > 100 && count($info)==0) { - $idComp = $this->getIdentitePart($siren, $etab['raisonSociale'], $etab['enseigne'], $etab['sigle'], 0, $accesDist); - $tab = $idComp; - $timer['getIdentitePart']=microtime(true); - } - - // Géocodage de l'adresse - $mMap = new Metier_Partenaires_MMap(); - $mMap->geoCodeAdresse($etab['adr_num'], '', $etab['adr_typeVoie'], $this->getCodeVoie($etab['adr_typeVoie']), - $etab['adr_libVoie'], $etab['adr_cp'], $etab['adr_ville'], 'France', - trim($tabInsee['ADR_DEP'].$tabInsee['ADR_COM'].$tabInsee['CODEVOIE'])); - $tab['latitude'] = $mMap->latitudeDec; - $tab['longitude'] = $mMap->longitudeDec; - $tab['altitude'] = $mMap->altitude; - $tab['precis'] = $mMap->precision; - $timer['geoCodage'] = microtime(true); - - // Accès provisoire à AMABIS - $repAmabis = array(); - if ($accesDist) { - if ($this->debugtime) { - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;MAmabis Avant\n", FILE_APPEND); - $tdeb = microtime(1); - } - - $iAmabis = new Metier_Partenaires_MAmabis(); - $repAmabis = $iAmabis->getZonage($etab['adr_num'], $etab['adr_btq'], $etab['adr_typeVoie'], $etab['adr_libVoie'], - $etab['adr_cp'], $etab['adr_ville'], trim($tabInsee['ADR_DEP'].$tabInsee['ADR_COM'].$tabInsee['CODEVOIE']), - false, 'TEST', false); - $duree = round(microtime(1)-$tdeb, 3); - - if ($this->debugtime) { - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;MAmabis APRES ($duree s)\n", FILE_APPEND); - $timer['zonesPrioritaires'] = microtime(true); - } - } - - // N° de TVA Intracommunautaire - $vatNumber = 'FR00000000000'; - $vatDefined = false; - if (intval($siren) > 100) { - if ($this->debugtime) { - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;MTva Avant\n", FILE_APPEND); - $tdeb = microtime(1); - } - - $iTva = new Metier_Partenaires_MTva(); - $iTva->setCompanyId($siren); - if ($tabInsee['ACTIF']==1 && (date('H')<10 || date('H')>=18)) { - $iTva->setRemote(); - } - $iTva->getTVA(); - $vatNumber = $iTva->vatNumber; - $vatDefined = $iTva->vatDefined; - - if ($this->debugtime) { - $duree=round(microtime(1)-$tdeb, 3); - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;MTva APRES ($duree s)\n", FILE_APPEND); - $timer['tvaIntra']=microtime(true); - } - } - - $nom = trim($etab['raisonSociale']); - if ($nom=='') { - $nom = preg_replace('/,.*$/', '', $tabInsee['IDENTITE_PRE']); - } - $nom2 = $tel = $fax = ''; - if (strtoupper(trim($tabInsee['NOM2'])) != strtoupper(trim($etab['sigle']))) { - $nom2 = trim($tabInsee['NOM2']); - } - - if (trim($tab['tel']) != '') { - $tel = trim($tab['tel']); - } elseif ($tabInsee['TEL'] != '') { - $tel = implode('.', str_split($tabInsee['TEL'], 2)); - } - - if (trim($tab['fax']) != '') { - $fax = trim($tab['fax']); - } elseif ($tabInsee['FAX'] != '') { - $fax = implode('.', str_split($tabInsee['FAX'], 2)); - } - - if (intval($siren) > 0) { - if ($this->debugtime) { - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;MTel Avant\n", FILE_APPEND); - $tdeb = microtime(1); - } - - $iTel = new Metier_Partenaires_MTel(); - $tmp = $iTel->getTel($siren, $nic, true, 1); - - if ($this->debugtime) { - $duree = round(microtime(1)-$tdeb, 3); - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;MTel APRES ($duree s)\n", FILE_APPEND); - } - - $activitePJ_An8 = ''; - foreach ($tmp as $tmp2) { - if ($tmp2['typeTel']=='tel' && ($tel == '' || $tel == trim($tab['tel']))) { - $tel = implode('.', str_split($tmp2['telephone'], 2)); - } - if ($tmp2['typeTel']=='fax' && ($fax == '' || $fax == trim($tab['fax']))) { - $fax = implode('.', str_split($tmp2['telephone'], 2)); - } - if ($tmp2['typeTel'] ==' web' && $tab['web'] == '') { - $tab['web'] = $tmp2['infoTel']; - } - if ($tmp2['typeTel'] == 'mail' && $tab['mail'] == '') { - $tab['mail'] = $tmp2['infoTel']; - } - if ($tmp2['typeTel'] == 'an8') { - $activitePJ_An8 = $tmp2['infoTel']; - } - } - $timer['telFax']=microtime(true); - } - - /** - * Type d'exploitation - * 0 : N/C - * 1 : Locataire d'un fond de commerce - * 2 : Loueur d'un fond de commerce - * 3 : Prestataire de personnel - * 10: Exploitation directe - * 11: Sans activité ??? - */ - $typeExploitation=0; - if (intval($siren) > 100 - && strtoupper($tabInsee['EXPLET']) == 'O' || trim($tabInsee['EXPLET']) == '') { - switch ($tabInsee['PRODPART']*1) { - // Locataire d'un fond de commerce - case 1: - $tabAnn2 = $this->getAnnoncesLegales($siren, 0, array(5700)); - if (count($tabAnn2) > 0) { - $typeExploitation = 0; - } else { - $typeExploitation = 1; - } - break; - case 2: // Loueur d'un fond de commerce - case 3: // Prestataire de personnel - $typeExploitation = $tabInsee['PRODPART']*1; - break; - default: - if (!($tabInsee['CJ'] >= 7000 && $tabInsee['CJ'] < 8000) - && !($tabInsee['CJ'] >= 9000 && $tabInsee['CJ'] < 10000)) { - if ($tabInsee['ORIGINE']*1 == 6) { // Prise en location-gérance - $typeExploitation = 1; // Locataire d'un fond de commerce - } elseif ($tabInsee['ORIGINE']*1 == 1 || // Création pure - $tabInsee['ORIGINE']*1 == 3 || // Achat - $tabInsee['ORIGINE']*1 == 4) { // Apport - /* - '2'=>'Réinstallation après transfert', - '5'=>'Reprise au conjoint ou apport reçu', - - '7'=>'Partage', - '8'=>'Reprise', - '9'=>'Autre modalité d\'acquisition', - 'A'=>'Reprise globale d\'une exploitation agricole', - 'B'=>'Poursuite de l\'exploitation agricole par le conjoint', - 'C'=>'Transfert de propriété d\'une exploitation agricole', - 'D'=>'Apport d\'exploitation(s) agricole(s) individuelle(s)', - 'E'=>'Reprise totale ou partielle d\'exploitation individuelle', - */ - $typeExploitation = 10; - } elseif ($nbEtab < 2) { - $tabAnn = $this->getAnnoncesLegales($siren, 0, 'L'); - if (count($tabAnn) > 0) { - if ($tabAnn[0]['DateParution' ] > $tabInsee['DCRET'] - && ($tabAnn[0]['Departement'] == $tabInsee['ADR_DEP'] - || $tabAnn[0]['Departement'] == substr(''.$tabInsee['ADR_DEP'].''.$tabInsee['ADR_COM'], 0, 3)*1)) { - $typeExploitation = 1; // Locataire d'un fond de commerce - } - } elseif (count($this->getAnnoncesLegales($siren, 0, 'G')) > 0) { - $typeExploitation = 2; // Loueur d'un fond de commerce - } - } elseif ($tabInsee['ORIGINE']*1 != 0 - && $tabInsee['ORIGINE']*1 != 8 - && $tabInsee['ORIGINE']*1 != 9 - && $tabInsee['ORIGINE'] != 'NR') { - $typeExploitation = 10; // Exploitation directe - } - } - break; - } - } - $timer['typeExploitation'] = microtime(true); - - // Recherche de prédécesseur ou successeur - if (intval($siren) > 100) { - $tabAssoc = $this->getSiretAssoc($siren, $nic); - if (count($tabAssoc)>0) { - if (isset($tabAssoc['pre'])) { - // Il y a un prédécesseur - if ($tabInsee['ORIGINE']*1==0 || - $tabInsee['ORIGINE']*1==1 || - $tabInsee['ORIGINE']*1==9 || - $tabInsee['ORIGINE']=='NR') { - $tabInsee['ORIGINE']=2; - } // Transfert - } - } - } - $timer['siretPrecSuivant'] = microtime(true); - - // Code Pays - $codePaysIso2 = 'FR'; - if ($tabInsee['ADR_DEP'] > 98) { - $codePaysInsee = $tabInsee['ADR_COM']; - try { - $stmt = $this->conn->executeQuery("SELECT j.codPays, j.numPays, j.codPays3, j.codePaysInpi, - j.libPays, i.LIBCOG, i.ACTUAL FROM jo.tabPays j, insee.insee_tabPays i - WHERE j.codePaysInsee=$codePaysInsee AND j.codePaysInsee=substring( i.COG, 3, 3 ) - AND i.ACTUAL IN (1,4) AND j.numPays is NOT NULL"); - if ($stmt->rowCount() == 1) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $codePaysIso2 = $result->codPays; - } elseif ($stmt->rowCount() > 1) { - $codePaysIso2 = ''; - while ($result = $stmt->fetch(\PDO::FETCH_ASSOC)) { - if (trim(preg_replace('/[^A-Z]/', '', strtoupper(strtr($result['libPays'], - 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝ', - "aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUY")))) == trim(preg_replace('/[^A-Z]/', '', strtoupper($result['LIBCOG'])))) { - $codePaysIso2 = $result['codPays']; - break; - } - } - // Exception lié à anomalies de données INSEE - if ($codePaysIso2 == '' && $codePaysInsee == 237) { - $codePaysIso2 = 'KR'; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - $timer['codePays'] = microtime(true); - - $tabIris = $this->getInfosIris($tabInsee['ADR_DEP'].$tabInsee['ADR_COM'], substr($tabInsee['CODEVOIE'], 0, 4), - $etab['adr_num'], $etab['adr_btq'], $etab['adr_typeVoie'], $etab['adr_libVoie']); - // On récupere le code Rivoli s'il est absent de SIRENE (cf. doc Sirene) - if ($tabInsee['CODEVOIE']=='' && count($tabIris) > 0) { - $tabInsee['CODEVOIE'] = $tabIris['rivoli']; - } - $timer['codeIris'] = microtime(true); - - // Est-ce un ancien établissement siège ? - $ancienSiege=false; - $dateFinSiege=0; - if (intval($siren) > 100) { - if ($etab['siege']==0 || ($etab['siege']==1 && $tabInsee['ACTIF']==0)) { - $dateFinSiege = $this->isAncienSiege($siren, $nic); - if ($dateFinSiege > 19000101) { - $ancienSiege=true; - } - } - } - $timer['ancienSiege']=microtime(true); - - $tabInsee['actifEcoDate']=''; - $tabInsee['actifEcoType']=''; - - if (intval($siren) > 100 && $tabInsee['ACTIF']*1 == 1 && $tabInsee['actifEco']*1 == 0) { - // L'établissement est actif juridiquement à l'INSEE mais sans activité économique - $stmt = $this->conn->executeQuery("SELECT insEVE, IF(insDATEVE=0, idFlux*1, insDATEVE) AS insDATEVE - FROM insee.insee_even WHERE insSIREN=$siren AND insNIC=$nic - AND insEVE IN ('OD','TD','MPF','MNP','420','425','620','621','650') ORDER BY insDATEVE DESC"); - if ($stmt->rowCount() > 0) { - $tabModif = $stmt->fetch(\PDO::FETCH_ASSOC); - switch (''.$tabModif['insEVE']) { - case 'OD': - case 'TD': - case '420': // Absence d'activité de l'entreprise (cessation économique de l.entreprise) - case '425': // Absence d'activité d'une entreprise suite à une mise à jour au répertoire // - case '620': - case '621': - case '650': // Fermé économiquement - $tabInsee['actifEcoType'] = 'ECOF'; - $tabInsee['actifEcoDate'] = $tabModif['insDATEVE']; - break; - case 'MPF': // Présumé Fermé par la trimestrielle Insee - $tabInsee['actifEcoType'] = 'PFER'; - $tabInsee['actifEcoDate'] = $tabModif['insDATEVE']; - break; - case 'MNP': // Présumé Fermé par la trimestrille NPAI - $tabInsee['actifEcoType'] = 'NPAI'; - $tabInsee['actifEcoDate'] = $tabModif['insDATEVE']; - break; - default: - $tabInsee['actifEco'] = 1; - $tabInsee['actifEcoDate'] = ''; - $tabInsee['actifEcoType'] = ''; - break; - } - } - } - - $dir1Genre=''; - if ($tabInsee['CIVILITE'] == 1) { - $dir1Genre='M'; - } elseif ($tabInsee['CIVILITE'] == 2) { - $dir1Genre='F'; - } - - $aprm = substr($tabInsee['APRM'], -1, 1) == 'Z' ? '' : $tabInsee['APRM']; - - $tabRet = array( - 'id' => $etab['id'], - 'Siret' => $etab['siret'], - 'SiretSiege' => $siretSiege, - 'AncienSiege' => $ancienSiege, - 'AncienSiegeDateFin'=> $dateFinSiege, - 'Siege' => $etab['siege'], - 'Tribunal'=> strtr($etab['triCode'], array('préfec'=>'', 'sous-p'=>'', 'Déclar'=>'')), - 'Nom' => $nom, //EIRL - 'Nom2' => $nom2, - 'Sigle' => $etab['sigle'], - 'Enseigne' => $etab['enseigne'], //EIRL - 'Adresse' => trim(preg_replace('/ +/', ' ', trim($etab['adr_num'] .' '. $etab['adr_btq'] .' '.$etab['adr_typeVoie'] .' '. $etab['adr_libVoie']))), - 'Adresse2' => trim(preg_replace('/ +/', ' ', $etab['adr_comp'])), - 'AdresseNum' => $etab['adr_num'], - 'AdresseBtq' => $etab['adr_btq'], - 'AdresseVoie' => $etab['adr_typeVoie'], - 'AdresseRue' => $etab['adr_libVoie'], - 'AdresseDistSP' => $tabInsee['ADR_DISTSP'], - 'CP' => $etab['adr_cp'], - 'Ville' => $etab['adr_ville'], - 'Pays' => $tabInsee['PAYS'], - 'PaysIso2' => $codePaysIso2, - 'Civilite' => $tabInsee['CIVILITE'], - 'NbEtab' => $nbEtab, - 'Tel' => $tel, - 'Fax' => $fax, - 'Web' => $tab['web'], - 'Mail' => $tab['mail'], - 'GeoLat' => $tab['latitude'], - 'GeoLon' => $tab['longitude'], - 'GeoAlt' => $tab['altitude'], - 'GeoPrecis'=> $tab['precis'], - 'TvaNumero' => $vatNumber, - 'TvaAttribue' => $vatDefined, - 'FJ' => $tabInsee['CJ'], - 'FJ_lib' => $this->getLibelleFJ($tabInsee['CJ']), - 'RECME' => $tabInsee['RECME'], - 'Siren' => $etab['siren'], - 'Nic' => $etab['nic'], - 'Actif' => $tabInsee['ACTIF'], // Etablissement juridiquement ACTIF - 'ActifEco' => $tabInsee['actifEco'], // Etablissement économiquement ACTIF - 'ActifEcoDate' => $tabInsee['actifEcoDate'], // Etablissement économiquement Inactif depuis - 'ActifEcoType' => $tabInsee['actifEcoType'], // Type d'inactivité éco ECOF, NPAI, PFER ou vide - 'NafEtab' => $tabInsee['APE_ETAB'], - 'NafEnt' => $tabInsee['APE_ENT'], - 'NaceEtab' => $this->getCodeNace($tabInsee['APE_ETAB']), - 'NaceEnt' => $this->getCodeNace($tabInsee['APE_ENT']), - 'NafEntLib' => $this->getLibelleNaf($tabInsee['APE_ENT']), - 'NafEtabLib' => $this->getLibelleNaf($tabInsee['APE_ETAB']), - 'AutreId' => $etab['autre_id'], - 'Source' => $etab['source'], - 'SourceId' => $etab['source_id'], - 'Isin' => $tab['isin'], - 'Capital' => $etab['capital'],//IKI - 'CapitalDev' => $etab['capitalDev'], - 'CapitalSrc' => $etab['capitalSrc'], - 'DateCreaEt' => $tabInsee['DCRET'], - 'DateCreaEn' => $tabInsee['DCREN'], - 'SituationJuridique' => '', - 'EffEnTr' => $tabInsee['TEFF_ENT'], - 'EffEnTrLib' => self::$tabEffectif[intval($tabInsee['TEFF_ENT'])], - 'EffEtTr' => $tabInsee['TEFF_ET'], - 'EffEtTrLib' => self::$tabEffectif[intval($tabInsee['TEFF_ET'])], - 'EffectifEtab' => $tabInsee['EFF_ET'], - 'Effectif' => $tabInsee['EFF_ENT'], - 'Dept' => $tabInsee['ADR_DEP'], - 'codeCommune' => $tabInsee['ADR_COM'], - 'TrancheCA' => $tabInsee['TCA'], - 'TrancheCALib' => self::$tabTCA[$tabInsee['TCA']], - 'TrancheCAexp' => $tabInsee['TCAEXP'], - 'TrancheCAexpLib' => self::$tabTCAexp[$tabInsee['TCAEXP']], - 'TrancheCAType' => 'I', - 'AnneeEffEn' => $tabInsee['DEFEN'], - 'AnneeEffEt' => $tabInsee['DEFET'], - 'AnneeTCA' => $tabInsee['TCA_AN'], - 'dir1Titre' => self::$tabFct[$tabInsee['DIR_FCT']], - 'dir1NomPrenom' => preg_replace('/^EIRL\s/', '', $tabInsee['DIR_IDEN']), - 'dir1Genre' => $dir1Genre, - 'Rivoli' => trim(substr($tabInsee['CODEVOIE'], 0, 4).' '.substr($tabInsee['CODEVOIE'], -1)), - 'Hexavia' => $tabInsee['hexavia'], - 'InfosIris' => $tabIris, - 'NatureActivite' => $tabInsee['ACTIVNAT'], // Nature de l'activité - 'OrigineCreation' => $tabInsee['ORIGINE'], // Origine de la création - 'Auxiliaire' => $tabInsee['AUXILT'], // 1=Auxiliaire / 0=Non auxiliaire - 'Saisonnalite' => $tabInsee['SAISONAT'], // P=Activité permanente / S=Activité saisonnière - 'ACTISURF' => $tabInsee['ACTISURF'], - 'EXPLEN' => $tabInsee['EXPLEN'], - 'EXPLET' => $tabInsee['EXPLET'], - 'LIEUACT' => $tabInsee['LIEUACT'], - 'MODEN' => $tabInsee['MODEN'], - 'MONOACT' => $tabInsee['MONOACT'], - 'MONOREG' => $tabInsee['MONOREG'], - 'REGIMP' => $tabInsee['REGIMP'], - 'PRODPART' => $tabInsee['PRODPART'], - 'GeoInfos' => $repAmabis, - 'NonDiffusible' => $moisNonDiff, - 'TypeExploitation' => $typeExploitation, - 'DateMajINSEE' => str_replace('--', '', Metier_Util_Date::dateT('Ymd', 'Y-m-d', $tabInsee['DATE_MAJ'])), - 'APRM' => $aprm, - 'APRM_Lib' => $this->getLibelleNafa($tabInsee['APRM']), - 'AutreSiret' => $tabAssoc, - 'L1_NOMEN' => $tabInsee['insL1_NOMEN'], // Nom ou raison sociale de l'entreprise pour l'adressage - 'L2_COMP' => $tabInsee['insL2_COMP'], // Complément de nom de l'entreprise pour l'adressage - 'L3_CADR' => $tabInsee['insL3_CADR'], // Complément d'adresse pour l.adressage - 'L4_VOIE' => $tabInsee['insL4_VOIE'], // Numéro et libellé dans la voie - 'L5_DISP' => $tabInsee['insL5_DISP'], // Distribution spéciale - 'L6_POST' => $tabInsee['insL6_POST'], // Ligne d'acheminement postal pour l'adressage - 'L7_ETRG' => $tabInsee['insL7_ETRG'], // Libellé du pays pour les adresses à l'étranger - 'IND_PUBLIPO' => $tabInsee['insIND_PUBLIPO'], // Indicateur du champ de publipostage - 'dateMajRNVP' => $tabInsee['dateMajRNVP'], - 'RNVP_Niveau' => 0, - 'RPET' => $tabInsee['RPET'], // - 'ARRONET' => $tabInsee['ARRONET'], // - 'CTONET' => $tabInsee['CTONET'], // - 'DU' => $tabInsee['DU'], // - 'TU' => $tabInsee['TU'], // - 'UU' => $tabInsee['UU'], // - 'TCD' => $tabInsee['TCD'], // - 'ZEMET' => $tabInsee['ZEMET'], // - 'ESAANN' => $tabInsee['ESAANN'], // - 'ESAAPEN' => $tabInsee['ESAAPEN'], // - 'DREACTET' => $tabInsee['DREACTET'], // - 'AMINTRET' => $tabInsee['AMINTRET'], // - 'DREACTEN' => $tabInsee['DREACTEN'], // - 'AMINTREN' => $tabInsee['AMINTREN'], // - 'CATEGORIE' => $tabInsee['insCATEGORIE'], // Catégorie d'entreprise - 'NOMEN_LONG' => $tabInsee['NOMEN_LONG'], // Nom ou raison sociale de l'entreprise - 'PRODET' => $tabInsee['PRODET'], - 'PRODEN' => $tabInsee['PRODEN'], - 'NATETAB' => $tabInsee['NATETAB'], - 'CEDEX' => $tabInsee['CEDEX'], - 'EPCI' => $tabInsee['EPCI'], - ); - - // Set Identite pour les autres méthodes - $this->Identite = $tabRet; - - // Estimation du Chiffre d'affaires - $cj1 = substr($tabInsee['CJ'], 0, 1)*1; - if ($tabRet['TrancheCA']*1==0 && $tabRet['AnneeTCA']*1==0 && $tabInsee['ACTIF']==1 - && $tabInsee['CJ'] != 1800 && $tabInsee['CJ'] != 1900 && $cj1 != 7 && $cj1 != 8 && $cj1 != 9) { - $caEstime = $this->getCAnafEffectif($tabInsee['APE_ENT'], $tabInsee['EFF_ENT']); - $tabRet['TrancheCA'] = $this->getTca($caEstime); - $tabRet['TrancheCALib'] = self::$tabTCA[$tabRet['TrancheCA']]; - if ($tabRet['TrancheCA']*1 > 0) { - $tabRet['TrancheCAType'] = 'E'; - $tabRet['AnneeTCA'] = date('Y')-2; - } - } - - // Si tourisme, recherche du classement - if (intval($siren) > 0) { - $tabNafTourisme = array( - '5510Z', // Hôtels et hébergement similaire - '5520Z', // Hébergement touristique et autre hébergement de co - '5530Z', // Terrains de camping et parcs pour caravanes ou véh - '702A', // Location de logements - '6820A', // Location de logements - '6820B', // Location de terrains et d'autres biens immobiliers - '551A', // Hôtels touristiques avec restaurant - '5610A', // Restauration traditionnelle - '741J', // Administration d'entreprises - '7010Z', // Activités des sièges sociaux - '552C', // Exploitation de terrains de camping - '702C', // Location d'autres biens immobiliers - '551C', // Hôtels touristiques sans restaurant - '553A', // Restauration de type traditionnel - ); - if (in_array($tabInsee['APE_ENT'], $tabNafTourisme) - || in_array($tabInsee['APE_ETAB'], $tabNafTourisme)) { - $stmt = $this->conn->executeQuery("SELECT id, nom, adresse, adrCp, adrVille, - nbEtoiles, typeClasse, categorie, dateClasse, tel, fax, mail, web, - typeChambres, capacite FROM jo.tourisme WHERE siren=$siren AND nic=$nic"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabRet['NafEtabLib'].= ' ('.$result['nbEtoiles'].' étoiles le '. - Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $result['dateClasse']).')'; - if ($tabRet['Tel'] == '') { - $tabRet['Tel'] = $result['tel']; - } - if ($tabRet['Fax'] == '') { - $tabRet['Fax'] = $result['fax']; - } - if ($tabRet['Web'] == '') { - $tabRet['Web'] = $result['web']; - } - if ($tabRet['Mail'] == '') { - $tabRet['Mail'] = $result['mail']; - } - } - } - } - - // Nombre d'actions du capital si disponible - if ($etab['capital'] > 0) { - try { - $stmt = $this->conn->executeQuery("SELECT capital, deviseCapital, nbActions, actionNominale, dateInfo - FROM sdv1.capitalActions WHERE siren=$siren AND capital>0 ORDER BY dateInfo DESC LIMIT 0,1"); - $tabRet['CapitalNbActions'] = 0; - $tabRet['CapitalMtActions'] = 0; - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($etab['capital'] == $result['capital']) { - $tabRet['CapitalNbActions'] = $result['nbActions']; - $tabRet['CapitalMtActions'] = $result['actionNominale']; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - $timer['nbActionsCapital'] = microtime(true); - - // Numéro de TVA non défini - if (!$vatDefined) { - // Dom Tom ou étranger - if ($tabRet['Dept'] > 96) { - $tabRet['TvaFacultatif'] = 2; - } - // Micro-entreprise - if ($tabRet['FJ']*1 < 2000 && $tabRet['Effectif'] == 0 && $tabRet['TrancheCA'] == 0) { - $tabRet['TvaFacultatif'] = 1; - } - // Erreur lors de la récupération du numéro de TVA - if ($vatDefined === null) { - $tabRet['TvaFacultatif'] = 99; - } - } - - // Date de début d'activité de l'entreprise si absente INSEE - if (intval($siren) > 100 && $tabRet['DateCreaEn'] == 0) { - try { - $stmt = $this->conn->executeQuery("SELECT DCREN FROM insee.identite - WHERE SIREN=$siren AND DCREN>0 ORDER BY DCREN ASC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $tabRet['DateCreaEn'] = $result->DCREN; - } else { - $tmp = $this->getAvisInsee($siren); - $dateCreaEn = Metier_Util_Date::dateT('Y-m-d', 'Ymd', $tmp['dateEtatEn']); - if (preg_match("/Prise d'activité/u", $tmp['etatEn']) && $dateCreaEn > 19000101) { - $this->conn->update('insee.identite', array('DCREN'=>$dateCreaEn), - array('SIREN'=>$siren, 'NIC'=>$etab['nic'])); - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - $timer['dateDebutActivite']=microtime(true); - - // Adresse de domiciliation - $tabDom = $this->infoAdresseDom($tabRet['AdresseNum'], $tabRet['AdresseBtq'], - $tabRet['AdresseVoie'], $tabRet['AdresseRue'], $tabRet['Adresse2'], - $tabRet['CP'], $tabRet['Ville']); - if (is_array($tabDom) && count($tabDom)>0) { - foreach ($tabDom as $i=>$dom) { - $tabRet['AdresseDom']=1; - $tabRet['AdresseDomNb']=$dom['nbEntrep']; - $domiciliataire=''; - if (preg_match('/^CHEZ (.*)$/i', $tabRet['Adresse2'], $matches) - && !preg_match('/ M | M. | MR | MME | MLLE /i', $tabRet['Adresse2'])) { - $domiciliataire = $matches[1]; - $tabRet['AdresseDom'] = 2; - } - $tabRet['AdresseDomEnt'][] = array( - 'siren' => $dom['siren'], - 'nom' => $dom['nom'] - ); - } - } - $timer['adresseDom'] = microtime(true); - - // --- Siren en doublon - if ($tab['sirenDoublon'] > 0) { - $tabRet['AutreSiren'] = array('listeSiren' => array( - 'siren' => $tab['sirenDoublon'], - 'type' => 'doublon' - )); - } - - // --- Situation Juridique - if (intval($siren) > 100) { - if ($this->debug) { - file_put_contents('procol.log', "=== Situation Juridique ===\n"); - } - - $tabAnn = $this->getAnnoncesLegales($siren, 0, '', false, false); - - if (count($tabAnn) > 0) { - // Date de dernière mise à jour - $tabDates = array(); - foreach ($tabAnn as $iAnn => $ann) { - $tabDates[] = $ann['dateInsertionSD']; - } - rsort($tabDates); - $tabRet['dateMajANN'] = Metier_Util_Date::dateT('Y-m-d', 'Y-m-d', $tabDates[0]); - if ($tabRet['dateMajANN'] == '--') { - $tabRet['dateMajANN'] = ''; - } else { - $dateAnnLastCompare = DateTime::createFromFormat('Y-m-d', $tabRet['dateMajANN']); - } - - // Procol - $tabProcol = $this->getAnnoncesLegales($siren, 0, 'P', false); - if (count($tabProcol) > 0) { - $tabDates = array(); - foreach ($tabProcol as $iProcol => $procol) { - $tabDates[] = $procol['dateJugement']; - } - rsort($tabDates); - $dateProcol = str_replace('-', '', $tabDates[0])*1; - // Plan - if ($this->dureePlan > 0 && date('Ymd') < $this->finPlan) { - if ($this->debug) { - file_put_contents('procol.log', "Plan (PL) : ".$this->dureePlan."-".$this->finPlan."\n", FILE_APPEND); - } - $tabRet['SituationJuridique'] = 'PL'; - } - // Plan révolu - elseif ($this->dureePlan > 0 && date('Ymd') >= $this->finPlan) { - if ($this->debug) { - file_put_contents('procol.log', "Plan revolu : ".$this->dureePlan."-".$this->finPlan."\n", FILE_APPEND); - } - $tabRet['SituationJuridique'] = ''; - } - // Appel de jugement - elseif ($this->appelJugement) { - $tabRet['SituationJuridique'] = 'PA'; - } - // Jugement de cloture après LJ - elseif ($this->SituationCloture) { - if ($this->debug) { - file_put_contents('procol.log', "Cloture (CL) "."\n", FILE_APPEND); - } - $tabRet['SituationJuridique'] = 'CL'; - } - // En cours de procédure - else { - if ($this->debug) { - file_put_contents('procol.log', "Procol (P) "."\n", FILE_APPEND); - } - $tabRet['SituationJuridique'] = 'P'; - } - - // RAZ SituationJuridique si cutoff plus récent que dernière procol - try { - $stmt = $this->conn->executeQuery("SELECT encours, scoreSolv, scoreDir, scoreConf, - DATE(dateInsert)*1 AS dateInsert, DATE(dateUpdate)*1 AS dateUpdate - FROM jo.scores_cutoff WHERE siren=$siren"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($result['scoreSolv'] > 0) { - //Tri des dates de procol - $tabDates = array(); - foreach ($tabProcol as $iProcol => $procol) { - $tabDates[] = $procol['dateJugement']; - } - rsort($tabDates); - $dateProcol = str_replace('-', '', $tabDates[0])*1; - if ($result['dateUpdate'] > $result['dateInsert']) { - $dateMaj = str_replace('-', '', $result['dateUpdate']); - } else { - $dateMaj = str_replace('-', '', $result['dateInsert']); - } - if ($dateProcol <= $dateMaj) { - $tabRet['SituationJuridique'] = ''; - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - // Absorption - if ($identite['SituationJuridique'] == '') { - $tabAnn = $this->getAnnoncesLegales($siren, 0, 'A', false); - $nbAnn = count($tabAnn); - if ($nbAnn > 0) { - if ($this->debug) { - file_put_contents('procol.log', "DETECTION ABSORPTION\n", FILE_APPEND); - } - $dateAnn = $tabAnn[$nbAnn-1]['dateInsertionSD']; - $dateAnnCompare = DateTime::createFromFormat('Y-m-d H:i:s', $dateAnn); - $dateAnnCompare->add(new DateInterval('P364D')); - if ($dateAnnCompare > $dateAnnLastCompare) { - $tabRet['SituationJuridique'] = 'A'; - if ($this->debug) { - file_put_contents('procol.log', "Entreprise absorbée\n", FILE_APPEND); - } - } - } - } - - // Dissolution - if ($identite['SituationJuridique'] == '') { - $tabAnn = $this->getAnnoncesLegales($siren, 0, 'D', false); - $nbAnn = count($tabAnn); - if ($nbAnn > 0) { - if ($this->debug) { - file_put_contents('procol.log', "DETECTION DISSOLUTION\n", FILE_APPEND); - } - $dateAnn = $tabAnn[$nbAnn-1]['dateInsertionSD']; - $dateAnnCompare = DateTime::createFromFormat('Y-m-d H:i:s', $dateAnn); - $dateAnnCompare->add(new DateInterval('P364D')); - if ($dateAnnCompare > $dateAnnLastCompare) { - $tabRet['SituationJuridique'] = 'D'; - if ($this->debug) { - file_put_contents('procol.log', "Entreprise dissolue\n", FILE_APPEND); - } - } - } - } - } - - if ($this->debug) { - file_put_contents('procol.log', "SituationJuridique = ".$tabRet['SituationJuridique']."\n", FILE_APPEND); - } - $timer['getAnnoncesLegales'] = microtime(true); - } // Fin Situation Juridique - - if (($tabInsee['CJ'] > 0 && $tabInsee['CJ'] < 20 - || $tabInsee['CJ'] > 999 && $tabInsee['CJ'] < 2000) && $tabInsee['DIR_FCT']=='') { - $tabRet['dir1Titre'] = self::$tabFct['PP']; - } - - if ($tabInsee['CIVILITE']>0 && $tabRet['dir1NomPrenom']=='') { - if ($tabInsee['CIVILITE']==1) { - $tabRet['dir1NomPrenom'] = 'M. '; - $tabRet['dir1Genre'] = 'M'; - } elseif ($tabInsee['CIVILITE']==2) { - $tabRet['dir1NomPrenom'] = 'Mme '; - $tabRet['dir1Genre'] = 'F'; - } elseif ($tabRet['dir1Genre'] != 'M' && $tabRet['dir1Genre'] != 'F') { - $tabRet['dir1Genre'] = ''; - } - $tabRet['dir1NomPrenom'].= $tabInsee['NOM']; - } - - if (intval($siren) > 0) { - if ($tabInsee['CIVILITE']>0 && ($tabRet['dir1Nom']=='' || $tabRet['dir1Prenom'])) { - $stmt = $this->conn->executeQuery("SELECT dirNom, dirNomUsage, dirPrenom, insCIVILITE - FROM insee.insee_even WHERE insSIREN=$siren ORDER BY insDATEVE DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $dir = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabRet['dir1Nom'] = strtoupper($dir['dirNom']); - $tabRet['dir1Prenom'] = ucwords(strtolower($dir['dirPrenom'])); - $tabRet['dir1NomUsage'] = strtoupper($dir['dirNomUsage']); - if ($dir['insCIVILITE'] == 1) { - $tabRet['dir1Genre'] = 'M'; - } elseif ($dir['insCIVILITE'] == 2) { - $tabRet['dir1Genre'] = 'F'; - } elseif ($tabRet['dir1Genre'] != 'M' && $tabRet['dir1Genre'] != 'F') { - $tabRet['dir1Genre'] = ''; - } - $entrep['sexe'] = $tabRet['dir1Genre']; - } - } - } - - if (intval($siren) > 100 && $tabInsee['ACTIF'] == 0) { - if ($etab['nic']*1>0) { - $strNic = 'AND insNIC='.$etab['nic']; - } else { - $strNic = ''; - } - $stmt = $this->conn->executeQuery("SELECT insDATEVE FROM insee.insee_even - WHERE insSIREN=$siren $strNic AND ( - insEVE IN ('FF', 'TF', '0F', 'TD', '0D', '410', '420', '425', '400', '430', '435', 'SC', 'SU', 'SE', 'SS', 'STE', 'STS') - OR insDESTINAT!='' ) ORDER BY insDATEVE DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $tabRet['DateClotEt'] = $result->insDATEVE; - } - $timer['dateClotureInsee'] = microtime(true); - } - - if ($tabRet['TrancheCALib'] == '') { - $tabRet['TrancheCALib'] = 'N/C'; - } - if ($tabRet['EffEnTrLib'] == '') { - $tabRet['EffEnTrLib'] = 'N/C'; - } - - $tabRet['CapitalLib'] = ''; - if (intval($siren) > 100) { - $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%' "; - if ($tabRet['CapitalSrc'] != 5) { - // Recherche du n° RC, de la Forme Juridique et du Capital au Bodacc - try { - $stmt = $this->conn->executeQuery("SELECT Capital, CapitalDev FROM jo.bodacc_detail - WHERE siren=$siren AND capital != 0 $strEvenVtLg - ORDER BY Bodacc_Date_Parution DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $annCap = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($tabRet['Capital']==0 || $tabRet['CapitalDev']=='' || $tabRet['Capital'] != $annCap['Capital']*1) { - if ($tabInsee['CJ'] > 1999 && $tabInsee['CJ'] < 7000) { - $tabRet['Capital'] = $annCap['Capital']*1; - $tabRet['CapitalDev'] = $annCap['CapitalDev']; - $tabRet['CapitalSrc'] = 10; - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($tabRet['Capital']==0 || $tabRet['CapitalDev']=='') { - try { - $stmt = $this->conn->executeQuery("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 FROM historiques.entrep e, historiques.texte x - WHERE e.E1GSIR=$siren AND e.ANBASE=x.annonceNum AND e.DATE BETWEEN 19890101 AND 20041231 - AND x.annonceTxt LIKE '%capital%' GROUP BY e.ANBASE ORDER BY e.DATE DESC"); - if ($stmt->rowCount() > 0) { - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - if ($ann['DATE'] < 19960101 && $ann['E1GSIR'] != $ann['SIREN']) { - continue; - } - $tabCodeTri = $ann['CODTRI']; - if (($ann['CODEVE']>=10 && $ann['CODEVE']<20) || - ($ann['CODEVE']>=30 && $ann['CODEVE']<42) || - ($ann['CODEVE']>=51 && $ann['CODEVE']<80)) { - if (preg_match('/Capital(?:.|)\:(.*)(eur.|f|livre)/Uis', $ann['annonceTxt'], $matches) && $tabInsee['CJ']>1999 && $tabInsee['CJ']<7000) { - $tabRet['Capital']=trim(strtr($matches[1], array(' '=>'', ',00 '=>'', '.00 '=>'')))*1; - } - if (substr(strtoupper($matches[2]), 0, 3) == 'EUR') { - $tabRet['CapitalDev']='EUR'; - } elseif (substr(strtoupper($matches[2]), 0, 3) == 'LIV') { - $tabRet['CapitalDev'] = 'GBP'; - } else { - $tabRet['CapitalDev'] = 'FRF'; - } - break; - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - } - if ($tabRet['CapitalDev'] != '' && $tabRet['CapitalDev'] != 'EUR') { - $dev = $tabRet['CapitalDev']; - try { - $stmt = $this->conn->executeQuery("SELECT c.devise, c.valeur, c.date, l.devNom, - l.devNomPays, l.devPaysIso FROM sdv1.devise_liste l, sdv1.devise_cours c - WHERE c.devise='$dev' and l.devIso='$dev' ORDER BY c.date DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $dev = $stmt->fetch(\PDO::FETCH_ASSOC); - $devise = $tabRet['Capital'] * $dev['valeur'] * 1; - $tabRet['CapitalLib'] = ''.$dev['devNom'].' soit '.number_format(round($devise), null, null, ' ').' EUR'; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - $timer['capital'] = microtime(true); - - // Recherche du code Tribunal du siège - if ($tabRet['CapitalSrc'] != 5) { - try { - $stmt = $this->conn->executeQuery("SELECT RC, FJ, Tribunal_Code FROM jo.bodacc_detail - WHERE siren=$siren AND RC != '' $strEvenVtLg ORDER BY Bodacc_Date_Parution DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $bodacc = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($tabRet['AutreId']=='') { - $tabRet['AutreId'] = $bodacc['RC']; - } - if ($tabRet['Tribunal'] == '') { - $tabRet['Tribunal'] = $bodacc['Tribunal_Code']; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - if ($tabRet['FJ_lib'] == '') { - try { - $stmt = $this->conn->executeQuery("SELECT FJ FROM jo.bodacc_detail - WHERE siren=$siren AND FJ != '' $strEvenVtLg ORDER BY Bodacc_Date_Parution DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $tabRet['FJ_lib'] = $result->FJ; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - // Recherche de l'activité réelle - try { - $stmt = $this->conn->executeQuery("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"); - if ($stmt->rowCount() > 0) { - $annCap = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($tabInsee['CJ'] < 7000 || $tabInsee['CJ'] > 7999) { - $tabRet['Activite'] = trim($annCap['Activite']); - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($tabRet['Activite'] == '' && trim($tab['activite']) != '') { - $tabRet['Activite'] = trim($tab['activite']); - } elseif ($tabRet['Activite'] == '' - && ($tabInsee['CJ']>90 && $tabInsee['CJ']<94 - || $tabInsee['CJ']>9000 && $tabInsee['CJ']<9400)) { - try { - $stmt = $this->conn->executeQuery("SELECT Assoc_Web, Assoc_Mail, Assoc_Objet, - Assoc_NObjet, Assoc_Nom, typeAsso, Waldec FROM jo.asso WHERE siren=$siren - AND dateSuppr=0 AND (Assoc_Objet != '' OR Assoc_NObjet != '') - ORDER BY Date_Parution DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $annCap = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabRet['Activite'] = trim($annCap['Assoc_NObjet']); - if (trim($tabRet['AutreId']) == '') { - $tabRet['AutreId'] = trim($annCap['Waldec']); - } - $tabRet['nomLong'] = trim($annCap['Assoc_Nom']); - 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']); - } - if ($annCap['typeAsso'] == 'ASL' && $tabRet['FJ'] != 9150) { - $tabRet['FJ2'] = $tabRet['FJ']; - $tabRet['FJ2_Lib'] = $tabRet['FJ_lib']; - $tabRet['FJ'] = 9150; - $tabRet['FJ_lib'] = $this->getLibelleFJ(9150); - } elseif ($annCap['typeAsso'] == 'FOD') { - $tabRet['FJ_lib'].= ' (Fonds de dotation)'; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if (trim($tabRet['AutreId'])== '') { - $tabRet['AutreId'] = trim($waldec); - } - } elseif ($tabRet['Activite']=='' && ($tabInsee['CJ']<7000 || $tabInsee['CJ']>7999)) { - try { - $stmt = $this->conn->executeQuery("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 FROM historiques.entrep e, historiques.texte x - WHERE 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"); - if ($stmt->rowCount() > 0) { - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - if ($ann['DATE']<19960101 && $ann['E1GSIR'] != $ann['SIREN']) { - continue; - } - if ($tabCodeTri != '' && $tabCodeTri != @$ann['CODTRI']) { - $tabCodeTri = $ann['CODTRI']; - } - 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 (strpos(substr($matches[1], -20), 'cess') === false && - strpos(substr($matches[1], -20), 'date') === false) { - $tabRet['Activite']=$matches[2]; - break; - } - } - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - $timer['activiteReelle']=microtime(true); - - $stmt = $this->conn->executeQuery("SELECT nom, prenom, naissance_nom, civilite, - fonction_code as code, fonction_lib as libelle, naissance_date AS dateNaiss, - naissance_lieu AS lieuNaiss, dirRS as rs, '' as dateEffet - FROM jo.rncs_dirigeants - WHERE siren=$siren AND actif%10=1 AND fonction_lib NOT LIKE '%Administrateur%' - ORDER BY actif DESC, fonction_lib DESC"); - if ($stmt->rowCount() == 0) { - $stmt = $this->conn->executeQuery("SELECT nom, prenom, naissance_nom, civilite, - fonction_code as code, fonction_lib as libelle, naissance_date AS dateNaiss, - naissance_lieu AS lieuNaiss, dirRS as rs, '' as dateEffet - FROM jo.rncs_dirigeants - WHERE siren=$siren AND actif%10=0 AND fonction_lib NOT LIKE '%Administrateur%' - ORDER BY actif DESC, fonction_lib DESC"); - } - - if ($stmt->rowCount() > 0) { - $k = 1; - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - if ($tabInsee['CJ']>=7000 && $tabInsee['CJ']<=7999 && !in_array($ann['libelle'], - array('Maire', 'Président', 'Directeur général'))) { - continue; - } - $tabRet['dir'.$k.'Code'] = $ann['code']; - $tabRet['dir'.$k.'Titre'] = $ann['libelle']; - $nomNaiss = ''; - if (trim($ann['naissance_nom']) != '') { - if ($ann['civilite'] == 'MME' || $ann['civilite'] == 'MLLE') { - $nomNaiss=' née '.trim($ann['naissance_nom']); - $tabRet['dir'.$k.'Genre'] = 'F'; - } elseif ($ann['civilite'] == 'M') { - $nomNaiss=' né '.trim($ann['naissance_nom']); - $tabRet['dir'.$k.'Genre'] = 'M'; - } else { - $nomNaiss=' né(e) '.trim($ann['naissance_nom']); - } - } - if (trim($ann['rs']) != '') { - $tabRet['dir'.$k.'NomPrenom'] = $ann['rs']; - if (trim($ann['nom'])!='' || trim($ann['prenom'])!='') { - $tabRet['dir'.$k.'NomPrenom'].=' repr. par '.$ann['nom'].' '.$ann['prenom']; - } - } else { - $tabRet['dir'.$k.'NomPrenom']=$ann['nom'].' '.$ann['prenom'].$nomNaiss; - $tabRet['dir'.$k.'Nom']=$ann['nom']; - $tabRet['dir'.$k.'Prenom']=$ann['prenom']; - if ($ann['civilite']=='M') { - $tabRet['dir'.$k.'Genre'] = 'M'; - } elseif ($ann['civilite']=='MME' || $ann['civilite']=='MLLE') { - $tabRet['dir'.$k.'Genre'] = 'F'; - } - } - $tabRet['dir'.$k.'DateFct'] = $ann['dateEffet']; - $tabRet['dir'.$k.'DateNaiss'] = $ann['dateNaiss']; - $tabRet['dir'.$k.'LieuNaiss'] = $ann['lieuNaiss']; - $tabRet['dir'.$k.'Genre'] = ''; - if ($k==2) { - break; - } - $k++; - } - } else { - try { - $stmt = $this->conn->executeQuery("SELECT d.num, d.dateEffet, d.Rubrique, d.fonction, d.rs, - d.nom, d.prenom, d.nomUsage, d.depart, d.dateInsert, f.libelle - FROM jo.bodacc_dirigeants d, jo.bodacc_detail b, jo.bodacc_fonctions f - WHERE b.SIREN=$siren AND b.id=d.id AND b.typeEven NOT BETWEEN 5000 AND 5700 - AND b.typeEven NOT BETWEEN 2700 AND 2900 AND d.fonction=f.codeFct - AND d.depart != 1 AND f.triCode IN ('ASS','COG','DID','DIR','GER','PCS','PDG','PRD','PRE','PRT','VIC') - GROUP BY d.fonction, d.rs, d.nom, d.prenom ORDER BY d.dateEffet DESC"); - if ($stmt->rowCount() > 0) { - $k = 1; - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRet['dir'.$k.'Code'] = $ann['fonction']; - $tabRet['dir'.$k.'Titre'] = $ann['libelle']; - $tabRet['dir'.$k.'NomPrenom'] = $ann['rs'].' '.$ann['nom'].' '.$ann['prenom']; - $tabRet['dir'.$k.'Nom'] = $ann['nom']; - $tabRet['dir'.$k.'Prenom'] = $ann['prenom']; - $tabRet['dir'.$k.'DateFct'] = $ann['dateEffet']; - $tabRet['dir'.$k.'Genre'] = ''; - if ($k == 2) { - break; - } - $k++; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - $timer['dirigeants']=microtime(true); - - // Recherche du site Web ou Email dans le JO ASSO - if (($tabRet['Web']=='' || $tabRet['Mail']=='') && - ($tabInsee['CJ']>90 && $tabInsee['CJ']<94 || - $tabInsee['CJ']>9000 && $tabInsee['CJ']<9400)) { - - try { - $stmt = $this->conn->executeQuery("SELECT Assoc_Web, Assoc_Mail FROM jo.asso - WHERE siren=$siren AND dateSuppr=0 AND (Assoc_Web != '' OR Assoc_Mail != '') - ORDER BY Date_Parution DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $annCap = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($tabRet['Web'] == '') { - $tabRet['Web'] = trim($annCap['Assoc_Web']); - } - if ($tabRet['Mail'] == '') { - $tabRet['Mail'] = trim($annCap['Assoc_Mail']); - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - } else { - if ($etab['source'] == 3) { - $id = $etab['source_id']; - try { - $stmt = $this->conn->executeQuery("SELECT Activite, Sous_Prefecture, Assoc_Web, - Assoc_Mail, Assoc_Objet, Assoc_Fusion, Assoc_Date_Declaration2 - FROM jo.asso WHERE id=$id AND dateSuppr=0"); - if ($stmt->rowCount() > 0) { - $annCap = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabRet['Activite'] = $annCap['Assoc_Objet']; - $tabRet['Web'] = $annCap['Assoc_Web']; - $tabRet['Mail'] = $annCap['Assoc_Mail']; - $tabRet['VilleDecl'] = $annCap['Sous_Prefecture']; - if ($tabRet['Actif'] == 0) { - $tabRet['DateClotEt'] = $annCap['Assoc_Date_Declaration2']; - } else { - $tabRet['DateCreaEt'] = $annCap['Assoc_Date_Declaration2']; - $tabRet['DateCreaEn'] = $annCap['Assoc_Date_Declaration2']; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - } - $timer['association']=microtime(true); - - // On initialise les dernères variables en prov. d'Infogreffes - if (count($etabG) > 0) { - $tabRet['DateClotEt'] = $etabG['DateRadiation']; - $tabRet['dateImmat'] = $etabG['DateCreation']; - if ($tabRet['dateImmat']*1 == 0) { - $tabRet['dateImmat'] = substr($etabG['NumRC2'], 0, 4).'0101'; - } - $tabRet['DateCreaEt'] = $tabRet['DateCreaEn'] = substr($etabG['NumRC2'], 0, 4).'0100'; - - $tabRet['FJ'] = $etabG['FJ']; - if ($etabG['FJ'] == 1900) { - $tabRet['dir1Titre'] = 'PP'; - $tabNom = explode(' ', $etabG['Nom']); - $tabNom[0] = strtoupper($tabNom[0]); - for ($i=1; isset($tabNom[$i]); $i++) { - if ($tabNom[$i] == 'EPOUSE') { - $tabNom[$i] = 'epouse'; - } elseif ($tabNom[$i-1] != 'epouse') { - $tabNom[$i] = ucwords(strtolower($tabNom[$i])); - } - } - $tabRet['dir1NomPrenom']=implode(' ', $tabNom); - } - $tabRet['FJ_lib'] = $etabG['FJLib']; - $tabRet['AutreId'] = $etabG['NumRC']; - $tabRet['NafEtab'] = $etabG['NafEtab']; - $tabRet['NafEnt'] = $etabG['NafEnt']; - $tabRet['NafEntLib'] = $etabG['NafEntLib']; - $tabRet['NafEtabLib'] = $etabG['NafEtabLib']; - $tabRet['SiretSiege'] = $etabG['Siret']; - $tabRet['DateMajRCS'] = $etab['dateMAJ']; - $tabRet['numGreffe'] = $etabG['NumGreffe']; - $tabRet['numRC'] = $etabG['NumRC2']; - $tabRet['Enseigne'] = $etabG['Enseigne']; - $iRncs = new Metier_Partenaires_MRncs(); - $tabRet['Tribunal'] = $iRncs->getCodeBodaccTribunal($etabG['NumGreffe']); - } - - if ($tabRet['Siege']==1 && $tabRet['Actif'] && $tabRet['Tribunal']=='') { - $tabRet['Tribunal'] = $tabCodeTri; - } - - // RNCS Entrep et Etab, RM - if (intval($siren) > 0) { - $stmt = $this->conn->executeQuery("SELECT siren, sirenValide, actif, numGreffe, triCode, - triId, numRC, numRC2, raisonSociale, nom, prenom, nomUsage, sigle, dateNaiss, - lieuNaiss, sexe, nationalite, pays, naf, cj, capitalMontant, capitalDevise, - capitalDevIso, dateImma, dateRad, dateRad*1 AS dateRadNum, capitalType, capitalCent, - provisoires, flux, DATE(dateUpdate) AS jourUpdate FROM jo.rncs_entrep WHERE siren=$siren"); - if ($stmt->rowCount() > 0) { - $entrep = $stmt->fetch(\PDO::FETCH_ASSOC); - // ETRANGER - if (isset($entrep['numGreffe'])) { - $tabRet['numGreffe'] = $entrep['numGreffe']; - $tabRet['numRC'] = $entrep['numRC2']; - if ((preg_match('/[A-Z]/i', substr($tabRet['AutreId'], 2, 2)) && !preg_match('/[A-Z]/i', substr($tabRet['AutreId'], 0, 2))) || $tabRet['AutreId']=='') { - $tabRet['AutreId'] = $etabG['NumRC2']; - } - $tabRet['Tribunal'] = $entrep['triCode']; - if (strtoupper(trim($entrep['raisonSociale'])) != strtoupper(trim($tabRet['Nom']))) { - $tabRet['nomLong'] = strtoupper($entrep['raisonSociale']); - } - if (strtoupper(trim($entrep['sigle'])) != strtoupper(trim($tabRet['Sigle']))) { - $tabRet['sigleLong'] = strtoupper($entrep['sigle']); - } - $tabRet['dateImmat'] = $entrep['dateImma']; - $tabRet['dateRad'] = $entrep['dateRad']; - $tabRet['Capital'] = $entrep['capitalMontant']+($entrep['capitalCent']/100); - $tabRet['CapitalDev'] = $entrep['capitalDevIso']; - $tabRet['CapitalType'] = trim(strtoupper(substr($entrep['capitalType'], 0, 1))); - - // Par défaut, la Forme juridique qui fait foie est celle de l'INPI - $fjInpi = $entrep['cj']*1; - if ($tabRet['FJ']*1 != $fjInpi && $fjInpi>0) { - $tabRet['FJ2'] = $tabRet['FJ']; - $tabRet['FJ2_Lib'] = $tabRet['FJ_lib']; - $tabRet['FJ'] = $fjInpi; - $tabRet['FJ_lib'] = $this->getLibelleFJ($fjInpi); - } else { - $tabRet['FJ2'] = $tabRet['FJ']; - $tabRet['FJ2_Lib'] = $tabRet['FJ_lib']; - } - if ($fjInpi >= 1000 && $fjInpi < 2000) { - $tabRet['dir1Titre'] = 'Personne physique'; - $tabRet['dir1Code'] = '1050'; - $tabRet['dir1NomPrenom'] = strtoupper($entrep['nom']).' '. - ucwords(strtolower($entrep['prenom'])); - $tabRet['dir1Nom'] = strtoupper($entrep['nom']); - $tabRet['dir1Prenom'] = ucwords(strtolower($entrep['prenom'])); - $tabRet['dir1NomUsage'] = strtoupper($entrep['nomUsage']); - $tabRet['dir1DateNaiss'] = $entrep['dateNaiss']; - $tabRet['dir1LieuNaiss'] = $entrep['lieuNaiss']; - $tabRet['dir1Genre'] = $entrep['sexe']; - } - - if ($tabRet['DateMajRCS'] == '') { - if ($entrep['jourUpdate'] != '0000-00-00') { - $tabRet['DateMajRCS'] = $entrep['jourUpdate']; - } else { - $tabRet['DateMajRCS'] = $entrep['flux']; - } - } - // On signal que l'entreprise est active au RCS - if ($entrep['actif'] == 1 || $entrep['actif'] == 11) { - $tabRet['EntActiveRCS'] = 1; - } - // On signal que l'entreprise est radié du RCS - else { - $tabRet['EntActiveRCS'] = 0; - // On signal que l'entreprise est radié du RCS - if ($tabRet['SituationJuridique'] == '') { - $tabRet['SituationJuridique'] = 'RR'; - } - } - - // Spécificité EIRL - if ($fjInpi == 1000) { - try { - $stmt = $this->conn->executeQuery("SELECT denomination, activite FROM jo.rncs_eirl WHERE siren=$siren"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $tabRet['Activite'] = $result->activite; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - // Informations sur l'établissement au RNCS - try { - $stmt = $this->conn->executeQuery("SELECT id, siege, actif, enseigne, - nomCommercial, adrNumVoie, adrIndRep, adrLibVoie, adrTypeVoie, adrVoie, cp, - commune, adrComp, adresse1, adresse2, adresse3, naf, dateFermeture, flux, - dateInsert, DATE(dateUpdate) AS jourUpdate FROM jo.rncs_etab - WHERE siren=$siren AND nic=$nic"); - if ($stmt->rowCount() > 0) { - $rncsEtab = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabRet['EtabActifRCS'] = 0; - if ($rncsEtab['jourUpdate'] != '0000-00-00' && - str_replace('-', '', $rncsEtab['jourUpdate'])*1 > str_replace('-', '', $tabRet['DateMajRCS'])) { - $tabRet['DateMajRCS'] = $rncsEtab['jourUpdate']; - } - // On signal que l'établissement est actif au RCS - if ($rncsEtab['actif']*1 == 1) { - $tabRet['EtabActifRCS'] = 1; - } - $tabRet['NomCommercial'] = $rncsEtab['nomCommercial']; - $tabRet['enseigneLong'] = $rncsEtab['enseigne']; - - if ($codePaysIso2 != 'FR' && $codePaysIso2 != '') { - $tabRet['Adresse'] = trim(preg_replace('/ +/', ' ', $rncsEtab['adrNumVoie'] .' '.$rncsEtab['adrIndRep'].' '. - $rncsEtab['adrTypeVoie'].' '.$rncsEtab['adrVoie'])); - $tabRet['Adresse2'] = trim(preg_replace('/ +/', ' ', $rncsEtab['adrComp'])); - $tabRet['AdresseNum'] = $rncsEtab['adrNumVoie']; - $tabRet['AdresseBtq'] = $rncsEtab['adrIndRep']; - $tabRet['AdresseVoie'] = $rncsEtab['adrTypeVoie']; - $tabRet['AdresseRue'] = $rncsEtab['adrVoie']; - $tabRet['CP'] = $rncsEtab['cp']; - $tabRet['Ville'] = $rncsEtab['commune']; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - $timer['infosRNCS'] = microtime(true); - } elseif ($siren > 1000) { - // Recherche au RM - try { - $stmt = $this->conn->executeQuery("SELECT siren, actif, numRM, denomination, - sigle, nomCommercial, enseigne, fj, effectif, aprm, debutActivite, activite, - adresse, cp, ville, cessation, radiation, nom, prenom, nomUsage, dateNaiss, - lieuNaiss, qualite, qualif, dateQualif, dateFctDeb, dateFctFin, - DATE(dateUpdate) AS jourUpdate, DATE(dateInsert) AS dateInsert - FROM jo.artisanat WHERE siren=$siren"); - if ($stmt->rowCount() > 0) { - $rmEntrep = $stmt->fetch(\PDO::FETCH_ASSOC); - if (isset($entrep['numRM'])) { - $tabRet['AutreId'] = $rmEntrep['numRM']; - if ($tabRet['Activite']=='') { - $tabRet['Activite'] = $rmEntrep['activite']; - } - if ($tabRet['APRM'] == '') { - $tabRet['APRM'] = $rmEntrep['aprm']; - $tabRet['APRM_Lib'] = $this->getLibelleNafa($entrep['aprm']); - } - - if (strtoupper(trim($rmEntrep['nom'].' '.$rmEntrep['prenom'].' '.$rmEntrep['nomUsage'])) != strtoupper(trim($tabRet['Nom']))) { - $tabRet['nomLong'] = strtoupper(trim($rmEntrep['nom'].' '.$rmEntrep['prenom'].' '.$rmEntrep['nomUsage'])); - } - if (strtoupper(trim($rmEntrep['sigle'])) != strtoupper(trim($tabRet['Sigle']))) { - $tabRet['sigleLong']= strtoupper($rmEntrep['sigle']); - } - - $tabRet['dateImmat'] = $rmEntrep['debutActivite']; - $tabRet['dateRad'] = $rmEntrep['radiation']; - - // Si on est au greffe, on est artisan commercant - // Artisan Commerçant - if ($tabRet['numGreffe']*1 > 0) { - $fjInpi = 1100; - } - // Artisan - else { - $fjInpi = 1300; - } - - // Par défaut, la Forme juridique qui fait foie est celle de l'INPI - if ($tabRet['FJ']*1 != $fjInpi) { - $tabRet['FJ2'] = $tabRet['FJ']; - $tabRet['FJ2_Lib'] = $tabRet['FJ_lib']; - $tabRet['FJ'] = $fjInpi; - $tabRet['FJ_lib'] = $this->getLibelleFJ($fjInpi); - } else { - $tabRet['FJ2'] = $tabRet['FJ']; - $tabRet['FJ2_Lib'] = $tabRet['FJ_lib']; - } - - $tabRet['dir1Titre'] = ucwords(strtolower($rmEntrep['qualite'].' '.$rmEntrep['qualif'])); - $tabRet['dir1NomPrenom'] = strtoupper($rmEntrep['nom']).' '.ucwords(strtolower($rmEntrep['prenom'])); - $tabRet['dir1Nom'] = strtoupper($rmEntrep['nom']); - $tabRet['dir1Prenom'] = ucwords(strtolower($rmEntrep['prenom'])); - $tabRet['dir1DateNaiss'] = $rmEntrep['dateNaiss']; - $tabRet['dir1LieuNaiss'] = $rmEntrep['lieuNaiss']; - - if ($tabRet['DateMajRCS'] == '') { - if ($rmEntrep['jourUpdate'] != '0000-00-00') { - $tabRet['DateMajRCS'] = $rmEntrep['jourUpdate']; - } else { - $tabRet['DateMajRCS'] = $rmEntrep['dateInsert']; - } - } - // On signal que l'entreprise est active au RCS - if ($rmEntrep['actif'] == 1 || $rmEntrep['actif'] == 11) { - $tabRet['EntActiveRCS'] = 1; - } - // On signal que l'entreprise est radié du RCS - else { - $tabRet['EntActiveRCS'] = 0; - // On signal que l'entreprise est radié du RCS - if ($tabRet['SituationJuridique'] == '') { - $tabRet['SituationJuridique'] = 'RR'; - } - } - - $tabRet['NomCommercial'] = $rmEntrep['nomCommercial']; - $tabRet['enseigneLong'] = $rmEntrep['enseigne']; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - } - - if ($tabRet['dir1Genre'] == 'M' || $tabRet['dir1Genre'] == 'F') { - $tabRet['dir1Titre'] = 'Personne physique'; - $tabRet['dir1Code'] = '1050'; - } - - if ($accesDist && - // Département couvert par Infogreffe - !in_array($tabRet['Dept'], array(57, 67, 68, 97, 98, 99)) && - // Forme Juridique présente au greffe - (in_array($tabInsee['CJ'], array(1100,1200,1300,1700,9900)) || - ($tabInsee['CJ']>=3100 && $tabInsee['CJ']<=3299) || - ($tabInsee['CJ']>=4100 && $tabInsee['CJ']<=4199) || - ($tabInsee['CJ']>=5100 && $tabInsee['CJ']<=5899) || - ($tabInsee['CJ']>=6100 && $tabInsee['CJ']<=6599) || - preg_match('/EIRL/', $nom) || preg_match('/EIRL/', $nom2) || - preg_match('/EIRL/', $tabRet['Sigle']) || preg_match('/EIRL/', $tabRet['Enseigne']) || - preg_match('/EIRL/', $tabRet['Adresse']) || preg_match('/EIRL/', $tabRet['Adresse2']) - ) - && ($tabInsee['CJ'] == 1700 || // Agents commerciaux (uniquement au Greffes RSAC) - $tabRet['numRC'] == '' || // Numéro de RCS absent = Anomalie (<à3%) - $tabRet['Tribunal'] == '' || // Tribunal absent = anomalie - str_replace('-', '', $tabRet['dateImmat'])*1 == 0 || // Pas de date d'immat = anomalie (<à9%) - ($nbEtab*1 == 0 && str_replace('-', '', $tabRet['dateRad'])*1 == 0) // Inactif sans date de RAD - ) - ) { - if ($this->debugtime) { - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;MGreffes Avant\n", FILE_APPEND); - $tdeb = microtime(1); - } - - $iGeffes = new Metier_Partenaires_MGreffes(); - $etabG = $iGeffes->getIdentite($siren); - $iRncs = new Metier_Partenaires_MRncs(); - - if ($this->debugtime) { - $duree=round(microtime(1)-$tdeb, 3); - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;MGreffes APRES ($duree s)\n", FILE_APPEND); - } - - if ($etabG) { - if ($tabRet['numRC'] == '') { - $tabRet['numRC'] = $etabG['NumRC2']; - } - if ($tabRet['Tribunal']=='') { - $tabRet['Tribunal'] = $iRncs->getCodeBodaccTribunal($etabG['NumGreffe']); - } - if (str_replace('-', '', $tabRet['dateImmat'])*1 == 0) { - $tabRet['dateImmat'] = $etabG['DateCreation']; - } - if (str_replace('-', '', $tabRet['dateRad'])*1 == 0) { - $tabRet['dateRad'] = $etabG['DateRadiation']; - if (str_replace('-', '', $tabRet['dateRad'])*1 > 0 && $tabRet['SituationJuridique'] == '') { - $tabRet['SituationJuridique'] = 'RR'; - } - } - if (preg_match('/[A-Z]/i', substr($tabRet['AutreId'], 2, 2)) || $tabRet['AutreId']=='') { - $tabRet['AutreId'] = $etabG['NumRC2']; - } - } - $timer['infosInfogreffes'] = microtime(true); - } - - // Si il n'y a aucun établissement actif et qu'on est radié au RCS : on part chercher la dernière annonce de Radiation au Bodacc - if ($entrep['dateRadNum'] == 0 && ($nbEtab*1 == 0 || isset($entrep['numGreffe']) && $entrep['actif'] == 0)) { - $tabRad = $this->getAnnoncesLegales($siren, 0, 'R'); - // Il y a au moins une annonce de radiation au Bodacc - if (count($tabRad) > 0) { - if ($tabRet['SituationJuridique'] == '') { - $tabRet['SituationJuridique'] = 'RP'; - } - $dateEff = str_replace('-', '', $tabRad[0]['dateEffet'])*1; - $dateJug = str_replace('-', '', $tabRad[0]['dateJugement'])*1; - $datePar = str_replace('-', '', $tabRad[0]['DateParution'])*1; - if ($dateEff > 0) { - $tabRet['dateRad'] = $dateEff; - } elseif ($dateJug > 0) { - $tabRet['dateRad'] = $dateJug; - } elseif ($datePar > 0) { - $tabRet['dateRad'] = $datePar; - } - } - $timer['infosRadiation'] = microtime(true); - } - - // Eléments Financiers en provenance du dernier Bilan - try { - $stmt = $this->conn->executeQuery("SELECT siren, dateExercice, dureeExercice, monnaie, - typeBilan, unite, postes, dateProvPartenaire, dateInsert FROM jo.bilans - WHERE siren=$siren AND typeBilan IN ('N','S') ORDER BY dateExercice DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $bilEntrep = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabRet['bilanAnnee'] = substr($bilEntrep['dateExercice'], 0, 4); - $tabRet['bilanDate'] = $bilEntrep['dateExercice']; - $tabRet['bilanMois'] = $bilEntrep['dureeExercice']; - $tabRet['bilanDevise'] = $bilEntrep['monnaie']; - if ($bilEntrep['dateProvPartenaire'] > 0) { - $tabRet['bilanDateMaj'] = Metier_Util_Date::dateT('Ymd', 'Y-m-d', $bilEntrep['dateProvPartenaire']); - } else { - $tabRet['bilanDateMaj'] = Metier_Util_Date::dateT('Y-m-d', 'Y-m-d', $bilEntrep['dateInsert']); - } - - switch (strtoupper(trim($bilEntrep['unite']))) { - case 'M': $unite = 'M'; break; - case 'K': $unite = 'K'; break; - default: $unite = 'U'; break; - } - $tabTmp = explode(';', $bilEntrep['postes']); - $tabBilan = array(); - foreach ($tabTmp as $i=>$strTmp) { - $tabTmp2 = explode('=', $strTmp); - if (isset($tabTmp2[1])) { - if ($unite == 'K' && $tabTmp2[0] != 'YP' && $tabTmp2[0] != 'YP1' && $tabTmp2[0] != '376') { - $tabBilan[$tabTmp2[0]] = $tabTmp2[1]*1000; - } elseif ($unite=='M' && $tabTmp2[0] != 'YP' && $tabTmp2[0] != 'YP1' && $tabTmp2[0] != '376') { - $tabBilan[$tabTmp2[0]] = $tabTmp2[1]*1000000; - } else { - $tabBilan[$tabTmp2[0]] = $tabTmp2[1]; - } - } - } - if (strtoupper($bilEntrep['typeBilan'])=='S') { - $mBil = new Metier_Partenaires_MBilans(); - $tabTmp = $mBil->bilanSimplifie2Normal($tabBilan); - $tabBilan = array_merge($tabTmp, $tabBilan); - } - - $tabRet['bilanDA'] = $tabBilan['DA']; - $tabRet['bilanFL'] = $tabBilan['FL']; - $tabRet['bilanHN'] = $tabBilan['HN']; - $tabRet['bilanYP'] = $tabBilan['YP']; - - // Fiche AGS - $tabRet['bilanPQ'] = $tabBilan['PQ']; - $tabRet['bilanPU'] = $tabBilan['PU']; - $tabRet['bilanPY'] = $tabBilan['PY']; - $tabRet['bilanQC'] = $tabBilan['QC']; - - // Tranche de CA Bilan Réel si TCA Insee ou Estimée < dernière clôture - if ($tabRet['AnneeTCA'] <= $tabRet['bilanAnnee'] && $tabInsee['ACTIF']==1) { - $tabRet['TrancheCA'] = $this->getTca($tabBilan['FL']); - $tabRet['TrancheCALib'] = self::$tabTCA[$tabRet['TrancheCA']]; - $tabRet['TrancheCAType'] = 'R'; - $tabRet['AnneeTCA'] = $tabRet['bilanAnnee']; - } - - // Contrôle de la cohérence du type d'exploitation - if ($tabBilan['AH'] > 0 && // Je possède un fond commercial - $tabRet['TypeExploitation'] != 2 && // et je ne suis pas Loueur d'un fond - $tabRet['TypeExploitation'] != 3 && // et je ne suis pas Prestataire de personnel - $tabRet['TypeExploitation'] != 10) { // et je ne suis pas exploitant direct - $tabRet['TypeExploitation'] = 10; - } - - // Controle de cohérence du capital car parfois absent en Alsace Moselle au RNCS - if ($tabRet['FJ'] > 2000 && $tabRet['Capital'] == 0 && $tabRet['CapitalDev'] == '') { - $tabRet['Capital'] = $tabRet['bilanDA']; - $tabRet['CapitalDev'] = $tabRet['bilanDevise']; - } - - $timer['infosBilan'] = microtime(true); - } elseif ($caEstime > 0 && $tabInsee['ACTIF'] == 1) { - $tabRet['bilanAnnee'] = date('Y')-2; - $tabRet['bilanFLestime'] = $caEstime; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - $tabRet['TribunalLib'] = $this->iBodacc->getTribunalNom($tabRet['Tribunal']); - - if ($this->debugtime) { - $duree = round(microtime(1)-$tdebIni, 3); - file_put_contents(LOG_PATH.'/accesDistant.log', date('YmdHis').";$siren;getIdentiteEntreprise Fin ($duree s) ===\n", FILE_APPEND); - } - - // Si on n'a trouvé aucune activité, on prend le libellé de l'activité pages Jaunes - if ($tabRet['Activite'] == '' && $activitePJ_An8 != '') { - $tabRet['Activite'] = $activitePJ_An8; - } - - // Numero de Registre du métier si nécessaire - if (($tabRet['FJ']==1100 || $tabRet['FJ']==1300 || $tabRet['FJ']==11 || $tabRet['FJ']==13 || $tabInsee['APRM'] != '') - && ($tabRet['Dept']=='2A' || $tabRet['Dept']=='2B' || $tabRet['Dept']<98)) { - // Artisan Commerçant OU Artisan en FRANCE - $tabRet['NumRM'] = $siren.' RM '.$tabRet['Dept']; - // Ajaccio - if ($tabRet['Dept'] == '2A') { - $tabRet['NumRM'].= '.1'; - } - // Bastia - elseif ($tabRet['Dept'] == '2B') { - $tabRet['NumRM'].= '.2'; - } elseif ($tabRet['Dept'] == 97) { - $tabRet['NumRM'].= substr($tabRet['codeCommune'], 0, 1); - } - } - - // Recherche des infos boursières - $iBourse = new Metier_Partenaires_MBourse(); - $bourse = $iBourse->getInfosBourse($siren); - $tabRet['Bourse'] = array( - 'placeCotation' => $bourse['placeCotation'], - 'nombreTitres' => $bourse['nombreTitres'], - 'capitalisation' => $bourse['close']*$bourse['nombreTitres'], - 'derCoursDate' => $bourse['date'], - 'derCoursCloture' => $bourse['close'] - ); - $timer['infosBoursieres'] = microtime(true); - } - - // Date de dernière mise à jour - $lastMaj = str_replace('-', '', $tabRet['DateMajINSEE'])*1; - if (str_replace('-', '', $tabRet['DateMajRCS'])*1 > $lastMaj) { - $lastMaj = str_replace('-', '', $tabRet['DateMajRCS'])*1; - } - if (str_replace('-', '', $tabRet['bilanDateMaj'])*1>$lastMaj) { - $lastMaj = str_replace('-', '', $tabRet['bilanDateMaj'])*1; - } - if (str_replace('-', '', $tabRet['dateMajANN'])*1>$lastMaj) { - $lastMaj = str_replace('-', '', $tabRet['dateMajANN'])*1; - } - $tabRet['dateMajIdentite'] = Metier_Util_Date::dateT('Ymd', 'Y-m-d', $lastMaj); - - return $tabRet; - } - - /** - * Dirigeants Opérationnel - * @param string $siren - * @param string $id - * @return array - */ - public function getDirigeantsOp($siren, $id = null) - { - $siren = $siren*1; - $tabRet = array(); - - $where = "siren=$siren AND d.codFct=f.codeFct AND dateSuppr='0000-00-00 00:00:00.000000'"; - if ($id != null) { - $where = "id=$id AND d.codFct=f.codeFct AND dateSuppr='0000-00-00 00:00:00.000000'"; - } - - try { - $stmt = $this->conn->executeQuery("SELECT id, siren, nic, civ, nom, prenom, nom_usage, - lieuNais, dateNais, d.codFct, f.libelle, tel, fax, email, dateInsert, dateUpdate - FROM sdv1.dirigeantsOp d, jo.bodacc_fonctions f WHERE $where"); - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRet[] = array( - 'Id' => $row['id'], - 'Fonction' => $row['codFct'], - 'Titre' => $row['libelle'], - 'Societe' => '', - 'Civilite' => $row['civ'], - 'Nom' => trim(strtoupper($row['nom'])), - 'Prenom' => ucwords(strtolower($row['prenom'])), - 'NomUsage' => $row['nom_usage'], - 'NaissDate' => $row['dateNais'], - 'NaissVille' => $row['lieuNais'], - 'NaissDepPays' => '', - 'Tel' => $row['tel'], - 'Fax' => $row['fax'], - 'Email' => $row['email'], - 'Ancien' => 0, - 'DateFct' => '', - 'Cinf' => 0, - ); - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $tabRet; - } - - /** - * Retourne les dirigeants actuelles ou l'historique - * @param string $siren - * @param boolean $histo - * @return array - */ - public function getDirigeants($siren, $histo = true) - { - $siren = intval($siren); - $tabRet = array(); - - if ($histo) { - try { - $stmt = $this->conn->executeQuery("SELECT d.num, d.dateEffet, d.Rubrique, d.fonction, - d.dirSiren, d.rs, d.nom, d.prenom, d.nomUsage, d.depart, d.dateInsert, f.libelle - FROM jo.bodacc_dirigeants d, jo.bodacc_detail b, jo.bodacc_fonctions f - WHERE b.SIREN=$siren AND b.id=d.id AND b.typeEven NOT BETWEEN 5000 AND 5700 AND b.typeEven - NOT BETWEEN 2700 AND 2900 AND d.fonction=f.codeFct - GROUP BY d.fonction, d.rs, d.nom, d.prenom - ORDER BY d.dateInsert DESC, d.dateEffet DESC, d.fonction DESC"); - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRet[] = array( - 'Fonction' => $row['fonction'], - 'Titre' => $row['libelle'], - 'Siren' => $row['dirSiren'], - 'Societe' => $row['rs'], - 'Nom' => trim(strtr($row['nom'], array( - "Modification d'"=>'', - "Modification de"=>'', - "Nomination d'un"=>'', - ))), - 'Prenom' => $row['prenom'], - 'NomUsage' => $row['nomUsage'], - 'Ancien' => $row['depart'], - 'DateFct' => $row['dateEffet'], //Date au format AAAA-MM-DD - ); - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - try { - $stmt = $this->conn->executeQuery("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 FROM historiques.entrep e, historiques.texte x - WHERE e.E1GSIR=$siren AND e.ANBASE=x.annonceNum - AND e.DATE BETWEEN 19960101 AND 20050101 AND x.annonceTxt LIKE '%Administration%' - GROUP BY e.ANBASE ORDER BY e.DATE DESC"); - if ($stmt->rowCount() > 0) { - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - if (($ann['CODEVE']<20) || ($ann['CODEVE']>=30 && $ann['CODEVE']<42) - || ($ann['CODEVE']>=51 && $ann['CODEVE']<80)) { - $pattern = '/Administration(?:.|)\:(.*)(?:Adresse.*|Commentaires?|Activit(?:e|é)|Etablissement principal|Date d\'effet|Date.de.d.but d.activit.)(?:.|)\:/Uisu'; - if (preg_match($pattern, $ann['annonceTxt'], $matches)) { - $iDir = 0; - $tabAdministration = $this->iBodacc->getDirigeants($matches[1]); - foreach ($tabAdministration as $tabDir) { - $nom = preg_replace('/ +/u', ' ', $tabDir['nom']); - $nom = trim(strtr($nom, array( - "Modification d'" => '', - "Modification" => '', - "Modification de" => '', - "Nomination d'un" => '', - "Nomination en qualité d'" => '', - "Nomination en qualité de" => '', - "dont le est" => '', - "nouvel" => '', - "partant" => '', - "ancien d'honneur" => '', - "nouveaux" => '', - "nouveau" => '', - "ancien" => '', - "Nouveau" => '', - "Cette société se constitue Date de début d'" => '', - ))); - if ($nom != '') { - $tabRet[] = array( - 'Fonction' => $tabDir['fonction'], - 'Titre' => $this->iBodacc->getFctDir($tabDir['fonction']), - 'Societe' => $tabDir['rs'], - 'Nom' => $nom, - 'Prenom' => $tabDir['prenom'], - 'NomUsage' => $tabDir['nomUsage'], - 'Ancien' => $tabDir['depart'], - 'DateFct' => Metier_Util_Date::dateT('Ymd', 'Y-m-d', $ann['DATE']), - ); - // Mauvaise idée performance - try { - $this->conn->insert('jo.bodacc_dirigeants_histo', array( - 'siren' => $siren, - 'id' => $ann['ANBASE'], - 'num' => $iDir, - 'dateEffet' => Metier_Util_Date::dateT('Ymd', 'Y-m-d', $ann['DATE']), - 'fonction' => $tabDir['fonction'], - 'rs' => $tabDir['rs'], - 'nom' => $nom, - 'prenom' => $tabDir['prenom'], - 'nomUsage' => $tabDir['nomUsage'], - 'depart' => $tabDir['depart'], - )); - } catch (\Doctrine\DBAL\DBALException $e) { - } - $iDir++; - } - } //End foreach - } - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - if (!$histo || ($histo && count($tabRet) == 0)) { - try { - $stmt = $this->conn->executeQuery("SELECT siren, raisonSociale, LPAD(dirSiren,9,0) AS dirSiren, - dirRS, civilite, nom, prenom, naissance_nom, naissance_date, naissance_lieu, - fonction_code, fonction_lib, cinf, dateFin, flux, dateInsert - FROM jo.rncs_dirigeants WHERE siren=$siren AND actif%10=1"); - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - if ($row['naissance_date'] != '0000-00-00') { - $dateNaiss = Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $row['naissance_date']); - } else { - $dateNaiss = ''; - } - - if ($row['flux'] != '0000-00-00') { - $dateModif = Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $row['flux']); - } else { - $dateModif = Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $row['dateInsert']); - } - - $nom = trim($row['nom']); - $nomUsage=''; - if (trim($row['naissance_nom']) != '') { - $nom = trim($row['naissance_nom']); - $nomUsage = trim($row['nom']); - } - $tabRet[] = array( - 'Fonction' => $row['fonction_code'], - 'Titre' => $row['fonction_lib'], - 'Siren' => $row['dirSiren'], - 'Societe' => $row['dirRS'], - 'Civilite' => $row['civilite'], - 'Nom' => $nom, - 'Prenom' => $row['prenom'], - 'NomUsage' => $nomUsage, - 'NaissDate' => $dateNaiss, - 'NaissVille' => $row['naissance_lieu'], - 'NaissDepPays' => '', // 25 - 'Ancien' => 0, - 'DateFct' => $dateModif, //Format AAAA-MM-DD - 'Cinf' => $row['cinf'], - ); - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - /** Recherche de CAC si liste des dirigeants actifs **/ - if (!$histo) { - try { - $stmt = $this->conn->executeQuery("SELECT d.num, d.dateEffet, d.Rubrique, d.fonction, - LPAD(d.dirSiren,9,0) AS dirSiren, d.rs, d.nom, d.prenom, d.nomUsage, d.depart, - d.dateInsert, f.libelle - FROM jo.bodacc_dirigeants d, jo.bodacc_detail b, jo.bodacc_fonctions f - WHERE b.SIREN=$siren AND b.id=d.id AND b.typeEven NOT BETWEEN 5000 AND 5700 - AND b.typeEven NOT BETWEEN 2700 AND 2900 AND d.fonction=f.codeFct - AND d.fonction BETWEEN 300 AND 304 GROUP BY d.fonction, d.rs, d.nom, d.prenom - ORDER BY d.dateEffet DESC, d.fonction DESC"); - if ($stmt->rowCount() > 0) { - $k = 0; - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $rs = trim(strtoupper($row['rs'])); - $nom = preg_replace('/en fonction le .*/i', '', $row['nom']); - $nom = preg_replace('/Nomination .*/i', '', $nom); - $nom = preg_replace('/Modification .*/i', '', $nom); - $nom = preg_replace('/Nouvelles?\s+$/i', '', trim($nom)); - $nom = preg_replace('/Nouveaux?\s+$/i', '', trim($nom)); - $nom = preg_replace('/ancien.*/i', '', $nom); - $nom = preg_replace('/en remplacement d.*/i', '', $nom); - $nom = trim(strtoupper(preg_replace('/(\.|,)$/', '', trim($nom)))); - $prenom = trim($row['prenom']); - if ($prenom == '' && $rs== '' && $nom != '') { - $rs = $nom; - $nom = ''; - } - $tabRet[] = array( - 'Fonction' => $row['fonction'], - 'Titre' => $row['libelle'], - 'Siren' => $row['dirSiren'], - 'Societe' => $rs, - 'Nom' => $nom, - 'Prenom' => $prenom, - 'NomUsage' => $row['nomUsage'], - 'Ancien' => $row['depart'], - 'DateFct' => $row['dateEffet'], //Format AAAA-MM-DD - ); - $k++; - // On s'arrête à 2 CAC (pb des co-cac non gérés) - if ($k>1) { - break; - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - /** Si on ne trouve absolument rien, on regarde quand même dans l'historique RNCS **/ - if (count($tabRet)==0) { - try { - $stmt = $this->conn->executeQuery("SELECT siren, raisonSociale, - LPAD(dirSiren,9,0) AS dirSiren, dirRS, civilite, nom, prenom, naissance_nom, - naissance_date, naissance_lieu, fonction_code, fonction_lib, cinf, dateFin, - flux, dateInsert, date(dateUpdate)*1 as dateUpdate - FROM jo.rncs_dirigeants WHERE siren=$siren AND actif%10=0 - ORDER BY dateUpdate DESC"); - if ($stmt->rowCount() > 0) { - $dateUpdatePre = null; - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - if ($row['naissance_date'] != '0000-00-00') { - $dateNaiss = Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $row['naissance_date']); - } else { - $dateNaiss = ''; - } - if ($row['flux'] != '0000-00-00') { - $dateModif = Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $row['flux']); - } else { - $dateModif = Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $row['dateInsert']); - } - - if ($dateUpdatePre === null) { - $dateUpdatePre = $row['dateUpdate']; - } - if ($row['dateUpdate'] != $dateUpdatePre) { - break; - } - $tabRet[] = array( - 'Fonction' => $row['fonction_code'], - 'Titre' => $row['fonction_lib'], - 'Siren' => $row['dirSiren'], - 'Societe' => $row['dirRS'], - 'Civilite' => $row['civilite'], - 'Nom' => trim($dir['nom']), - 'Prenom' => $row['prenom'], - 'NomUsage' => '', - 'NaissDate' => $dateNaiss, - 'NaissVille' => $row['naissance_lieu'], - 'NaissDepPays' => '', // 25 - 'Ancien' => 1, - 'DateFct' => $dateModif, //Format AAAA-MM-DD - 'Cinf' => $row['cinf'], - ); - $dateUpdatePre = $row['dateUpdate']; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - if (count($tabRet) == 0) { - if ($tabIdentite['FJ']*1 > 1000 && $tabIdentite['FJ']*1 < 2000) { - $tabTmp = explode(' ', $tabIdentite['Nom']); - $nom = $prenom = ''; - foreach ($tabTmp as $mot) { - if (strtoupper($mot) == $mot) { - $nom.= ' '.$mot; - } else { - $prenom.= ' '.$mot; - } - } - if ($etab['Civilite']*1==1) { - $genre = 'Monsieur '; - $civilite = 'M'; - } elseif ($etab['Civilite']*1==2) { - $genre = 'Madame '; - $civilite = 'MME'; - } else { - $genre = ''; - $civilite = ''; - } - try { - $stmt = $this->conn->executeQuery("SELECT SIREN, CJ, CIVILITE, DIR_DATEN, DIR_LIEUN - FROM insee.identite WHERE SIREN=$siren AND (DIR_DATEN>0 OR DIR_LIEUN != '') - ORDER BY DIR_DATEN DESC, DIR_LIEUN DESC"); - $row = $stmt->fetch(\PDO::FETCH_ASSOC); - $tabRet[] = array( - 'Titre' => 'Personne physique', - 'Societe' => '', - 'Civilite' => $civilite, - 'Nom' => trim($nom), - 'Prenom' => trim($prenom), - 'NomUsage' => '', - 'NaissDate' => Metier_Util_Date::dateT('Ymd', 'd/m/Y', $row['DIR_DATEN']), - 'NaissVille' => $row['DIR_LIEUN'], - 'NaissDepPays' => '', - 'Ancien' => 0, - 'DateFct' => $tabIdentite['DateCrea'], - ); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - try { - $this->conn->insert('jo.rncs_dirigeants', array( - 'siren' => $siren, - 'raisonSociale' => $etab['Nom'], - 'civilite' => $civilite, - 'nom' => trim($nom), - 'prenom' => trim($prenom), - 'naissance_nom' => '', - 'naissance_date'=> $row['DIR_DATEN'], - 'naissance_lieu'=> $row['DIR_LIEUN'], - 'fonction_code' => 1050, - 'fonction_lib' => 'Personne physique', - 'actif' => 1, - 'dateInsert' => date('YmdHis'), - 'source' => 'inp', - )); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - } - - return $tabRet; - } - - /** - * Retourne le nombre d'annonces - * @param string $siren - * @param number $idAnnonce - * @param string $rubrique - * @param string $deleted - * @return int - */ - public function getAnnoncesLegalesCount($siren, $idAnnonce = 0, $rubrique = '', $deleted = false) - { - // --- Where Bodacc - $sqlBodaccWhere = "d.siren=$siren"; - $sqlBodaccWhere.= $this->getAnnoncesLegalesRubrique('bodacc', $rubrique); - $sqlBodaccWhere.= " AND d.id=b.id AND b.Tribunal_Code=t.triCode"; - // --- Annonces supprimées ou rectifiées - if ($deleted === true) { - $sqlBodaccWhere.= " AND (d.dateSuppr=0 OR d.dateSuppr!='0000-00-00 00:00:00' AND d.idSuppr=0) "; - } else { - $sqlBodaccWhere.= " AND d.dateSuppr=0 "; - } - $sqlBodacc = $this->getAnnoncesLegalesBodacc(true)." WHERE ".$sqlBodaccWhere; - - // --- Where Histo - $sqlHistoWhere = "e.E1GSIR=$siren"; - $sqlHistoWhere.= $this->getAnnoncesLegalesRubrique('histo', $rubrique); - $sqlHistoWhere.= " AND e.ANBASE=x.annonceNum AND e.DATE BETWEEN 19890101 AND 20041231"; - $sqlHistoWhere.= " AND e.E1GSIR=e.SIREN"; - $sqlHistoWhere.= " GROUP BY e.ANBASE ORDER BY e.DATE DESC"; - $sqlHisto = $this->getAnnoncesLegalesHisto(true)." WHERE ".$sqlHistoWhere; - - // --- Where Annonce - $sqlAnnonceWhere = "a.siren=$siren"; - $sqlAnnonceWhere.= $this->getAnnoncesLegalesRubrique('annonce', $rubrique); - $sqlAnnonceWhere.= " AND a.tribunal=t.triCode AND a.dateSuppr=0"; - if ($visualisation === true) { - // --- Ne pas afficher les annonces si la procédure à plus de 4 mois - $sqlAnnonceWhere.= " AND a.dateJugement > DATE_SUB(NOW(), INTERVAL 24 MONTH)"; - } - $sqlAnnonceWhere.= " GROUP BY a.siren, a.dateJugement, a.typeEven ORDER BY a.dateJugement DESC"; - $sqlAnnonce = $this->getAnnoncesLegalesAnnonce(true)." WHERE ".$sqlAnnonceWhere; - - // --- SQL Union - try { - $sql = "SELECT count(*) AS num FROM ( (".$sqlBodacc.") - UNION ALL (".$sqlHisto.") UNION ALL (".$sqlAnnonce.") ) - results ORDER BY unionDate DESC"; - $stmt = $this->conn->executeQuery($sql); - $nb = 0; - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $nb = $result->nb; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $nb; - } - - /** - * Where SQL - * @param string $type bodacc, histo - * @param mixed $rubrique - * @return boolean|string - */ - public function getAnnoncesLegalesRubrique($type, $rubrique = '') - { - $where = ''; - - // --- Type Bodacc - if ($type == 'bodacc') { - // Procédure collective - if ($rubrique=='P' || $rubrique=='PH') { - $where = " AND d.Rubrique='procol' - AND d.typeEven NOT LIKE '%1005%' - AND d.typeEven NOT LIKE '%1010%' - AND d.typeEven NOT LIKE '%1050%' - AND d.typeEven NOT LIKE '%1055%' - AND d.typeEven NOT LIKE '%1550%' "; - } - // Dissolution de la société - elseif ($rubrique=='D') { - $where =" AND (d.typeEven LIKE '%2202%' OR d.typeEven LIKE '%2203%' OR d.typeEven LIKE '%2204%' OR - d.typeEven LIKE '%2210%' OR d.typeEven LIKE '%2211%' OR d.typeEven LIKE '%2212%') "; - } - // Absorption - elseif ($rubrique=='A') { - $where =" AND (d.typeEven LIKE '%2720%' OR d.typeEven LIKE '%2721%') "; - } - // BODACC A - elseif ($rubrique=='BODA') { - $where =" AND d.Rubrique IN ('creations','procol','ventes') "; - } - // BODACC B - elseif ($rubrique=='BODB') { - $where =" AND d.Rubrique IN ('mmd','radiations') "; - } - // Dépôt des comptes, BODACC C - elseif ($rubrique=='C' || $rubrique=='BODC') { - $where =" AND (d.Rubrique='comptes' OR d.typeEven LIKE '%3100%' OR d.typeEven LIKE '%3200%' - OR d.typeEven LIKE '%3300%' OR d.typeEven LIKE '%3999%') "; - } elseif ($rubrique=='R') { - $where =" AND (d.typeEven LIKE '%2202%' OR d.typeEven LIKE '%2203%' OR d.typeEven LIKE '%2204%' OR - d.typeEven LIKE '%2210%' OR d.typeEven LIKE '%2211%' OR d.typeEven LIKE '%2212%' OR - d.Rubrique='radiations') "; - } - // Location gérance Locataire - elseif ($rubrique=='L') { - $where =" AND (d.typeEven LIKE '%2800%' OR d.typeEven LIKE '%2875%' OR d.typeEven LIKE '%2880%' OR - d.typeEven LIKE '%2881%' OR d.typeEven LIKE '%2885%' OR d.typeEven LIKE '%2840%' OR - d.typeEven LIKE '%4355%') "; - } - // Location gérance Propriétaire - elseif ($rubrique=='G') { - $where =" AND (d.typeEven LIKE '%2850%' OR d.typeEven LIKE '%2851%' OR d.typeEven LIKE '%2860%' OR - d.typeEven LIKE '%2870%') "; - } - // Ventes/Cessions - elseif ($rubrique=='V') { - $where =" AND (d.typeEven LIKE '%5500%' OR d.typeEven LIKE '%5501%' OR d.typeEven LIKE '%5502%' OR - d.typeEven LIKE '%5503%' OR d.typeEven LIKE '%5510%' OR d.typeEven LIKE '%5600%' OR - d.typeEven LIKE '%5650%') "; - } elseif (is_array($rubrique) && count($rubrique)>0) { - $where =" AND ("; - foreach ($rubrique as $codeEven) { - $tabTmp[]=" d.typeEven LIKE '%$codeEven%' "; - } - $where.= implode(' OR ', $tabTmp); - $where.=')'; - } - } - - // --- Type historique - if ($type == 'histo') { - if ($rubrique=='P') { - $where =" AND e.E1GSIR NOT IN(340460104) AND e.CODEVE BETWEEN 50 AND 79 "; - } elseif ($rubrique=='PH') { - $where =" AND e.CODEVE BETWEEN 50 AND 79 "; - } elseif ($rubrique=='R') { - $where =" AND e.CODEVE BETWEEN 40 AND 42 "; - } elseif ($rubrique=='L') { - $where =" AND e.CODEVE IN(37,42) "; - } elseif ($rubrique=='G') { - $where =" AND e.CODEVE=38 "; - } elseif ($rubrique=='BODA') { - $where =" AND e.JAL=1 "; - } elseif ($rubrique=='BODB') { - $where =" AND e.JAL=200 "; - } elseif (is_array($rubrique)) { - $tabCodEve = $tabCodRol = array(); - foreach ($rubrique as $codeEvenTmp) { - $codRet=array_search($codeEvenTmp, $this->HistoRoleConvert); // Ne gère pas les ; de tabtmp2 - if ($codRet) { - $tabCodRol[] = $codRet; - } else { - $tabCodEve[] = array_search($codeEvenTmp, $this->HistoEvenConvert)*1; - } - } - $where =''; - $tabCodEve = array_unique($tabCodEve); - $tabCodRol = array_unique($tabCodRol); - if (count($tabCodEve)>0) { - $where.=' AND e.CODEVE IN('.implode(',', $tabCodEve).') '; - } - if (count($tabCodRol)>0) { - $where.=" AND e.ROLE IN('".implode("','", $tabCodRol)."') "; - } - } elseif (!empty($rubrique)) { - return false; - } - } - - // --- Type annonce - if ($type == 'annonce') { - // Procédure collective - if ($rubrique=='P' || $rubrique=='PH') { - $where = " AND a.typeEven BETWEEN 1000 AND 1999 AND a.typeEven NOT IN(1005, 1010, 1050, 1055, 1550) "; - } - // Dissolution de la société - elseif ($rubrique=='D') { - $where = " AND a.typeEven IN (2202, 2203, 2204, 2210, 2211, 2212) "; - } - // Absorption - elseif ($rubrique=='A') { - $where = " AND a.typeEven IN (2720, 2721) "; - } - // Dépôt des comptes - elseif ($rubrique=='C' || $rubrique=='BODC') { - $where = " AND a.typeEven BETWEEN 3000 AND 3999 "; - } elseif ($rubrique=='R') { - $where = " AND a.typeEven IN (2202, 2203, 2204, 2210, 2211, 2212) "; - } - // Location gérance Locataire - elseif ($rubrique=='L') { - $where = " AND a.typeEven IN (2800, 2875, 2880, 2881, 2885, 2840) "; - } - // Location gérance Propriétaire - elseif ($rubrique=='G') { - $where = " AND a.typeEven IN (2850, 2851, 2860, 2870) "; - } - // Ventes/Cessions - elseif ($rubrique=='V') { - $where = " AND a.typeEven IN (5500, 5501, 5502, 5503, 5510, 5600, 5650) "; - } elseif (is_array($rubrique) && count($rubrique)>0) { - $where = " AND (a.typeEven IN (".implode(',', $rubrique).') OR '; - foreach ($rubrique as $codeEven) { - $tabTmp[] = " a.typeEven LIKE '%$codeEven%' "; - } - $where.= implode(' OR ', $tabTmp); - $where.= ')'; - } elseif (!empty($rubrique)) { - return false; - } - } - - return $where; - } - - /** - * Parse les annonces légales pour déterminer leur rubrique - * plus rapide d'executer sur la liste des annonces légales que d'executer les requetes SQL - * @param array $annonces Annonces au format BDD - * @param mixed $rubrique - * @return array - * Retourne une liste filtrer suivant la/les rubriques - */ - public function annoncesInRubrique($annonces, $rubrique) - { - $annonceFilter = array(); - - foreach ($annonces as $ann) { - - // --- Formatage bodacc - if ($ann['SourceTable'] == 'bodacc') { - $typeEven = explode(' ', $ann['typeEven']); - // Procédure collective - if ($rubrique=='P' || $rubrique=='PH') { - $evenOk = true; - foreach ($typeEven as $even) { - if (in_array($even, array('1005', '1010', '1050', '1055', '1550'))) { - $evenOk = false; - break; - } - } - if ($ann['Rubrique'] == 'procol' && $evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Dissolution de la société - elseif ($rubrique=='D') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2202', '2203', '2204', '2210', '2211', '2212'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Absorption - elseif ($rubrique=='A') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2720', '2721'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - // BODACC A - elseif ($rubrique=='BODA') { - if (in_array($ann['Rubrique'], array('creations', 'procol', 'ventes'))) { - $annonceFilter[] = $ann; - } - } - // BODACC B - elseif ($rubrique=='BODB') { - if (in_array($ann['Rubrique'], array('mmd', 'radiations'))) { - $annonceFilter[] = $ann; - } - } - // Dépôt des comptes, BODACC C - elseif ($rubrique=='C' || $rubrique=='BODC') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('3100', '3200', '3300', '3999'))) { - $evenOk = true; - break; - } - } - if ($ann['Rubrique'] == 'comptes' || $evenOk === true) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='R') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2202', '2203', '2204', '2210', '2211', '2212'))) { - $evenOk = true; - break; - } - } - if ($ann['Rubrique'] == 'radiations' || $evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Location gérance Locataire - elseif ($rubrique=='L') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2800', '2875', '2880', '2881', '2885', '2840', '4355'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Location gérance Propriétaire - elseif ($rubrique=='G') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2850', '2851', '2860', '2870'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Ventes/Cessions - elseif ($rubrique=='V') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('5500', '5501', '5502', '5503', '5510', '5600', '5650'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } elseif (is_array($rubrique) && count($rubrique) > 0) { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, $rubrique)) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - } - - // --- Formattage Histo - elseif ($ann['SourceTable'] == 'histo') { - if ($rubrique=='P') { - if ($ann['E1GSIR'] != 340460104 && $ann['CODEVE'] >= 50 && $ann['CODEVE'] <= 79) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='PH') { - if ($ann['CODEVE'] >= 50 && $ann['CODEVE'] <= 79) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='R') { - if ($ann['CODEVE'] >= 40 && $ann['CODEVE'] <= 42) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='L') { - if (in_array($ann['CODEVE'], array(37, 42))) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='G') { - if ($ann['CODEVE'] == 38) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='BODA') { - if ($ann['JAL'] == 1) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='BODB') { - if ($ann['JAL'] == 200) { - $annonceFilter[] = $ann; - } - } elseif (is_array($rubrique)) { - $tabCodEve = $tabCodRol = array(); - foreach ($rubrique as $codeEvenTmp) { - $codRet=array_search($codeEvenTmp, $this->HistoRoleConvert); // Ne gère pas les ; de tabtmp2 - if ($codRet) { - $tabCodRol[] = $codRet; - } else { - $tabCodEve[] = array_search($codeEvenTmp, $this->HistoEvenConvert)*1; - } - } - $where =''; - $tabCodEve = array_unique($tabCodEve); - $tabCodRol = array_unique($tabCodRol); - if (in_array($ann['CODEVE'], $tabCodEve) || in_array($ann['ROLE'], $tabCodRol)) { - $annonceFilter[] = $ann; - } - } - } - - // --- Formattage Annonce - elseif ($ann['SourceTable'] == 'annonce') { - // Procédure collective - if ($rubrique=='P' || $rubrique=='PH') { - if ($ann['typeEven'] >= 1000 && $ann['typeEven'] <= 1999 && !in_array($ann['typeEven'], - array('1005', '1010', '1050', '1055', '1550'))) { - $annonceFilter[] = $ann; - } - } - // Dissolution de la société - elseif ($rubrique=='D') { - if (in_array($ann['typeEven'], array('2202', '2203', '2204', '2210', '2211', '2212'))) { - $annonceFilter[] = $ann; - } - } - // Absorption - elseif ($rubrique=='A') { - if (in_array($ann['typeEven'], array('2720', '2721'))) { - $annonceFilter[] = $ann; - } - } - // Dépôt des comptes - elseif ($rubrique=='C' || $rubrique=='BODC') { - if ($ann['typeEven'] >= 3000 && $ann['typeEven'] <= 3999) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='R') { - if (in_array($ann['typeEven'], array('2202', '2203', '2204', '2210', '2211', '2212'))) { - $annonceFilter[] = $ann; - } - } - // Location gérance Locataire - elseif ($rubrique=='L') { - if (in_array($ann['typeEven'], array('2800', '2875', '2880', '2881', '2885', '2840'))) { - $annonceFilter[] = $ann; - } - } - // Location gérance Propriétaire - elseif ($rubrique=='G') { - if (in_array($ann['typeEven'], array('2850', '2851', '2860', '2870'))) { - $annonceFilter[] = $ann; - } - } - // Ventes/Cessions - elseif ($rubrique=='V') { - if (in_array($ann['typeEven'], array('5500', '5501', '5502', '5503', '5510', '5600', '5650'))) { - $annonceFilter[] = $ann; - } - } elseif (is_array($rubrique) && count($rubrique)>0) { - foreach ($typeEven as $even) { - if (in_array($even, $rubrique)) { - $annonceFilter[] = $ann; - } - } - } - } - } - - return $annonceFilter; - } - - /** - * Tri les annonces de la fonction getAnnoncesLegales - * @param array $annonces - * @param mixed $rubrique - * @return array - */ - public function annoncesFilter($annonces, $rubrique) - { - $annonceFilter = array(); - - foreach ($annonces as $ann) { - $typeEven = array(); - foreach ($ann['evenements'] as $item) { - $typeEven[] = $item['CodeEven']; - } - - // Procédure collective - if ($rubrique=='P' || $rubrique=='PH') { - $evenOk = true; - foreach ($typeEven as $even) { - if (in_array($even, array('1005', '1010', '1050', '1055', '1550'))) { - $evenOk = false; - break; - } - } - if ($ann['Rubrique'] == 'procol' && $evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Dissolution de la société - elseif ($rubrique=='D') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2202', '2203', '2204', '2210', '2211', '2212'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Absorption - elseif ($rubrique=='A') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2720', '2721'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - // BODACC A - elseif ($rubrique=='BODA') { - if (in_array($ann['Rubrique'], array('creations', 'procol', 'ventes'))) { - $annonceFilter[] = $ann; - } - } - // BODACC B - elseif ($rubrique=='BODB') { - if (in_array($ann['Rubrique'], array('mmd', 'radiations'))) { - $annonceFilter[] = $ann; - } - } - // Dépôt des comptes, BODACC C - elseif ($rubrique=='C' || $rubrique=='BODC') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('3100', '3200', '3300', '3999'))) { - $evenOk = true; - break; - } - } - if ($ann['Rubrique'] == 'comptes' || $evenOk === true) { - $annonceFilter[] = $ann; - } - } elseif ($rubrique=='R') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2202', '2203', '2204', '2210', '2211', '2212'))) { - $evenOk = true; - break; - } - } - if ($ann['Rubrique'] == 'radiations' || $evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Location gérance Locataire - elseif ($rubrique=='L') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2800', '2875', '2880', '2881', '2885', '2840', '4355'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Location gérance Propriétaire - elseif ($rubrique=='G') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('2850', '2851', '2860', '2870'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - // Ventes/Cessions - elseif ($rubrique=='V') { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, array('5500', '5501', '5502', '5503', '5510', '5600', '5650'))) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } elseif (is_array($rubrique) && count($rubrique) > 0) { - $evenOk = false; - foreach ($typeEven as $even) { - if (in_array($even, $rubrique)) { - $evenOk = true; - break; - } - } - if ($evenOk === true) { - $annonceFilter[] = $ann; - } - } - } - - return $annonceFilter; - } - - /** - * Analyse les annonces légales pour déterminer si en plan - * @param string $type Type d'annonce bodacc|histo|annonces - * @param int $fj Code catégorie juridique - * @param array $annonce Une annonce - */ - public function getAnnoncesLegalesPlan($type, $fj, $annonce) - { - // --- Bodacc - if ($type == 'bodacc') { - $tabEven = explode(';', $annonce['typeEven']); - foreach ($tabEven as $even) { - $this->matchPlanDuree($even, $annonce['dateJugement'], $annonce['annonce']); - } - } - // --- Annonce - if ($type == 'annonce') { - $this->matchPlanDuree($annonce['typeEven'], $annonce['dateJugement'], $annonce['annonce']); - } - - // --- Historique - if ($type == 'histo') { - $this->matchPlanDuree($annonce['CODEVE'], $annonce['DATE'], $annonce['annonceTxt']); - } - } - - /** - * - */ - protected function matchPlanDuree($eve, $date, $txt) - { - if ($this->debug) { - file_put_contents('procol.log', "MATCH DUREE PLAN : ", FILE_APPEND); - } - - $evenDetect = array( - '75', // Histo - '1407', // Modification de plan - '1409', // Modification du plan de continuation - '1413', // Arrêt du plan de continuation - '1414', // Arrêt du plan de redressement - '1101', // Arrêt du plan de sauvegarde - ); - - $fjDetect = array( - 16,1600, // Exploitant agricole - 63,6316,6317,6318, // Société coopérative agricole - 5431,5432,5531,5532, // SMIA, SICA - 5631,5632,6532, - 6533,6534,6535, // GAEC, GFA, Gpt Agricole Foncier - 6597,6598, - ); - - if (in_array($eve, $evenDetect)) { - if (($this->dureePlan == 0 || $this->dureePlan == 120)) { - // --- Lecture dureePlan dans annonce - $this->debutPlan = str_replace('-', '', $date); // SSAAMMJJ - if (preg_match('/dur.e(?:.*)plan(?:.*)(\d+)\s+ans?/Uisu', $txt, $matches)) { - $this->dureePlan = $matches[1]*12; // 10 ans = 120 mois - } - if (preg_match('/dur.e(?:.*)plan(?:.*)(\d+)\s+mois?/Uisu', $txt, $matches)) { - $this->dureePlan = $matches[1]; - } - // --- Duree du Plan par défaut sur FJ et par défaut - if ($this->dureePlan < 1 || $this->dureePlan > 120) { - if (in_array($fj, $fjDetect)) { - $this->dureePlan = 180; // 15 ans - } else { - $this->dureePlan = 120; // 10 ans = 120 mois - } - } - if ($this->debug) { - file_put_contents('procol.log', $this->dureePlan." mois", FILE_APPEND); - } - $this->finPlan = Metier_Util_Date::period2Days($this->debutPlan, $this->dureePlan.' mois'); - } - } - - if ($this->debug) { - file_put_contents('procol.log', "\n", FILE_APPEND); - } - } - - protected function getAnnoncesLegalesEffacement($siren, $rubrique, $tabRet) - { - if ($this->debug) { - file_put_contents('procol.log', "Effacement Procol\n", FILE_APPEND); - } - $effacement = false; - $MaxPeriodProcol = 80000; - // --- Si il y a des annonces - if (count($tabRet) > 0) { - $tabJugements = array(); - $TopEvenCloture = false; - // --- Liste des jugements principaux - Tri chronologique par date de jugement - foreach ($tabRet as $i => $ann) { - $item = new stdClass(); - $dateJug = str_replace('-', '', $ann['dateJugement'])*1; - $datePar = str_replace('-', '', $ann['DateParution'])*1; - if ($dateJug > 0) { - $item->date = $dateJug; - $item->dateISO8601 = $ann['dateJugement']; - } elseif ($datePar > 0) { - $item->date = $datePar; - $item->dateISO8601 = $ann['DateParution']; - } - $item->code = $ann['evenements'][0]['CodeEven']; - $tabJugements[] = $item; - // Detection TopDepart Cloture - if (in_array($item->code, array(1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1311, 1312, 1313, 1314, 1417))) { - $TopEvenCloture = true; - } - // Dernier Evenement de Procol - $evenProcolLastDate = $item->date; - $evenProcolLast = $item->code; - if ($this->debug) { - file_put_contents('procol.log', "Parcours Even : $evenProcolLastDate - $evenProcolLast ($TopEvenCloture)\n", FILE_APPEND); - } - } - // --- Gestions des conditions pour l'affichage de l'indicateur procédure collectives - if ($rubrique == 'P') { - if ($this->debug) { - file_put_contents('procol.log', "Rubrique P\n", FILE_APPEND); - } - // Si plan recherche des annonces suivantes - if ($this->dureePlan > 0) { - if ($this->debug) { - file_put_contents('procol.log', "=== Vérification Elimination du plan === \n", FILE_APPEND); - } - // Tableau chronologique des dates de jugement => code jugement - foreach ($tabJugements as $i => $j) { - if ($this->debug) { - file_put_contents('procol.log', $j->date.'>'.$this->debutPlan.', Jugement='.$j->code."\n", FILE_APPEND); - } - // Si plan suivi de SV, RJ, LJ ou clôture alors pas de plan - if ($j->date > $this->debutPlan && in_array($j->code, array( - // Sauvegarde - 1100, 1101, - // RJ - 1200, 1201, 1202, 1211, 1217, - // LJ - 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, - // Extension SV, LJ, RJ - 1417, 1418, 1419, - // Cloture - 1500, 1501, 1502, 1503, 1504, 1514 ))) { - $this->dureePlan = 0; - } - } - if ($this->debug) { - file_put_contents('procol.log', "Durée du plan : ".$this->dureePlan."\n", FILE_APPEND); - } - } - - // --- Gestion de la cloture - if (substr($this->Identite['FJ'], 0, 1) != 1 && $TopEvenCloture && in_array($evenProcolLast, array(1502, 1503))) { - if ($this->debug) { - file_put_contents('procol.log', "=== Cloture ===\n", FILE_APPEND); - } - if ($this->debug) { - file_put_contents('procol.log', "Cloture après procédure\n", FILE_APPEND); - } - $this->SituationCloture = true; - } - // --- Evenements effaçant l'indicateur P dans Situation Juridique - else { - if ($this->debug) { - file_put_contents('procol.log', "=== Traitement effacement procol ===\n", FILE_APPEND); - } - $tabNoProcol = array(); - try { - $stmt = $this->conn->executeQuery("SELECT codEven, affProcol FROM jo.tabEvenements WHERE affProcol>0"); - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabNoProcol[$row['codEven']] = $row['affProcol']; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if (array_key_exists($evenProcolLast, $tabNoProcol)) { - if ($this->debug) { - file_put_contents('procol.log', "Vérification Effacement procol : $evenProcolLast\n", FILE_APPEND); - } - switch ($tabNoProcol[$evenProcolLast]) { - // PAS DE MENTION DE LA PROCOL - case 1: - if ($this->debug) { - file_put_contents('procol.log', "affProcol = 1\n", FILE_APPEND); - } - $effacement = true; - break; - // Ne pas mentionner la procol si CJ=1xxx OU si actif et CJ!=9xxx et even de plus d'un mois - case 2: - if (substr($this->Identite['FJ'], 0, 1)*1==1) { - if ($this->debug) { - file_put_contents('procol.log', "affProcol = 2\n", FILE_APPEND); - } - $effacement = true; - } elseif ($this->Identite['Actif']*1 > 0 && substr($this->Identite['FJ'], 0, 1)*1 != 9) { - if ($this->debug) { - file_put_contents('procol.log', "affProcol = 2\n", FILE_APPEND); - } - $maxLatence = date('Ymd', mktime(0, 0, 0, - substr($evenProcolLastDate, 4, 2)*1+1, - substr($evenProcolLastDate, 6, 2), - substr($evenProcolLastDate, 0, 4))); - if (date('Ymd') > $maxLatence) { - $effacement = true; - } - } - break; - // Pas Procol si actif RCS - case 3: - if ($this->Identite['Actif']*1>0) { - if ($this->debug) { - file_put_contents('procol.log', "affProcol = 3\n", FILE_APPEND); - } - $effacement = true; - } - break; - // Le dernier jugement est un appel => Procol Suspendu - case 4: - if ($this->debug) { - file_put_contents('procol.log', "affProcol = 4\n", FILE_APPEND); - } - $this->appelJugement = true; - break; - } - } - - // --- Procédure trop ancienne plus de 12 ans et actif - $dateTropAncienne = (date('Ymd')*1) - $MaxPeriodProcol; - if ($evenProcolLastDate < $dateTropAncienne && $this->Identite['Actif']*1 > 0) { - $derPr = Metier_Util_Date::dateT('Ymd', 'd/m/Y', $evenProcolLastDate); - $effacement = true; - if ($this->debug) { - file_put_contents('procol.log', "Procédure trop ancienne plus de 12 ans et actif\n", FILE_APPEND); - } - } - // --- En Procol mais présence d'une annonce de cloture ou LJ avec Bilan publié ultérieurement - elseif (in_array($evenProcolLast, array( - 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1311, 1312, 1313, - 1500, 1501, 1502, 1503, 1504 - ))) { - $mBil = new Metier_Partenaires_MBilans(); - $mBil->setSiren($siren); - $tabBilans = $mBil->listeBilans(false); - $derExercice = 0; - foreach ($tabBilans as $idx => $bilan) { - if ($bilan['dateExercice'] > $derExercice) { - $derExercice = $bilan['dateExercice']; - } - } - if ($derExercice > $evenProcolLastDate) { - if ($this->debug) { - file_put_contents('procol.log', "En Procol mais présence d'une annonce de cloture ou LJ avec Bilan publié ultérieurement\n", FILE_APPEND); - } - if ($this->debug) { - file_put_contents('procol.log', "$derExercice > $evenProcolLastDate\n", FILE_APPEND); - } - $derEx = Metier_Util_Date::dateT('Ymd', 'd/m/Y', $derExercice); - $derPr = Metier_Util_Date::dateT('Ymd', 'd/m/Y', $evenProcolLastDate); - $effacement = true; - } - } - } - } - // --- Dissolution mais bilan après événements - elseif ($rubrique == 'D') { - $mBil = new Metier_Partenaires_MBilans(); - $mBil->setSiren($siren); - $tabBilans = $mBil->listeBilans(false, 3); - $derExercice = 0; - foreach ($tabBilans as $idx => $bilan) { - if ($bilan['dateExercice'] > $derExercice) { - $derExercice = $bilan['dateExercice']; - } - } - if ($derExercice > $evenProcolLastDate) { - $derEx = Metier_Util_Date::dateT('Ymd', 'd/m/Y', $derExercice); - $derPr = Metier_Util_Date::dateT('Ymd', 'd/m/Y', $evenProcolLastDate); - $effacement = true; - - if ($this->debug) { - file_put_contents('procol.log', "Effacement dissolution : $derExercice > $evenProcolLastDate\n", FILE_APPEND); - } - } - } - } - - return $effacement; - } - - protected function getAnnoncesLegalesBodacc($count = false) - { - if ($count === true) { - $sql = "SELECT b.id AS id, b.Bodacc_Date_Parution AS unionDate, 'bodacc' AS SourceTable"; - } else { - if ($this->AnnoncesLegalesVisu) { - $unionDate = 'b.Bodacc_Date_Parution AS unionDate'; - } else { - $unionDate = 'd.dateJugement AS unionDate'; - } - $sql = "SELECT - b.id AS id, - /* BODACC */ - b.Bodacc_Code, - b.Bodacc_Annee_Parution, - b.Bodacc_Num, - b.Num_Annonce, - b.Bodacc_Date_Parution, - b.Tribunal_Dept, - b.Tribunal_Code, - d.Rubrique, - b.typeAnnonce, - b.corrNum_Annonce, - b.corrBodacc_Date_Parution, - b.corrPage, - b.corrNumParution, - b.corrTexteRectificatif, - b.annonce, - b.dateInsert, - d.typeEven, - d.dateEffet, - d.dateDebutActivite, - d.dateCessationActivite, - d.dateJugement, - d.dateFinObservation, - d.VenteMt, - d.VenteDev, - d.FJ, - d.Capital, - d.CapitalDev, - CONCAT(d.commentaires,' ',d.fusion) AS complement, - d.raisonSociale, - d.nomCommercial, - d.enseigne, - d.sigle, - d.adresse, - d.codePostal, - d.ville, - d.adresseSiege, - d.codePostalSiege, - d.villeSiege, - /* HISTO */ - '' AS ANBASE, - '' AS NOBOD, - '' AS CODTRI, - '' AS JAL, - '' AS DATE, - '' AS CODEVE, - '' AS SSCODE, - '' AS DEPT, - '' AS NOANN, - '' AS ROLE, - '' AS SIREN, - '' AS E1GSIR, - '' AS E1GNIC, - '' AS annonceNum, - '' AS annonceTxt, - /* ANNONCE */ - '' AS strEven, - '' AS dateCessationPaiement, - '' AS dateEffetFinP, - '' AS numero, - '' AS inter1type, - '' AS inter1id, - '' AS inter1nom, - '' AS inter2type, - '' AS inter2id, - '' AS inter2nom, - '' AS inter3type, - '' AS inter3id, - '' AS inter3nom, - '' AS inter4type, - '' AS inter4id, - '' AS inter4nom, - '' AS tribunal, - '' AS montant, - '' AS actionsNb, - '' AS nouvActivite, - '' AS nouvDir, - '' AS nouvAdr, - '' AS nouvFJ, - '' AS source, - '' AS parutionIdJal, - '' AS parutionNum, - '' AS dateSource, - /* UNION NEEDED */ - t.triCode, - t.triNom, - t.triSiret, - t.triCP, - IF(d.dateSuppr=0,'',d.dateSuppr) AS deleted, - ".$unionDate.", - 'bodacc' AS SourceTable - FROM jo.bodacc_detail d, jo.bodacc b, jo.tribunaux t"; - } - - return $sql; - } - - protected function getAnnoncesLegalesHisto($count = false) - { - if ($count === true) { - $sql = "SELECT e.ANBASE AS id, DATE_FORMAT(e.DATE, '%Y-%m-%d') AS unionDate, 'histo' AS SourceTable"; - } else { - $sql = "SELECT - e.ANBASE AS id, - /* BODACC */ - '' AS Bodacc_Code, - '' AS Bodacc_Annee_Parution, - '' AS Bodacc_Num, - '' AS Num_Annonce, - '' AS Bodacc_Date_Parution, - '' AS Tribunal_Dept, - '' AS Tribunal_Code, - '' AS Rubrique, - '' AS typeAnnonce, - '' AS corrNum_Annonce, - '' AS corrBodacc_Date_Parution, - '' AS corrPage, - '' AS corrNumParution, - '' AS corrTexteRectificatif, - '' AS annonce, - '' AS dateInsert, - '' AS typeEven, - '' AS dateEffet, - '' AS dateDebutActivite, - '' AS dateCessationActivite, - '' AS dateJugement, - '' AS dateFinObservation, - '' AS VenteMt, - '' AS VenteDev, - '' AS FJ, - '' AS Capital, - '' AS CapitalDev, - '' AS complement, - '' AS raisonSociale, - '' AS nomCommercial, - '' AS enseigne, - '' AS sigle, - '' AS adresse, - '' AS codePostal, - '' AS ville, - '' AS adresseSiege, - '' AS codePostalSiege, - '' AS villeSiege, - /* HISTO */ - e.ANBASE, - e.NOBOD, - e.CODTRI, - e.JAL, - e.DATE, - e.CODEVE, - e.SSCODE, - e.DEPT, - e.NOANN, - e.ROLE, - e.SIREN AS siren, - e.E1GSIR, - e.E1GNIC, - x.annonceNum, - x.annonceTxt, - /* ANNONCE */ - '' AS strEven, - '' AS dateCessationPaiement, - '' AS dateEffetFinP, - '' AS numero, - '' AS inter1type, - '' AS inter1id, - '' AS inter1nom, - '' AS inter2type, - '' AS inter2id, - '' AS inter2nom, - '' AS inter3type, - '' AS inter3id, - '' AS inter3nom, - '' AS inter4type, - '' AS inter4id, - '' AS inter4nom, - '' AS tribunal, - '' AS montant, - '' AS actionsNb, - '' AS nouvActivite, - '' AS nouvDir, - '' AS nouvAdr, - '' AS nouvFJ, - '' AS source, - '' AS parutionIdJal, - '' AS parutionNum, - '' AS dateSource, - /* UNION NEEDED */ - '' AS triCode, - '' AS triNom, - '' AS triSiret, - '' AS triCP, - '' AS deleted, - DATE_FORMAT(e.DATE, '%Y-%m-%d') AS unionDate, - 'histo' AS SourceTable - FROM historiques.texte x, historiques.entrep e"; - } - - return $sql; - } - - protected function getAnnoncesLegalesAnnonce($count = false) - { - if ($count == true) { - $sql = "SELECT a.id AS id, a.dateJugement AS unionDate, 'annonce' AS SourceTable"; - } else { - if ($this->AnnoncesLegalesVisu) { - $unionDate = 'a.dateJugement AS unionDate'; - } else { - $unionDate = 'a.dateJugement AS unionDate'; - } - $sql = "SELECT - a.id AS id, - /* BODACC */ - '' AS Bodacc_Code, - '' AS Bodacc_Annee_Parution, - '' AS Bodacc_Num, - '' AS Num_Annonce, - '' AS Bodacc_Date_Parution, - '' AS Tribunal_Dept, - '' AS Tribunal_Code, - '' AS Rubrique, - '' AS typeAnnonce, - '' AS corrNum_Annonce, - '' AS corrBodacc_Date_Parution, - '' AS corrPage, - '' AS corrNumParution, - '' AS corrTexteRectificatif, - a.annonce, - a.dateInsert, - a.typeEven, - '' AS dateEffet, - '' AS dateDebutActivite, - '' AS dateCessationActivite, - a.dateJugement, - '' AS dateFinObservation, - '' AS VenteMt, - '' AS VenteDev, - '' AS FJ, - '' AS Capital, - '' AS CapitalDev, - a.complement, - a.raisonSociale, - '' AS nomCommercial, - '' AS enseigne, - '' AS sigle, - a.adresse, - a.codePostal, - a.ville, - '' AS adresseSiege, - '' AS codePostalSiege, - '' AS villeSiege, - /* HISTO */ - '' AS ANBASE, - '' AS NOBOD, - '' AS CODTRI, - '' AS JAL, - '' AS DATE, - '' AS CODEVE, - '' AS SSCODE, - '' AS DEPT, - '' AS NOANN, - '' AS ROLE, - a.siren, - '' AS E1GSIR, - '' AS E1GNIC, - '' AS annonceNum, - '' AS annonceTxt, - /* ANNONCE */ - a.strEven, - a.dateCessationPaiement, - a.dateEffetFinP, - a.numero, - a.inter1type, - a.inter1id, - a.inter1nom, - a.inter2type, - a.inter2id, - a.inter2nom, - a.inter3type, - a.inter3id, - a.inter3nom, - a.inter4type, - a.inter4id, - a.inter4nom, - a.tribunal, - a.montant, - a.actionsNb, - a.nouvActivite, - a.nouvDir, - a.nouvAdr, - a.nouvFJ, - a.source, - a.parutionIdJal, - a.parutionNum, - DATE_FORMAT(a.dateSource, '%Y-%m-%d') AS dateSource, - /* UNION NEEDED */ - t.triCode, - t.triNom, - t.triSiret, - t.triCP, - '' AS deleted, - ".$unionDate.", - 'annonce' AS SourceTable - FROM jo.annonces a, jo.tribunaux t"; - } - - return $sql; - } - - /** - * Liste des annonces légales pour un siren donnée - * @param integer $siren - * @param integer $idAnnonce - * @param mixed $rubrique Filter par rubrique - * (P)rocol, (D)issolution, (R)adiation, (A)bsorption, (L)ocataire, (G)érance:propriétaire, - * (V)endeur, bodacc (C), (BODA) (BODB) (BODC) ou tableau des codeEven - * @param bool $forceVerif - * @return array - */ - public function getAnnoncesLegales($siren, $idAnnonce=0, $rubrique='', $forceVerif=false, $allTextes=false, $deleted=false) - { - $siren = intval($siren); - $tabRet = array(); - $this->dureePlan = 0; // Par défaut, on ne trouve aucune durée de plan - - if (!is_array($rubrique) && !in_array($rubrique, array('', 'P', 'PH', 'D', 'A', 'C', 'R', 'L', 'G', 'V', 'BODA', 'BODB', 'BODC'))) { - return false; - } - - if ($idAnnonce != 0) { - // --- Annonce - if (substr($idAnnonce, 0, 2) == '0.') { - $idAnnonce = substr($idAnnonce, 2); - $sqlAnnonceWhere = "a.id=$idAnnonce"; - $sqlAnnonceWhere.= " AND a.tribunal=t.triCode AND a.dateSuppr=0"; - $sqlAnnonceWhere.= " GROUP BY a.siren, a.dateJugement, a.typeEven ORDER BY a.dateJugement DESC"; - $sql = $this->getAnnoncesLegalesAnnonce()." WHERE ".$sqlAnnonceWhere; - } - // --- Histo - elseif ($idAnnonce < 0) { - $idAnnonce = abs($idAnnonce); - $sqlHistoWhere = "e.ANBASE=$idAnnonce "; - $sqlHistoWhere.= " AND e.ANBASE=x.annonceNum AND e.DATE BETWEEN 19890101 AND 20041231"; - /*$sqlHistoWhere.= " AND e.E1GSIR=e.SIREN";*/ - $sqlHistoWhere.= " GROUP BY e.ANBASE ORDER BY e.DATE DESC"; - $sql = $this->getAnnoncesLegalesHisto()." WHERE ".$sqlHistoWhere; - } - // --- Bodacc - elseif ($idAnnonce > 0) { - $sqlBodaccWhere ="d.id=$idAnnonce "; - $sqlBodaccWhere.= " AND d.id=b.id AND b.Tribunal_Code=t.triCode"; - $sql = $this->getAnnoncesLegalesBodacc()." WHERE ".$sqlBodaccWhere; - } - } else { - // --- Where Bodacc - $sqlBodaccWhere = "d.siren=$siren"; - $sqlBodaccWhere.= $this->getAnnoncesLegalesRubrique('bodacc', $rubrique); - $sqlBodaccWhere.= " AND d.id=b.id AND b.Tribunal_Code=t.triCode"; - // --- Annonces supprimées ou rectifiées - if ($deleted === true) { - $sqlBodaccWhere.= " AND (d.dateSuppr=0 OR d.dateSuppr!='0000-00-00 00:00:00' AND d.idSuppr=0) "; - } else { - $sqlBodaccWhere.= " AND d.dateSuppr=0 "; - } - $sqlBodacc = $this->getAnnoncesLegalesBodacc()." WHERE ".$sqlBodaccWhere; - - // --- Where Histo - $sqlHistoRubrique = $this->getAnnoncesLegalesRubrique('histo', $rubrique); - if ($sqlHistoRubrique !== false) { - $sqlHistoWhere = "e.E1GSIR=$siren"; - $sqlHistoWhere.= $sqlHistoRubrique; - $sqlHistoWhere.= " AND e.ANBASE=x.annonceNum AND (e.DATE BETWEEN 19960101 AND 20041231 OR e.DATE<19960101 AND e.E1GSIR=e.SIREN)"; - $sqlHistoWhere.= " GROUP BY e.ANBASE"; - $sqlHisto = $this->getAnnoncesLegalesHisto()." WHERE ".$sqlHistoWhere; - } - - // --- Where Annonce - $sqlAnnonceRubrique = $this->getAnnoncesLegalesRubrique('annonce', $rubrique); - if ($sqlAnnonceRubrique !== false) { - $sqlAnnonceWhere = "a.siren=$siren"; - $sqlAnnonceWhere.= $sqlAnnonceRubrique; - $sqlAnnonceWhere.= " AND a.tribunal=t.triCode AND a.dateSuppr=0"; - // --- Ne pas utiliser les annonces si la procédure à plus de 4 mois - $sqlAnnonceWhere.= " AND a.dateJugement > DATE_SUB(NOW(), INTERVAL 24 MONTH)"; - $sqlAnnonceWhere.= " GROUP BY a.siren, a.dateJugement, a.typeEven"; - $sqlAnnonce = $this->getAnnoncesLegalesAnnonce()." WHERE ".$sqlAnnonceWhere; - } - - // --- SQL Union - $sql = "SELECT * FROM ( (".$sqlBodacc.") "; - if (!empty($sqlHisto)) { - $sql.= " UNION ALL (".$sqlHisto.") "; - } - if (!empty($sqlAnnonce)) { - $sql.= " UNION ALL (".$sqlAnnonce.") "; - } - - // --- Gestion des événements à date - if ($this->companyEvenDateStop != null) { - $sql.= ") results WHERE unionDate < '".$this->companyEvenDateStop."'"; - } else { - $sql.= ") results"; - } - - // --- Gestion de l'ordre de tri - if ($this->AnnoncesLegalesVisu) { - $sql.= " ORDER BY unionDate DESC"; - } else { - $sql.= " ORDER BY unionDate ASC, FIELD(SourceTable, 'histo', 'annonce', 'bodacc')"; - } - } - - try { - $stmt = $this->conn->executeQuery($sql); - - // --- Traitement des resultats - if ($stmt->rowCount() > 0) { - // --- Identite Light de l'entité - if ($this->Identite === null) { - $this->Identite = $this->getIdentiteLight($siren); - } - // --- Parcours des annonces - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - // --- Formatage bodacc - if ($ann['SourceTable'] == 'bodacc') { - $tabEven = explode(';', $ann['typeEven']); - $tabRetEven = array(); - // --- Annonce rubrique insertion - if ($ann['typeAnnonce']!='Insertion') { - // --- Sélection des événements - foreach ($tabEven as $even) { - if (intval($even) != 0) { - $tabRetEven[] = array( - 'CodeEven' => $even, - 'LibEven' => $this->iBodacc->getEvenement($even) - ); - } - } - // Libellé générique - $tabRetEven[] = array( - 'CodeEven' => '0000', - 'LibEven' => $ann['typeAnnonce']." de l'annonce du ". - Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $ann['corrBodacc_Date_Parution']) - ); - } - // --- Annonce autre rubrique - else { - if (trim($ann['typeEven'])!='') { - foreach ($tabEven as $even) { - if (intval($even) != 0) { - $tabRetEven[] = array( - 'CodeEven' => $even, - 'LibEven' => $this->iBodacc->getEvenement($even) - ); - } - } - // --- Detection plan - if ($this->AnnoncesLegalesVisu === false) { - $this->getAnnoncesLegalesPlan('bodacc', $this->Identite['FJ'], $ann); - } - } else { - switch ($ann['Rubrique']) { - case 'mmd': $codeEven='2313'; $libEven = "Modification(s) diverse(s)"; break; - case 'comptes': $codeEven='3999'; $libEven = "Dépôt des comptes"; break; - case 'creations': $codeEven='4999'; $libEven = "Création d'entreprise"; break; - case 'procol': $codeEven='1999'; $libEven = "Procédure collective"; break; - case 'radiations': $codeEven='6700'; $libEven = "Radiation"; break; - case 'ventes': $codeEven='5999'; $libEven = "Vente/Cession"; break; - default: $codeEven='0000'; $libEven = $ann['Rubrique']; break; - } - $tabRetEven[] = array( - 'CodeEven' => $codeEven, - 'LibEven' => $libEven - ); - } - } - - $dateCes = str_replace('-', '', $ann['dateCessationActivite'])*1; - $dateDeb = str_replace('-', '', $ann['dateDebutActivite'])*1; - $dateEff = str_replace('-', '', $ann['dateEffet'])*1; - if ($dateCes > 0) { - $dateEffet = $ann['dateCessationActivite']; - } elseif ($dateDeb > 0) { - $dateEffet = $ann['dateDebutActivite']; - } else { - $dateEffet = $ann['dateEffet']; - } - $adresseAnn = trim(preg_replace('/ +/', ' ', $ann['adresseSiege'].' '.$ann['codePostalSiege'].' '.$ann['villeSiege'])); - - if (strlen($adresse) <8) { - $adresseAnn = trim(preg_replace('/ +/', ' ', $ann['adresse'].' '.$ann['codePostal'].' '.$ann['ville'])); - } - // --- Retour bodacc - $retFormat = array( - 'id' => $ann['id'], - 'BodaccCode' => 'BOD'.$ann['Bodacc_Code'], - 'BodaccNum' => $ann['Bodacc_Num'], - 'NumAnnonce' => $ann['Num_Annonce'], - 'DateParution' => $ann['Bodacc_Date_Parution'], - 'Departement' => $ann['Tribunal_Dept'], - 'Tribunal' => $ann['triNom'], - 'TribunalCode' => $ann['triCode'], - 'TribunalSiret' => $ann['triSiret'], - 'Rubrique' => $ann['Rubrique'], - 'typeAnnonce' => $ann['typeAnnonce'], - 'texteRectificatif' => $ann['corrTexteRectificatif'], - 'dateEffet' => $dateEffet, - 'dateJugement' => $ann['dateJugement'], - 'dateFin' => $ann['dateFinObservation'], - 'montantVente' => trim($ann['VenteMt'].' '.$ann['VenteDev']), - 'libFJ' => $ann['FJ'], - 'codFJ' => $this->iBodacc->getCodeFormeJur($ann['FJ']), - 'capital' => $ann['Capital'], - 'capitalDev' => $ann['CapitalDev'], - 'raisonSociale' => $ann['raisonSociale'], - 'nomCommercial' => $ann['nomCommercial'], - 'sigle' => $ann['sigle'], - 'adresse' => $adresseAnn, - 'dateInsertionSD' => $ann['dateInsert'], - 'evenements' => $tabRetEven, - 'complement' => $ann['complement'], - 'deleted' => $ann['deleted'], - 'texteAnnonce' => $ann['annonce'], - ); - $tabRet[] = $retFormat; - } - // --- Formattage Histo - elseif ($ann['SourceTable'] == 'histo') { - if ($ann['JAL']==1) { - $Bodacc_Code='BODA'; - } elseif ($ann['JAL']==200) { - $Bodacc_Code='BODB'; - } - // 4xxx - if ($ann['CODEVE']<20) { - $rub='creations'; - } - // 5xxx - elseif ($ann['CODEVE']<=25) { - $rub='ventes'; - } - // 2xxx - elseif ($ann['CODEVE']<40) { - $rub='mmd'; - } - // 6xxx - elseif ($ann['CODEVE']<42) { - $rub='radiations'; - } - // 2xxx - elseif ($ann['CODEVE']<50) { - $rub='mmd'; - } - // 1xxx - elseif ($ann['CODEVE']<80) { - $rub='procol'; - } - - $tabEvens = array(); - $newCodeEven = $this->HistoEvenConvert[$ann['CODEVE']]; - if ($newCodeEven*1 == 2318) { - $tabNewEven = explode(';', $this->HistoRoleConvert[$ann['ROLE']]); - if (count($tabNewEven) > 0) { - foreach ($tabNewEven as $newCodeEven) { - $tabEvens[] = array( - 'CodeEven' => $newCodeEven, - 'LibEven' => $this->iBodacc->getEvenement($newCodeEven)); - } - } else { - $tabEvens[] = array( - 'CodeEven' => $newCodeEven, - 'LibEven' => $this->iBodacc->getEvenement($newCodeEven) - ); - } - } else { - $tabEvens[] = array( - 'CodeEven' => $newCodeEven, - 'LibEven' => $this->iBodacc->getEvenement($newCodeEven) - ); - - // --- Detection plan - if ($this->AnnoncesLegalesVisu === false) { - $this->getAnnoncesLegalesPlan('histo', $this->Identite['FJ'], $ann); - } - } - // Recherche du capital et de la FJ dans le texte histo - if (($ann['CODEVE']>=10 && $ann['CODEVE']<20) - || ($ann['CODEVE']>=30 && $ann['CODEVE']<42) - || ($ann['CODEVE']>=51 && $ann['CODEVE']<80)) { - // Recherche du capital - if (preg_match('/Capital(?:.|)\:(.*)(eur.|f|livre)/Uis', $ann['annonceTxt'], $matches)) { - $capital=trim(strtr($matches[1], array(' '=>'', ',00 '=>'', '.00 '=>'')))*1; - if (substr(strtoupper($matches[2]), 0, 3)=='EUR') { - $capitalDev = 'EUR'; - } elseif (substr(strtoupper($matches[2]), 0, 3)=='LIV') { - $capitalDev = 'GBP'; - } else { - $capitalDev = 'FRF'; - } - } else { - $capital=$capitalDev=''; - } - // Recherche de la forme juridique - if (preg_match('/Forme(?:.|)\:(.*)(Capital|Adresse|Activit.|Administration|Commentaire)(?:.|)\:/Uisu', $ann['annonceTxt'], $matches)) { - $libFJ = trim($matches[1]); - } - } - - // --- Retour histo - $retFormat = array( - 'id' => -$ann['ANBASE'], - 'BodaccCode' => $Bodacc_Code, - 'BodaccNum' => $ann['NOBOD'], - 'NumAnnonce' => $ann['NOANN'], - 'DateParution' => substr($ann['DATE'], 0, 4).'-'.substr($ann['DATE'], 4, 2).'-'.substr($ann['DATE'], 6, 2), - 'Departement' => $ann['DEPT'], - 'Tribunal' => $this->iBodacc->getTribunalNom($ann['CODTRI']), //$ann['triNom'], - 'TribunalSiret' => $this->iBodacc->getTribunalSiret($ann['CODTRI']),//$ann['triSiret'], - 'Rubrique' => $rub, - 'typeAnnonce' => 'Insertion', - 'dateEffet' => substr($ann['DATE'], 0, 4).'-'.substr($ann['DATE'], 4, 2).'-'.substr($ann['DATE'], 6, 2), - 'dateJugement' => substr($ann['DATE'], 0, 4).'-'.substr($ann['DATE'], 4, 2).'-'.substr($ann['DATE'], 6, 2), - 'dateFin' => '', - 'montantVente' => '', - 'libFJ' => $libFJ, - 'codFJ' => $this->iBodacc->getCodeFormeJur($libFJ), - 'capital' => $capital, - 'capitalDev' => $capitalDev, - 'raisonSociale' => '',//$ann['raisonSociale'], - 'nomCommercial' => '',//$ann['nomCommercial'], - 'sigle' => '',//$ann['sigle'], - 'adresse' => '',//$adresseAnn, - 'dateInsertionSD' => '', - 'evenements' => $tabEvens, - 'texteAnnonce' => $ann['NOANN'].' - '.$ann['annonceTxt'], - ); - $tabRet[] = $retFormat; - } - // --- Formattage Annonce - elseif ($ann['SourceTable'] == 'annonce') { - $rubriqueRet = ''; - $tabInter = array( - 'A' => 'Administrateur judiciaire', - 'M' => 'Mandataire judiciaire', - 'H' => 'Huissier', - 'L' => 'Liquidateur', - 'R' => 'Représentant des Créanciers', - 'O' => 'Opposition', - 'U' => 'Curateur', - 'C' => 'Commissaire au plan', - 'S' => 'Syndic', - 'D' => 'Commissaire au concordat', - 'T' => 'Conciliateur', - 'V' => 'Avocat', - 'N' => 'Notaire', - 'J' => 'Juge Commissaire', - 'K' => 'Juge Commissaire Suppléant', - ); - $dept = substr($ann['triCP'], 0, 2)*1; - $depotComptes = false; - if ($dept==97) { - $dept = substr($ann['triCP'], 0, 3)*1; - } - $adresse=''; - - /** Ajout des informations identitaires pour les annonces collecte avant Décembre 2008 **/ - if (trim($ann['raisonSociale'])=='' || trim($ann['adresse'])=='' - || trim($ann['codePostal'])=='' || trim($ann['ville'])=='') { - $ann['raisonSociale'] = $this->Identite['Nom']; - $ann['adresse'] = $this->Identite['Adresse']; - $ann['codePostal'] = $this->Identite['CP']; - $ann['ville'] = $this->Identite['Ville']; - } - $adresse.= ucfirst(strtolower($ann['adresse'])).', '; - $adresse = trim(preg_replace('/^0+/', '', preg_replace('/ +/', ' ', $adresse))); - if (preg_match('/(3100|3200|3300|3999)/', $ann['typeEven'].';'.$ann['strEven'])) { - $depotComptes = true; - $strRCS = 'Siren : '. $ann['siren'] . '. '; - } else { - $strRCS = $ann['siren'] . ' RCS '. ucfirst(strtolower(strtr($ann['triNom'], array('TGIcc '=>'', 'TGI '=>'', 'TC '=>'', 'TI '=>'', )))).'. '; - } - - $texteAnnonce = 'Date : '.strtolower(Metier_Util_Date::dateT('Y-m-d', 'd M Y', $ann['dateJugement'])).'. '. - $this->iBodacc->getEvenement($ann['typeEven']).'. '. - $strRCS . trim($ann['raisonSociale']).'. Adresse : '. - $adresse.' '.$ann['codePostal'].' '.$ann['ville'].'. '; - - if (trim($ann['numero']) != '') { - $texteAnnonce.='Jugement Numéro : '.trim($ann['numero']).'. '; - } - - if ($ann['dateCessationPaiement']*1 != 0) { - $texteAnnonce.='Cessation des paiements le '.strtolower(Metier_Util_Date::dateT('Y-m-d', 'd M Y', $ann['dateCessationPaiement'])).'. '; - } - - for ($mandNum = 1; $mandNum < 5; $mandNum++) { - if (trim($ann['inter'.$mandNum.'type']) != '' - && ($ann['inter'.$mandNum.'id']>0 || trim($ann['inter'.$mandNum.'nom']) != '')) { - $texteAnnonce.= $tabInter[$ann['inter'.$mandNum.'type']].' : '.$ann['inter'.$mandNum.'nom']; - if ($ann['inter'.$mandNum.'id'] != 0) { - $mandStmt = $this->conn->executeQuery( - "SELECT sirenGrp, sirenMand, tel, fax, email - FROM jo.tabMandataires WHERE id=".$ann['inter'.$mandNum.'id']); - $mand = $mandStmt->fetch(\PDO::FETCH_ASSOC); - if ($mand['sirenGrp'] != 0) { - $texteAnnonce.= ', Siren SCP '.$mand['sirenGrp']; - } - if ($mand['sirenMand'] != 0) { - $texteAnnonce.= ', Siren '.$mand['sirenMand']; - } - if ($mand['tel'] != '') { - $texteAnnonce.= ', Telephone '.$mand['tel']; - } - if ($mand['fax'] != '') { - $texteAnnonce.= ', Telecopie '.$mand['fax']; - } - if ($mand['email'] != '') { - $texteAnnonce.= ', E-mail : '.$mand['email']; - } - } - $texteAnnonce.= '. '; - } - } - - if (trim($ann['nouvActivite']) != '') { - $texteAnnonce.= ' Activité : '.trim($ann['nouvActivite']).'. '; - } - if (trim($ann['nouvDir']) != '') { - $texteAnnonce.= ' Administration : '.trim($ann['nouvDir']).'. '; - } - if (trim($ann['nouvAdr']) != '') { - $texteAnnonce.= ' Nouvelle adresse : '.trim($ann['nouvAdr']).'. '; - } - if ($ann['nouvFJ']*1 > 0) { - $texteAnnonce.= ' Transformation de la société en '.$this->getLibelleFJ($ann['nouvFJ']).'. '; - } - - if ($ann['dateEffetFinP']*1 != '') { - if ($depotComptes) { - $texteAnnonce.= ' Comptes annuels et rapports de l\'exercice clos le : '. - strtolower(Metier_Util_Date::dateT('Y-m-d', 'd M Y', $ann['dateEffetFinP'])).'. '; - } else { - $texteAnnonce.= ' Date d\'effet : '. - strtolower(Metier_Util_Date::dateT('Y-m-d', 'd M Y', $ann['dateEffetFinP'])).'. '; - } - } - - if (trim($ann['complement']) != '') { - $texteAnnonce.= ' Observations : '.trim($ann['complement']).'.'; - } - - $tabRetEven = array(); - $tabRetEven[] = array( - 'CodeEven' => $ann['typeEven'], - 'LibEven' => $this->iBodacc->getEvenement($ann['typeEven']) - ); - if ($ann['typeEven']==2102 || $ann['typeEven']==2100) { - $capital = true; - } else { - $capital = false; - } - - if (trim($ann['strEven']) != '') { - $tabEven = explode(';', $ann['strEven']); - foreach ($tabEven as $even) { - $tabRetEven[] = array( - 'CodeEven' => $even, - 'LibEven' => $this->iBodacc->getEvenement($even) - ); - if ($even>=1000 && $even<2000) { - $rubriqueRet = 'procol'; - } elseif ($even>=2000 && $even<3000) { - $rubriqueRet='mmd'; - } elseif ($even>=3000 && $even<4000) { - $rubriqueRet = 'comptes'; - } elseif ($even>=4000 && $even<5000) { - $rubriqueRet = 'creations'; - } elseif ($even>=5000 && $even<6000) { - $rubriqueRet = 'ventes'; - } elseif ($even>=6000 && $even<7000) { - $rubriqueRet = 'radiations'; - } - if ($even==2102 || $even==2100) { - $capital = true; - } - } - } - - // --- Detection plan - if ($this->AnnoncesLegalesVisu === false) { - $this->getAnnoncesLegalesPlan('annonce', $this->Identite['FJ'], $ann); - } - - $strVente=''; - $nouvCapital=''; - if ($ann['montant']>0) { - if ($capital) { - $nouvCapital=$ann['montant']; - $texteAnnonce.=' Nouveau capital : '.trim($ann['montant']). ' euros'; - if ($ann['actionsNb']>0) { - $texteAnnonce.=' divisé en '.$ann['actionsNb'].' actions de '. round($ann['montant']/$ann['actionsNb']). ' euros'; - } - } elseif (!preg_match('/ pour un montant de /Uis', $ann['complement'])) { - $texteAnnonce.=' Montant : '.trim($ann['montant']). ' euros'; - $strVente=trim($ann['montant']). ' EUR'; - } - $texteAnnonce.='. '; - } - - // On ne prend l'annonce saisie directement que si elle est plus volumineuse - if (trim($ann['annonce']) != '' && strlen(trim($ann['annonce']))>strlen($texteAnnonce)) { - $texteAnnonce=trim($ann['annonce']); - } - - $texteAnnonce = preg_replace('/ +/', ' ', strtr($texteAnnonce, array('*'=>' ', '/'=>' ', '..'=>'.'))); - - if (str_replace('-', '', $ann['dateSource'])*1 != 0) { - $dateParution = $ann['dateSource']; - } else { - $dateParution = $ann['dateInsert']; - } - - $retFormat = array( - 'id' => '0.'.$ann['id'], - 'BodaccCode' => $ann['source'].'-'.$ann['parutionIdJal'], - 'BodaccNum' => $ann['parutionNum'], - 'NumAnnonce' => 0, - 'DateParution' => $dateParution, - 'Departement' => $dept, - 'Tribunal' => $ann['triNom'], - 'TribunalSiret' => $ann['triSiret'], - 'Rubrique' => $rubriqueRet, - 'typeAnnonce' => 'insertion', - 'dateEffet' => $ann['dateCessationPaiement'], - 'dateJugement' => $ann['dateJugement'], - 'dateFin' => $ann['dateEffetFinP'], - 'montantVente' => $strVente, - 'libFJ' => $ann['nouvFJ'], - 'codFJ' => $this->iBodacc->getCodeFormeJur($ann['nouvFJ']), - 'capital' => $nouvCapital, - 'capitalDev' => 'EUR', - 'raisonSociale' => $ann['raisonSociale'], - 'nomCommercial' => '', - 'sigle' => '', - 'adresse' => $ann['nouvAdr'], - 'dateInsertionSD' => $ann['dateInsert'], - 'evenements' => $tabRetEven, - 'texteAnnonce' => $texteAnnonce, - 'complement' => $ann['complement'], - ); - if ($depotComptes) { - $retFormat['dateEffet'] = $ann['dateEffetFinP']; - } - $tabRet[] = $retFormat; - } - } // --- Fin du parcours des annonces - - // --- Effacement procol - if ($this->AnnoncesLegalesVisu === false) { - if ($this->getAnnoncesLegalesEffacement($siren, $rubrique, $tabRet) === true) { - return array(); - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $tabRet; - } - - /** - * Retourne les annonces du bulletin des annonces légales officielles - * @param string $siren - * @param int $idAnnonce - * @param int $offset - * @param int $lignes - * @return array - */ - public function getAnnoncesBalo($siren, $idAnnonce=0, $offset=0, $lignes=100) - { - $siren = str_pad($siren, 9, '0', STR_PAD_LEFT); - - $strIdAnn = ''; - $tabRet = array(); - - if ($idAnnonce > 0) { - $tmp = explode('.', $idAnnonce); - if (is_numeric($tmp[0])) { - $num = $tmp[0]; - if (is_numeric($tmp[1])) { - $par = $tmp[1]; - } - $strIdAnn = " AND Num_Affaire='$num' AND Num_Parution='$par' "; - } - } - - $mBalo = new Metier_Bodacc_MBalo(); - - try { - $stmt = $this->conn->executeQuery("SELECT Societe_Rcs, Categorie, Num_Affaire, - Date_Parution, Num_Parution, Url_Annonce_Html, Url_Annonce_Pdf, Annonce_Html, dateInsert - FROM jo.balo WHERE Societe_Rcs='$siren' $strIdAnn - ORDER BY Date_Parution DESC, Num_Affaire LIMIT $offset, $lignes"); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($stmt->rowCount() > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRetEven = array( 0 => array( - 'CodeEven' => $mBalo->getLibEven($row['Categorie']), - 'LibEven' => $row['Categorie'] - )); - - $texte = ''; - if ($idAnnonce != 0) { - $texte = strtr(preg_replace('//Uis', '', - preg_replace('/( class=".*")/ie', ' ', $row['Annonce_Html'])), - array(' '=>' ', ''=>'', ''=>'') - ); - } - - $tabRet[] = array( - 'id' => $row['Num_Affaire'].'.'.$row['Num_Parution'], - 'BodaccCode' => 'BALO', - 'BodaccNum' => $row['Num_Parution'], - 'NumAnnonce' => $row['Num_Affaire'], - 'DateParution' => $row['Date_Parution'], - 'typeAnnonce' => 'Insertion', - 'dateInsertionSD' => $row['dateInsert'], - 'evenements' => $tabRetEven, - 'Lien_Annonce_Pdf' => basename($row['Url_Annonce_Pdf']), - 'texteAnnonce' => $texte, - ); - } - } - - return $tabRet; - } - - /** - * Retourne le nombre d'annonce Balo pour un siren - * @param string $siren - * @return int - */ - public function getAnnoncesBaloCount($siren) - { - $nb = 0; - - try { - $stmt = $this->conn->executeQuery("SELECT COUNT(*) AS nb FROM jo.balo - WHERE Societe_Rcs='$siren' ORDER BY Date_Parution DESC, Num_Affaire"); - if ($stmt->rowCount()) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - return $result->nb; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $nb; - } - - /** - * Retourne les annonces du bulletin officiel des annonces de marché publique - * @param string $siren - * @param string $idAnnonce - * @param string|array $type A:Avis d'attribution, M:Avis de marché - * @param int $offset - * @param int $lignes - * @return Ambigous multitype:multitype:string Ambigous , unknown> - */ - public function getAnnoncesBoamp($siren, $idAnnonce='', $type=array('A', 'M'), $offset=0, $lignes=100) - { - $siren = intval($siren); - - $strIdAnn = ''; - $idA = 0; - $tabRet = array(); - - $mBoamp = new Metier_Bodacc_MBoamp(); - - // --- Recherche dans les avis d'attribution - if (is_string($type) && $type == 'A' || is_array($type) && in_array('A', $type)) { - if ($idAnnonce != '') { - $tmp = explode('.', $idAnnonce); - $idA = $tmp[1]; - if ($tmp[0] == 'A') { - $strIdAnn = " AND l.id='$idA' "; - } elseif ($tmp[0] == 'O') { - $strIdAnn = ""; - } - } - try { - $stmt = $this->conn->executeQuery("SELECT l.id, l.idAnn, l.Boamp_Code, l.Boamp_Rubrique, - b.Boamp_Rubrique_Lib, b.typeAnnonce, l.Boamp_Date_Parution, b.Boamp_Num, - b.Boamp_Annee_Parution, b.Num_AnnoncePre, b.Num_Annonce, b.Boamp_Dept, b.annonce, - l.num, l.`desc` AS description, l.nom, d.raisonSociale, l.montantTxt, - sum(l.montant) AS montant, l.montantAnMin, l.montantAnMax, l.trancheCond, - l.trancheFerme, l.dateAttrib, l.intitule, l.nomenclature, l.objets, l.cpv, - l.cpvComp, l.volume, l.execution, l.livraison, l.dureeJours, l.dureeMois, l.dateDeb, - l.dateFin, l.dateInsert, d.titre, d.objet, d.titreMarche, d.typeObjetMarche, d.objetAutre, d.autres - FROM jo.boamp_lots l, jo.boamp b, jo.boamp_detail d - WHERE l.siren=$siren AND l.idAnn=b.id $strIdAnn AND d.id=b.id - GROUP BY b.id ORDER BY l.Boamp_Date_Parution DESC LIMIT $offset,$lignes"); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($stmt->rowCount() > 0) { - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabRetEven = array(); - if ($ann['nom'] != '') { - $strMontant= ' "'.strtoupper($ann['raisonSociale']).'"'; - } - if ($ann['montant']*1 > 0) { - $strMontant.= ' ('.number_format($ann['montant'], 2, ',', ' ').' EUR)'; - } elseif ($ann['montantTxt'] != '') { - $strMontant.= ' ('.$ann['montantTxt'].')'; - } elseif ($ann['montantAnMin'] != '' && $ann['montantAnMax']) { - $strMontant.= ' ('.$ann['montantAnMin'].' à '.$ann['montantAnMax'].')'; - } elseif ($ann['trancheCond'] != '' && $ann['trancheFerme']) { - $strMontant.= ' ('.$ann['trancheCond'].' / '.$ann['trancheFerme'].')'; - } else { - $strMontant.= ''; - } - - $tabRetEven[] = array( - 'CodeEven' => $mBoamp->getCodEvenSd($ann['Boamp_Rubrique']), - 'LibEven' => $mBoamp->getLibEvenBoamp($ann['Boamp_Rubrique'], - $ann['Boamp_Rubrique_Lib']).$strMontant - ); - - // Axxx pour lot attribué ou Oxxx pour Organisation - if ($ann['Num_AnnoncePre'] != 0) { - $numAnn = $ann['Num_AnnoncePre'].'-'.$ann['Num_Annonce']; - } else { - $numAnn = $ann['Num_Annonce']; - } - if ($ann['Boamp_Code']=='MAPA') { - $lienMapa = 'http://www.boamp.fr/index.php?action=avis&num_parution=MAPA&num_annonce='. - $ann['Num_AnnoncePre'].'-'.$ann['Num_Annonce'].'&total=500&_s=0&indice=0'; - } else { - $lettre = substr($ann['Boamp_Code'], -1); - $annee = $ann['Boamp_Annee_Parution']; - $num = sprintf("%04d", $ann['Boamp_Num']); - $numPar = $lettre.$annee.$num; - $lienMapa = 'http://www.boamp.fr/index.php?action=avis&num_parution='. - $numPar.'&num_annonce='.$ann['Num_Annonce'].'&total=500&_s=0&indice=0'; - } - $objetMarche = trim($ann['objet'].' '.$ann['objetAutre'].' '.$ann['autres']); - if ($idA != 0) { - if ($ann['Boamp_Code'] == 'MAPA') { - $texte = $ann['annonce']; - } else { - $texte = strtr(preg_replace('//Uis', '', - preg_replace('//Uis', '', - preg_replace('/( class=".*")/ie', ' ', $ann['annonce']))), - array(' '=>' ', ''=>'', ''=>'', '

'=>'
') - ); - } - } - $tabRet[] = array( - 'id' => 'A.'.$ann['id'], - 'BodaccCode' => $ann['Boamp_Code'], - 'BodaccNum' => $ann['Boamp_Num'], - 'NumAnnonce' => $numAnn, - 'DateParution' => $ann['Boamp_Date_Parution'], - 'Departement' => $ann['Boamp_Dept'], - 'typeAnnonce' => $ann['typeAnnonce'], - 'dateInsertionSD' => $ann['dateInsert'], - 'Montant' => $ann['montant'], - 'Organisme' => strtoupper($ann['raisonSociale']), - 'Objet' => $objetMarche, - 'evenements' => $tabRetEven, - 'infosComp' => '', - 'Lien_Annonce_Html' => $lienMapa, - 'texteAnnonce' => $texte, - ); - } - } - } - - // --- Recherche dans les avis de marchés - if (is_string($type) && $type=='M' || is_array($type) && in_array('M', $type)) { - if ($idAnnonce != '') { - $tmp = explode('.', $idAnnonce); - $idA = $tmp[1]; - if ($tmp[0] == 'A') { - $strIdAnn = " AND d.id='$idA' "; - } elseif ($tmp[0] == 'O') { - $strIdAnn = ""; - } - } - try { - $stmt = $this->conn->executeQuery("SELECT d.id, d.Boamp_Code, d.Boamp_Rubrique, - b.Boamp_Rubrique_Lib, b.typeAnnonce, d.Boamp_Date_Parution, b.Boamp_Num, - b.Boamp_Annee_Parution, b.Num_AnnoncePre, b.Num_Annonce, b.Boamp_Dept, - b.annonce, titre AS description, d.raisonSociale, d.estimValeur AS montantTxt, - d.estimValeurMin AS montantAnMin, d.estimValeurMax AS montantAnMax, - objet, cpv_obj, cpv_comp, d.dateInsert - FROM jo.boamp b, jo.boamp_detail d - WHERE d.siren=$siren AND d.id=b.id $strIdAnn - GROUP BY b.id ORDER BY d.Boamp_Date_Parution DESC LIMIT $offset,$lignes"); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($stmt->rowCount() > 0) { - while ($ann = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $id = $ann['id']; - $rub = $ann['Boamp_Rubrique']; - $tabRetEven = array(); - $strMontant = ''; - if ($ann['objet'] != '') { - $strMontant.= ' "'.$ann['objet'].'"'; - } - - if ($rub=='6' || // Avis d'attribution - $rub=='7' || // Avis en cas de transparence ex ante volontaire - $rub=='77' || // Avis d'attribution - $rub=='8' || // Avis d'attribution - $rub=='82' || // Rectificatif - $rub=='83' || // Rectificatif - $rub=='84' || // Avis d'attribution comportant des lots infructueux - $rub=='9' || // Résultat de marché - $rub=='92' || // Rectificatif - $rub=='93' || // Résultat de marché / Infructueux - Sans suite - $rub=='94' || // Résultat de marché / Résultat de marché comportant des lots infructueux - $rub=='96' || // Annulation - Rectificatif - Sans suite - Infructueux - $rub=='977' // Annulation - Rectificatif / Avis en cas de transparence ex ante volontaire - ) { - $stmt2 = $this->conn->executeQuery("SELECT l.id, l.idAnn, l.Boamp_Code, - l.Boamp_Rubrique, l.Boamp_Date_Parution, l.num, l.desc AS description, - l.nom, l.montantTxt, l.montant, l.montantAnMin, l.montantAnMax, - l.trancheCond, l.trancheFerme, l.dateAttrib, l.intitule, l.nomenclature, - l.objets, l.cpv, l.cpvComp, l.volume, l.execution, l.livraison, - l.dureeJours, l.dureeMois, l.dateDeb, l.dateFin - FROM jo.boamp_lots l WHERE l.idAnn=$id"); - while ($ann2 = $stmt2->fetch(\PDO::FETCH_ASSOC)) { - if ($ann2['nom'] != '') { - $strMontant.= ' "'.strtoupper($ann2['nom']).'"'; - } - if ($ann2['montant']*1 > 0) { - $strMontant.= ' ('.number_format($ann2['montant'], 2, ',', ' ').' EUR)'; - } elseif ($ann2['montantTxt'] != '') { - $strMontant.= ' ('.$ann2['montantTxt'].')'; - } elseif ($ann2['montantAnMin'] != '' && $ann2['montantAnMax']) { - $strMontant.= ' ('.$ann2['montantAnMin'].' à '.$ann2['montantAnMax'].')'; - } elseif ($ann2['trancheCond'] != '' && $ann2['trancheFerme']) { - $strMontant.= ' ('.$ann['trancheCond'].' / '.$ann['trancheFerme'].')'; - } else { - $strMontant.= ''; - } - } - } - $tabRetEven[] = array( - 'CodeEven' => $mBoamp->getCodEvenSd($ann['Boamp_Rubrique']), - 'LibEven' => $mBoamp->getLibEvenBoamp($ann['Boamp_Rubrique'], - $ann['Boamp_Rubrique_Lib']).$strMontant - ); - - // Axxx pour lot attribué ou Oxxx pour Organisation - if ($ann['Num_AnnoncePre'] != 0) { - $numAnn = $ann['Num_AnnoncePre'].'-'.$ann['Num_Annonce']; - } else { - $numAnn = $ann['Num_Annonce']; - } - if ($ann['Boamp_Code'] == 'MAPA') { - $lienMapa = 'http://www.boamp.fr/index.php?action=avis&num_parution=MAPA&num_annonce='. - $ann['Num_AnnoncePre'].'-'.$ann['Num_Annonce'].'&total=500&_s=0&indice=0'; - } else { - $lettre = substr($ann['Boamp_Code'], -1); - $annee = $ann['Boamp_Annee_Parution']; - $num = sprintf("%04d", $ann['Boamp_Num']); - $numPar = $lettre.$annee.$num; - $lienMapa = 'http://www.boamp.fr/index.php?action=avis&num_parution='.$numPar. - '&num_annonce='.$ann['Num_Annonce'].'&total=500&_s=0&indice=0'; - } - if ($idA != 0) { - if ($ann['Boamp_Code'] == 'MAPA') { - $texte = $ann['annonce']; - } else { - $texte = strtr(preg_replace('//Uis', '', - preg_replace('//Uis', '', - preg_replace('/( class=".*")/ie', ' ', $ann['annonce']))), - array(' '=>' ', ''=>'', ''=>'', '

'=>'
') - ); - } - } - $tabRet[] = array( - 'id' => 'O.'.$id, - 'BodaccCode' => $ann['Boamp_Code'], - 'BodaccNum' => $ann['Boamp_Num'], - 'NumAnnonce' => $numAnn, - 'DateParution' => $ann['Boamp_Date_Parution'], - 'Departement' => $ann['Boamp_Dept'], - 'typeAnnonce' => $ann['typeAnnonce'], - 'dateInsertionSD' => $ann['dateInsert'], - 'evenements' => $tabRetEven, - 'infosComp' => '', - 'Lien_Annonce_Html' => $lienMapa, - 'texteAnnonce' => $texte, - ); - } - } - } - - if ($this->logger !== null) { - $this->logger->info("getAnnoncesBoamp(siren=$siren, idAnnonce=$idAnnonce, $idA)"); - } - return $tabRet; - } - - /** - * Nombre total d'annonces BOAMP - * @param string $siren - * @param string $type A:avis d'attribution, M:Avis de marché - */ - public function getAnnoncesBoampCount($siren, $type='') - { - $bodaccA = 0; - $bodaccM = 0; - - // --- Recherche dans les avis d'attribution - if ($type=='' || $type=='A') { - try { - $stmt = $this->conn->executeQuery("SELECT COUNT(b.id) AS nb FROM jo.boamp_lots l, jo.boamp b, jo.boamp_detail d - WHERE l.siren=$siren AND l.idAnn=b.id AND d.id=b.id"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $bodaccA = $result->nb; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - // --- Recherche dans les avis de marchés - if ($type=='' || $type=='M') { - try { - $stmt = $this->conn->executeQuery("SELECT COUNT(d.id) AS nb FROM jo.boamp b, jo.boamp_detail d - WHERE d.siren=$siren AND d.id=b.id"); - if ($stmt->rowCount()) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $bodaccM = $result->nb; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - return $bodaccA + $bodaccM; - } - - /** - * - * @param unknown $siren - * @param number $idAnnonce - * @param number $offset - * @param number $lignes - */ - public function getAnnoncesAsso($siren, $idAnnonce=0, $offset=0, $lignes=100) - { - if ($this->logger !== null) { - $this->logger->info("Début getAnnoncesAsso(siren=$siren, idAnnonce=$idAnnonce)"); - } - $siretMin = $siren.'00000'; - $siretMax = $siren.'99999'; - $strIdAnn = ''; - $tabRet = array(); - - if ($idAnnonce > 0) { - $strIdAnn = "id=$idAnnonce"; - } elseif (substr($siren, 0, 1)=='W' && $idAnnonce == 0) { - $strIdAnn = "Waldec='$siren'"; - } else { - $strIdAnn = "siren=$siren"; - } - - $annonceNb = 0; - try { - $stmt = $this->conn->executeQuery("SELECT id, Assoc_Nom, siren, nic, Waldec, Activite, Num_Annonce, - Date_Parution, Num_Parution, Departement, Sous_Prefecture, Type_Annonce, Annonce_Html, - Assoc_Objet, Assoc_Adresse, Assoc_NObjet, Assoc_AObjet, Assoc_NAdresse, Assoc_Fusion, - Assoc_Annulation, Assoc_ANom, Assoc_NNom, Assoc_Date_Declaration, Assoc_Date_Declaration2, - typeAnnonce, codEven, dateInsert - FROM jo.asso WHERE $strIdAnn AND dateSuppr=0 ORDER BY Date_Parution DESC LIMIT $offset,$lignes"); - $annonceNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($annonceNb > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tabEven = explode(';', $row['codEven']); - $tabRetEven = array(); - if ($row['typeAnnonce'] != 'Insertion') { - $tabRetEven[] = array( - 'CodeEven'=>'0000', - 'LibEven'=> $row['typeAnnonce'].' de l\'annonce du '. - Metier_Util_Date::dateT('Y-m-d', 'd/m/Y', $row['corrDate_Parution']) - ); - } else { - if (trim($row['codEven']) != '') { - foreach ($tabEven as $even) { - $tabRetEven[] = array( - 'CodeEven' => $even, - 'LibEven' => $this->iBodacc->getEvenement($even) - ); - } - } else { - $tabRetEven[] = array( - 'CodeEven' => 0000, - 'LibEven' => $row['Type_Annonce'] - ); - } - } - - // Rubrique - if (preg_match('/cr(é|e)ation/iu', $row['Type_Annonce'])) { - $rub = 'creations'; - } elseif (preg_match('/Dissolution/i', $row['Type_Annonce'])) { - $rub = 'radiations'; - } else { - $rub = 'mmd'; - } - - // typeAnnonce - if (preg_match('/Annulation/i', $row['Type_Annonce'])) { - $type = 'Suppression'; - } elseif (preg_match('/Rectif/i', $row['Type_Annonce'])) { - $type = 'Rectificatif'; - } else { - $type = 'Insertion'; - } - - $dateInsert = ''; - if (str_replace('-', '', $row['Date_Parution'])*1>=20070401) { - $dateInsert = $row['Date_Parution']; - } - - $texte = ''; - if ($idAnnonce != 0) { - if (mb_detect_encoding($row['Annonce_Html']) == 'UTF-8') { - $texte = utf8_decode($row['Annonce_Html']); - } else { - $texte = $row['Annonce_Html']; - } - } - - $tabRet[] = array( - 'id' => $row['id'], - 'BodaccCode' => 'ASSO', - 'BodaccNum' => $row['Num_Parution'], - 'NumAnnonce' => $row['Num_Annonce'], - 'DateParution' => $row['Date_Parution'], - 'Departement' => $row['Departement'], - 'Tribunal' => $row['Sous_Prefecture'], - 'Rubrique' => $rub, - 'typeAnnonce' => $type, - 'dateInsertionSD' => $dateInsert, - 'evenements' => $tabRetEven, - 'texteAnnonce' => $texte, - ); - } - } - - if ($this->logger !== null) { - $this->logger->info("Fin getAnnoncesAsso(siren=$siren, idAnnonce=$idAnnonce) : ".count($tabRet).' annonce(s)'); - } - return $tabRet; - } - - /** - * Nombre d'annonces association - * @param int $idAnnonce - * @param string $siren - */ - public function getAnnoncesAssoCount($siren, $idAnnonce = 0) - { - $strIdAnn = ''; - - if ($idAnnonce > 0) { - $strIdAnn = "id=$idAnnonce"; - } elseif (substr($siren, 0, 1) == 'W' && $idAnnonce == 0) { - $strIdAnn = "Waldec='$siren'"; - } else { - $strIdAnn = "siren=$siren"; - } - - try { - $stmt = $this->conn->executeQuery("SELECT COUNT(*) AS nb FROM jo.asso WHERE $strIdAnn AND dateSuppr=0"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - return $result->nb; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - - return 0; - } - - /** @todo $nic inutilisé pour l'instant **/ - public function getIdentitePart($siren, $rs, $enseigne, $sigle, $nic=0, $refresh=false) - { - $dateUpdate = 0; - $lastYear = date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-1))*1; - $tabRet = array(); - - /** Chargement initial au cas ou la requête Coface plante **/ - try { - $stmt = $this->conn->executeQuery("SELECT raisonSociale, isin, nscrl, tel, fax, web, mail, - DATE(dateUpdate)*1 as dateUpdate FROM jo.infos_entrep WHERE siren=$siren"); - if ($stmt->rowCount() > 0) { - $idComp = $stmt->fetch(\PDO::FETCH_ASSOC); - // L'entrep est en base infos_entrep - if ($idComp['web'] != 'http://') { - $web = $idComp['web']; - } else { - $web = ''; - } - $tabRet = array( - 'raisonSociale' => $idComp['raisonSociale'], - 'isin' => $idComp['isin'], - 'nscrl' => $idComp['nscrl'], - 'tel' => $idComp['tel'], - 'fax' => $idComp['fax'], - 'web' => $web, - 'mail' => $idComp['mail'], - 'enCache' => true, - ); - $dateUpdate = $idComp['dateUpdate']; - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return $tabRet; - } - - /** - * - * @param unknown $naf4 - * @param number $dep - * @return boolean|multitype:[] - */ - public function listeConventions($naf4, $dep=0) - { - $dep = $dep*1; - if ($dep > 0) { - if ($dep < 10) { - $dep = 'Dep0'.$dep; - } else { - $dep = 'Dep'.$dep; - } - $strDep = "AND (n.territoire='' OR n.territoire LIKE '%$dep%')"; - } - try { - $stmt = $this->conn->executeQuery("SELECT n.`id CC`, n.`nom CC`, n.`editeur CC`, n.`nb page CC`, n.`isbn CC`, n.`date edition CC`, c.infoCC, joCCmaj - FROM jo.conv_naf n, jo.conventions c WHERE n.naf='$naf4' AND substring(n.`id CC`,1,4)=c.numBrochure $strDep GROUP BY n.`id CC`"); - if ($stmt->rowCount() > 0) { - return $stmt->fetchAll(\PDO::FETCH_ASSOC); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - protected function findSiteWeb($rs) - { - return false; - } - - /** - * - * @param unknown $siren - * @param string $type - * @param string $annee - * @return boolean|multitype:[] - */ - public function getImportExport($siren, $type='', $annee='') - { - if ($type == '') { - $strimportExport = " AND importExport IN ('I','E') "; - } elseif ($type == 'I') { - $strimportExport = " AND importExport='I' "; - } elseif ($type == 'E') { - $strimportExport = " AND importExport='E' "; - } - if ($annee*1 > 0) { - $strAnnees = " AND annee=$annee "; - } else { - $tabAnnees = array(); - $strAnnees = ' AND annee IN ('; - for ($an = date('Y')-6; $an < date('Y'); $an++) { - $tabAnnees[] = $an; - } - $strAnnees.= implode(',', $tabAnnees).')'; - } - try { - $stmt = $this->conn->executeQuery("SELECT importExport, annee, rangNational, deptSiege - FROM jo.importExport WHERE siren=$siren $strImportExport $strAnnees ORDER BY annee DESC, importExport ASC"); - if ($stmt->rowCount() > 0) { - return $stmt->fetch(\PDO::FETCH_ASSOC); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - /** - * Elements provenant du Notice 80 hors identité - * @param string $siren - * @param string $nic - * @return multitype: - */ - public function getInfosNotice($siren, $nic) - { - try { - $stmt = $this->conn->executeQuery("SELECT LPAD(insSIREN,9,0) AS insSIREN, LPAD(insNIC,5,0) AS insNIC, - insL4_VOIE, insL6_POST, LPAD(insRPET,2,0) AS insRPET, insDEPCOMEN, LPAD(insRPEN,2,0) AS insRPEN, - insARRONET, insCTONET, insTCD, LPAD(insZEMET,2,0) AS insZEMET, insDU, insTU, - LPAD(insUU,2,0) AS insUU, LPAD(insMMINTRET,2,0) AS insMMINTRET, LPAD(insMMINTREN,2,0) AS insMMINTREN, - insVMAJ, insVMAJ1, insVMAJ2, insVMAJ3, insRECME, insEAEANT, insEAEAPET, insEAESEC1T, - insEAESEC2T, insEAEANN, insEAEAPEN, insEAESEC1N, insEAESEC2N, insEAESEC3N, insEAESEC4N, - dateNotice FROM insee.insee_notices WHERE insSIREN=$siren AND insNIC=$nic ORDER BY dateNotice DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - return $stmt->fetch(\PDO::FETCH_ASSOC); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - try { - $stmt = $this->conn->executeQuery("SELECT LPAD(insSIREN,9,0) AS insSIREN, LPAD(insNIC,5,0) AS insNIC, - insL4_VOIE, insL6_POST, LPAD(insRPET,2,0) AS insRPET, insDEPCOMEN, LPAD(insRPEN,2,0) AS insRPEN, - insARRONET, insCTONET, insTCD, LPAD(insZEMET,2,0) AS insZEMET, insDU, insTU, - LPAD(insUU,2,0) AS insUU, insAMINTRET, insAMINTREN, insVMAJ, insVMAJ1, insVMAJ2, - insVMAJ3, '' AS insRECME, '' AS insEAEANT, '' AS insEAEAPET, '' AS insEAESEC1T, '' AS insEAESEC2T, - insESAANN AS insEAEANN, insESAPEN AS insEAEAPEN, insESASEC1N AS insEAESEC1N, - insESASEC2N AS insEAESEC2N, insESASEC3N AS insEAESEC3N, insESASEC4N AS insEAESEC4N, - dateInsert AS dateNotice FROM insee.insee_even WHERE insSIREN=$siren AND insNIC=$nic ORDER BY dateNotice DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - return $stmt->fetch(\PDO::FETCH_ASSOC); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return array(); - } - - /** - * - * @param unknown $adresseNum - * @param unknown $adresseBtq - * @param unknown $adresseVoie - * @param unknown $adresseRue - * @param unknown $adresseComp - * @param unknown $cp - * @param unknown $ville - * @param string $active - * @return boolean|boolean|multitype:[] - */ - public function infoAdresseDom($adresseNum, $adresseBtq, $adresseVoie, $adresseRue, $adresseComp, $cp, $ville, $active=true) - { - $adresseNum = trim($adresseNum)*1; - $adresseBtq = '';//trim($adresseBtq); - $adresseVoie = trim($adresseVoie); - $adresseRue = trim($adresseRue); - $cp = trim($cp); - $ville = trim($ville); - - if ($adresseNum == '' && $adresseBtq == '' && $adresseVoie == '' && $adresseRue == '' && $cp == '' && $ville == '') { - return false; - } - - $tabAdr = $this->structureVoie($adresseNum.' '.$adresseBtq.' '.$adresseVoie.' '.$adresseRue); - $num = $tabAdr['num']*1; - if ($num == 0) { - return false; - } - $indRep = trim($tabAdr['indRep']); - $typeVoie = trim($tabAdr['typeVoie']); - $libVoie = trim(substr($tabAdr['libVoie'], -5)); - - $strAdrActive = ''; - if ($active) { - $strAdrActive.= " AND (enActif=1 OR etActif=1) AND nbEntrep>30 AND pasEntrepDom=0 AND siren>1000 "; - } - - try { - $stmt = $this->conn->executeQuery("SELECT id, siren, nic, enActif, etActif, procol, nom, nom2, - sigle, enseigne, adrNum, adrBtq, adrTypVoie, adrLibVoie, ville, cp, adrComp, adrDistSp, - cj, apen, apet, nbEntrep, dateInsert, dateUpdate FROM jo.tabAdrDom - WHERE adrNum=$num AND adrBtq='$indRep' AND adrTypVoie LIKE '%$typeVoie%' AND - adrLibVoie LIKE '%$libVoie%' AND cp=$cp $strAdrActive GROUP BY siren ORDER BY enActif DESC"); - if ($stmt->rowCount() > 0) { - return $stmt->fetchAll(\PDO::FETCH_ASSOC); - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - return false; - } - - /** - * Retourne l'adresse normalisé - * @param string $siren - * @param string $nic - * @param string $cedexa (1=>On, 0=>Off) - * @return array - * L1_NOM, L2_NOM2, L3_ADRCOMP, L4_VOIE, L5_DISTSP, L6_POST, L7_PAYS - */ - public function getAdresse($siren, $nic, $cedexa=1) - { - // Table etablissements - $tabIdentite = $this->getIdentiteLight($siren, $nic); - $codeVoie = strtoupper($this->getCodeVoie($tabIdentite['AdresseVoie'])); - if ($codeVoie == '') { - $codeVoie = $tabIdentite['AdresseVoie']; - } - $tabRet = array( - 'L1_NOM' => $tabIdentite['Nom'], - 'L2_NOM2' => $tabIdentite['Enseigne'], - 'L3_ADRCOMP' => '', - 'L4_VOIE' => trim(preg_replace('/ +/', ' ', preg_replace('/^0+/', '', $tabIdentite['AdresseNum'].' '. - $tabIdentite['AdresseBtq'].' '. $codeVoie.' '. $tabIdentite['AdresseRue']))), - 'L5_DISTSP' => $tabIdentite['Adresse2'], - 'L6_POST' => $tabIdentite['CP'].' '.$tabIdentite['Ville'], - 'L7_PAYS' => '', - ); - - if (strlen($tabRet['L4_VOIE']) > 38) { - $tabRet['L4_VOIE'] = trim(preg_replace('/ +/', ' ', preg_replace('/^0+/', '', - $tabIdentite['AdresseNum'].' '. - $tabIdentite['AdresseBtq'].' '. - $tabIdentite['AdresseVoie'].' '. - $tabIdentite['AdresseRue']))); - } - - //Notice 80 - Override $tabRet - $tabNotice = $this->getInfosNotice($siren, $nic); - if ($tabNotice['L6_POST'] != '' && $tabNotice['L6_POST'] != $tabRet['L6_POST']) { - $tabRet['L6_POST'] = $tabNotice['L6_POST']; - } - - $stmt = $this->conn->executeQuery("SELECT NOM2, ADR_COMP, ADR_DISTSP, PAYS - FROM insee.identite WHERE SIREN=$siren AND NIC=$nic"); - if ($stmt->rowCount() > 0) { - $tabIdentite = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($tabIdentite['NOM2'] != '' && $tabIdentite['NOM2'] != $tabRet['L2_NOM2']) { - $tabRet['L2_NOM2'] = $tabIdentite['NOM2']; - } - if ($tabIdentite['ADR_COMP'] != '' && $tabIdentite['ADR_COMP'] != $tabRet['L3_ADRCOMP']) { - $tabRet['L3_ADRCOMP'] = $tabIdentite['ADR_COMP']; - } - if ($tabIdentite['ADR_DISTSP'] != '' && $tabIdentite['ADR_DISTSP'] != $tabRet['L5_DISTSP']) { - $tabRet['L5_DISTSP'] = $tabIdentite['ADR_DISTSP']; - } - if ($tabIdentite['PAYS'] != '' && $tabIdentite['PAYS'] != $tabRet['L7_PAYS']) { - $tabRet['L7_PAYS'] = $tabIdentite['PAYS']; - } - } - - //Cedexa - if ($cedexa = 1) { - try { - $stmt = $this->conn->executeQuery("SELECT contrat, hexavia, codePostal, l1_nom, l2_nomComp, - l3_compGeo, l4_numVoie, l4_indRep, l4_libVoie, l5_distrib, l5_numMS, l5_libCom, - l6_codCedex, l6_achCedex, codeInsee, actif, dateFlux, dateInsert, dateUpdate - FROM insee.cedexa WHERE siren=$siren AND nic=$nic"); - if ($stmt->rowCount() > 0) { - $tabCedex = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($tabCedex['l2_nomComp'] != '' && $tabCedex['l2_nomComp'] != $tabRet['L2_NOM2']) { - $tabRet['L2_NOM2'] = $tabCedex['l2_nomComp']; - } - if ($tabCedex['l3_compGeo'] != '' && $tabCedex['l3_compGeo'] != $tabRet['L3_ADRCOMP']) { - $tabRet['L3_ADRCOMP'] = $tabCedex['l3_compGeo']; - } - $l4 = trim(preg_replace('/ +/', ' ', preg_replace('/^0+/', '', $tabCedex['l4_numVoie'].' '.$tabCedex['l4_indRep'].' '.$tabCedex['l4_libVoie']))); - if ($l4 != '' && $l4 != $tabRet['L4_VOIE']) { - $tabRet['L4_VOIE'] = $l4; - } - $l5 = trim(preg_replace('/ +/', ' ', $tabCedex['l5_distrib'].' '.$tabCedex['l5_numMS'].' '.$tabCedex['l5_libCom'])); - if ($l5 != '' && $l5 != $tabRet['L5_DISTSP']) { - $tabRet['L5_DISTSP'] = $l5; - } - $l6 = trim(preg_replace('/ +/', ' ', $tabCedex['l6_codCedex'].' '.$tabCedex['l6_achCedex'])); - if ($l6 != '' && $l6 != $tabRet['L6_POST']) { - $tabRet['L6_POST'] = $l6; - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - } - - return $tabRet; - } - - /** - * - * @param unknown $siren - * @param number $nic - * @return mixed - */ - public function getActivite($siren, $nic=0) - { - $tabIdentite = $this->getIdentiteLight($siren, $nic); - // F.Jur - $fj = $tabIdentite['FJ']; - // Naf 5 - $naf5en = $tabIdentite['NafEnt']; - $naf5et = $tabIdentite['NafEtab']; - // Naf 4 - $naf4en = $naf4et = -1; - $tabNaf4 = $this->getNaf4($siren, $nic); - if (isset($tabNaf4['apen4'])) { - $naf4en = $tabNaf4['apen4']; - } - if (isset($tabNaf4['apet4'])) { - $naf4et = $tabNaf4['apet4']; - } - - // Activité Pages Jaunes - $strNic = ''; - $an8en = $an8et = -1; - if ($nic*1 > 0) { - $strNic = "AND nic=$nic"; - } - - try { - $stmt = $this->conn->executeQuery("SELECT infoTel, count(*) AS nb FROM jo.telephonie - WHERE siren=$siren AND typeTel='an8' ORDER BY nb DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - if ($result->nb > 0) { - $an8en = $result->infoTel; - $stmt = $this->conn->executeQuery("SELECT infoTel FROM jo.telephonie - WHERE siren=$siren $strNic AND typeTel='an8' ORDER BY dateProvPartenaire DESC LIMIT 0,1"); - if ($stmt->rowCount() > 0) { - $result = $stmt->fetch(\PDO::FETCH_OBJ); - $an8et = $result->infoTel; - } - } - } - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - // Recherche des activités réglementées possibles Naf4&5 ou An8 - $actregNb = 0; - try { - $stmt = $this->conn->executeQuery("SELECT id, libActivite, listeActivite, naf5, naf4, codAn8, listeCJ, nomAutorite - FROM jo.tabActivReg WHERE naf5='$naf5en' OR naf5='$naf5et' OR naf4='$naf4en' - OR naf4='$naf4et' OR codAn8='$an8en' OR codAn8='$an8et'"); - $actregNb = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - if ($actregNb > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - // Filtre 'listeActivite' : Si défini, on recherche la présence de mots dans l'activité - if (trim($row['listeActivite']) != '') { - $ok = false; - $tabTmp = explode(';', trim($row['listeActivite'])); - $tabIdentite = $this->getIdentiteEntreprise($siren, $nic); - foreach ($tabTmp as $strTmp) { - if (preg_match("/$strTmp/i", $tabIdentite['Activite'])) { - $ok = true; - } - } - if (!$ok) { - continue; - } - } - // Filtre 'listeCJ' : Si défini, on limite aux CJ listées - if (trim($row['listeCJ']) != '') { - $ok = false; - $tabTmp = explode(';', trim($row['listeCJ'])); - foreach ($tabTmp as $strTmp) { - if (preg_match("/^$strTmp/", $fj)) { - $ok = true; - } - } - if (!$ok) { - continue; - } - } - return array( - 'idActivite' => $row['id'], - 'libActivite' => $row['libActivite'], - 'nomAutorite' => $row['nomAutorite'], - ); - } - } - - return false; - } - - /** - * - * @param unknown $naf5 - * @return string|string - */ - public function getCodeNace($naf5) - { - if ($naf5 != '') { - $this->setTabCodesNaf(); - return $this->tabCodesNace[$naf5]; - } else { - return ''; - } - } - - /** - * - * @param unknown $refClient - * @param unknown $idClient - * @param unknown $login - * @param number $deb - * @param number $nbRep - * @param number $maxRep - * @return array - */ - public function getEtabClients($refClient, $idClient, $login, $deb=0, $nbRep=20, $maxRep=200) - { - $this->setTabCodesNaf(); - $deb = $deb*1; - $nbRep = $nbRep*1; - $limit = "LIMIT $deb, $nbRep"; - - try { - $stmt = $this->conn->executeQuery("SELECT 'Etab' AS Loc, e.id, e.source, e.source_id, - e.triCode, e.autre_id, e.siren, e.nic, e.siege, e.raisonSociale, e.enseigne, e.sigle, - e.adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, e.adr_comp, e.adr_cp, e.adr_ville, - LPAD(e.tel,10,0) AS tel, LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep, - CONCAT(e.siren, e.nic) AS siret, e.actif FROM jo.etablissements e, jo.surveillances_site s - WHERE s.login='$login' AND s.siren=e.siren AND (s.nic=e.nic OR e.siege=1) - AND s.ref='$refClient' ORDER BY e.siege DESC, e.actif DESC $limit"); - - $nbTot = $stmt->rowCount(); - } catch (\Doctrine\DBAL\DBALException $e) { - if ($this->logger !== null) { - $this->logger->error($e->getMessage()); - } - } - - if ($nbTot > 0) { - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $tel = sprintf('%010d', strtr($row['tel'], array('-'=>'', '/'=>'', '.'=>'', ','=>''))); - if ($tel != '0000000000') { - $tel = implode('.', str_split($tel, 2)); - } else { - $tel=''; - } - - $fax = sprintf('%010d', strtr($row['fax'], array('-'=>'', '/'=>'', '.'=>'', ','=>''))); - if ($fax != '0000000000') { - $fax = implode('.', str_split($fax, 2)); - } else { - $fax = ''; - } - - $tabRet[] = array( - 'Localisation' => $row['Loc'], - 'id' => $row['id'], - 'Pertinence' => 100, - 'Siret' => $row['siret'], - 'Siege' => $row['siege'], - 'Nom' => $row['raisonSociale'], - 'Sigle' => $row['sigle'], - 'Enseigne' => $row['enseigne'], - 'Adresse' => trim(preg_replace('/ +/', ' ', - trim($row['adr_num'] .' '. $row['adr_btq'] .' '. $row['adr_typeVoie'] - .' '. $row['adr_libVoie']))), - 'Adresse2' => trim(preg_replace('/ +/', ' ', $row['adr_comp'])), - 'CP' => $row['adr_cp'], - 'Ville' => $row['adr_ville'], - 'Tel' => $tel, - 'Fax' => $fax, - 'FJ' => $row['cj'], - 'FJLib' => $this->getLibelleFJ($row['cj']), - 'Siren' => $row['siren'], - 'Nic' => $row['nic'], - 'Actif' => $row['actif'], - 'NafEtab' => $row['ape_etab'], // Etablissement - 'NafEnt' => $row['ape_entrep'], // Entreprise - 'NafEtabLib' => $this->getLibelleNaf($row['ape_etab']), - 'NafEntLib' => $this->getLibelleNaf($row['ape_entrep']), - ); - } - } - - - // Evite l'affichage d'un 0 inutile sur l'Extranet - if ($dep==0) { - $dep=''; - } - - return array( - 'criteres' => array('siren'=>$siren, 'nic'=>$nic, 'dep'=>$dep), - 'nbReponses' => count($tabRet), - 'nbReponsesTotal' => $nbTot, - 'reponses' => $tabRet); - } - - /** - * - * @param unknown $siren - * @param string $nic - * @return boolean|boolean|string[]|boolean[]|unknown[]|mixed[]|NULL[] - */ - public function getAvisInsee($siren, $nic='') - { - if ($siren*1==0 || !$this->valideSiren($siren, $nic)) { - return false; - } - if ($nic == '' || $nic*1 == 0 || $nic > 99999) { - $strNic = " AND nic=nicSiege"; - } else { - $strNic = " AND nic=$nic"; - } - $stmt = $this->conn->executeQuery("SELECT raiSoc, dateMaj, siren, nic, etatEt, dateEtatEt, - typeEtab, adresseEt0, adresseEt1, adresseEt2, adresseEt3, fj, fjLib, nafEt, nafEtLib, - effEtPeriode, effEtTr, erreurs, adresseEn0, adresseEn1, adresseEn2, adresseEn3, nafEn, - nafEnLib, effEnPeriode, effEnTr, fjEn, fjEnLib, employes, etatEn, dateEtatEn, nicSiege, - nbEtabActifs, dateInsert, dateUpdate, - DATE(IF(dateUpdate>dateInsert, dateUpdate, dateInsert))*1 AS dateMajSD - FROM insee.insee_avis WHERE siren=$siren $strNic"); - $tabInfos = $stmt->fetch(\PDO::FETCH_ASSOC); - if ($tabInfos['dateMajSD'] == date('Ymd')) { - $tabInfos['enCache'] = true; - return $tabInfos; - } - - /** Initialisation de la session sur le site de l'Insee **/ - $url = 'http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp'; - $referer = $cookie = ''; - $page = getUrl($url, $cookie, '', $referer, false, 'avis-situation-sirene.insee.fr', '', 5); - //Code en 4xx ou 5xx signifie une erreur du serveur - $codeN = floor($page['code']/100); - if ($codeN == 4 || $codeN == 5) { - return false; - } else { - $tabInfos=array(); - $referer = $url; - $body = $page['body']; - $serviceDispo = true; - - if (preg_match("/
$siren, - 'critere' => $crit, // S pour le siège ou vide avec un NIC !!! - 'nic' => $nic, - 'departement' => $dep, - 'departement_actif' => $depActif, - 'bSubmit' => 'Valider'); - $page = getUrl($url, $cookie, $post, $referer, false, 'avis-situation-sirene.insee.fr', '', 5); - $referer=$url; - $body = $page['body']; - - if (preg_match("/

Fiche établissement<\/h3>/Uis", $body, $matches)) { - //
  • établissement
  • - $tabInfos['fiche']='etab'; - } - - if (preg_match('/
    (.*)/Uis', $body, $matches)) { - $tabInfos['raiSoc']=str_replace(''', "'", trim($matches[1])); - } - - if (preg_match("/Dernière mise à jour : (.*)<\/div>/Uis", $body, $matches)) { - $tabInfos['dateMaj']=Metier_Util_Date::dateT('d/m/Y', 'Y-m-d', trim($matches[1])); - } - - $s1=substr($siren, 0, 3); - $s2=substr($siren, 3, 3); - $s3=substr($siren, 6, 3); - if (preg_match('/
    (?:.*)('.$s1.'(?:.*)'.$s2.'(?:.*)'.$s3.')(?:.*)(\d\d\d\d\d)(?:.*)<\/div>/Uis', $body, $matches)) { - $tabInfos['siren'] = trim(str_replace(' ', '', $matches[1])); - $tabInfos['nic'] = trim($matches[2]); - if ($nic=='') { - $nic=$tabInfos['nic']; - } - } else { - $tabInfos['siren']=$siren; - } - - if (preg_match('/