Formattage

This commit is contained in:
Michael RICOIS 2015-06-04 08:12:44 +00:00
parent 6c18902167
commit a8769d8a87

View File

@ -4040,7 +4040,7 @@ class MInsee
*/ */
public function getAnnoncesLegales($siren, $idAnnonce=0, $rubrique='', $forceVerif=false, $allTextes=false, $deleted=false) public function getAnnoncesLegales($siren, $idAnnonce=0, $rubrique='', $forceVerif=false, $allTextes=false, $deleted=false)
{ {
$siren=$siren*1; $siren = intval($siren);
$strIdAnn = ''; $strIdAnn = '';
$tabRet = array(); $tabRet = array();
$procol = false; // Par défaut, on ne trouve pas de procédure collective ! $procol = false; // Par défaut, on ne trouve pas de procédure collective !
@ -4054,53 +4054,71 @@ class MInsee
if ($idAnnonce>0) $strIdAnn=" AND d.id=$idAnnonce "; if ($idAnnonce>0) $strIdAnn=" AND d.id=$idAnnonce ";
elseif ($idAnnonce==0 && $siren<100) return $tabRet; elseif ($idAnnonce==0 && $siren<100) return $tabRet;
if ( !is_array($rubrique) && !in_array($rubrique, array('','P','PH','D','A','C','R','L','G','V','BODA','BODB','BODC')) ) if ( !is_array($rubrique) && !in_array($rubrique, array('','P','PH','D','A','C','R','L','G','V','BODA','BODB','BODC')) ) {
return false; return false;
}
if ($rubrique=='P' || $rubrique=='PH') // Procédure collective // Procédure collective
if ($rubrique=='P' || $rubrique=='PH') {
$strIdAnn=" AND d.Rubrique='procol' AND d.typeEven NOT LIKE '%1005%' $strIdAnn=" AND d.Rubrique='procol' AND d.typeEven NOT LIKE '%1005%'
AND d.typeEven NOT LIKE '%1010%' AND d.typeEven NOT LIKE '%1010%'
AND d.typeEven NOT LIKE '%1050%' AND d.typeEven NOT LIKE '%1050%'
AND d.typeEven NOT LIKE '%1055%' AND d.typeEven NOT LIKE '%1055%'
AND d.typeEven NOT LIKE '%1550%' "; AND d.typeEven NOT LIKE '%1550%' ";
}
/** /**
* @todo Prévoir de ne pas sortir l'annonce si 'P' demandé et date juge > 10 ans * @todo Prévoir de ne pas sortir l'annonce si 'P' demandé et date juge > 10 ans
* AND e.DATE>=".((date('Y')*1)-10).''.date('md') * AND e.DATE>=".((date('Y')*1)-10).''.date('md')
*/ */
elseif ($rubrique=='D') // Dissolution de la société // Dissolution de la société
elseif ($rubrique=='D') {
$strIdAnn=" AND (d.typeEven LIKE '%2202%' OR d.typeEven LIKE '%2203%' OR d.typeEven LIKE '%2204%' OR $strIdAnn=" 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%') "; d.typeEven LIKE '%2210%' OR d.typeEven LIKE '%2211%' OR d.typeEven LIKE '%2212%') ";
elseif ($rubrique=='A') // Absorption }
// Absorption
elseif ($rubrique=='A') {
$strIdAnn=" AND (d.typeEven LIKE '%2720%' OR d.typeEven LIKE '%2721%') "; $strIdAnn=" AND (d.typeEven LIKE '%2720%' OR d.typeEven LIKE '%2721%') ";
elseif ($rubrique=='BODA') // BODACC A }
// BODACC A
elseif ($rubrique=='BODA') {
$strIdAnn=" AND d.Rubrique IN ('creations','procol','ventes') "; $strIdAnn=" AND d.Rubrique IN ('creations','procol','ventes') ";
elseif ($rubrique=='BODB') // BODACC B }
// BODACC B
elseif ($rubrique=='BODB') {
$strIdAnn=" AND d.Rubrique IN ('mmd','radiations') "; $strIdAnn=" AND d.Rubrique IN ('mmd','radiations') ";
elseif ($rubrique=='C' || $rubrique=='BODC') // Dépôt des comptes, BODACC C }
// Dépôt des comptes, BODACC C
elseif ($rubrique=='C' || $rubrique=='BODC') {
$strIdAnn=" AND (d.Rubrique='comptes' OR d.typeEven LIKE '%3100%' OR d.typeEven LIKE '%3200%' $strIdAnn=" AND (d.Rubrique='comptes' OR d.typeEven LIKE '%3100%' OR d.typeEven LIKE '%3200%'
OR d.typeEven LIKE '%3300%' OR d.typeEven LIKE '%3999%') "; OR d.typeEven LIKE '%3300%' OR d.typeEven LIKE '%3999%') ";
elseif ($rubrique=='R') } elseif ($rubrique=='R') {
$strIdAnn=" AND (d.typeEven LIKE '%2202%' OR d.typeEven LIKE '%2203%' OR d.typeEven LIKE '%2204%' OR $strIdAnn=" 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.typeEven LIKE '%2210%' OR d.typeEven LIKE '%2211%' OR d.typeEven LIKE '%2212%' OR
d.Rubrique='radiations') "; d.Rubrique='radiations') ";
elseif ($rubrique=='L') // Location gérance Locataire }
// Location gérance Locataire
elseif ($rubrique=='L') {
$strIdAnn=" AND (d.typeEven LIKE '%2800%' OR d.typeEven LIKE '%2875%' OR d.typeEven LIKE '%2880%' OR $strIdAnn=" 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 '%2881%' OR d.typeEven LIKE '%2885%' OR d.typeEven LIKE '%2840%' OR
d.typeEven LIKE '%4355%') "; d.typeEven LIKE '%4355%') ";
elseif ($rubrique=='G') // Location gérance Propriétaire }
// Location gérance Propriétaire
elseif ($rubrique=='G') {
$strIdAnn=" AND (d.typeEven LIKE '%2850%' OR d.typeEven LIKE '%2851%' OR d.typeEven LIKE '%2860%' OR $strIdAnn=" AND (d.typeEven LIKE '%2850%' OR d.typeEven LIKE '%2851%' OR d.typeEven LIKE '%2860%' OR
d.typeEven LIKE '%2870%') "; d.typeEven LIKE '%2870%') ";
elseif ($rubrique=='V') // Ventes/Cessions }
// Ventes/Cessions
elseif ($rubrique=='V') {
$strIdAnn=" AND (d.typeEven LIKE '%5500%' OR d.typeEven LIKE '%5501%' OR d.typeEven LIKE '%5502%' OR $strIdAnn=" 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 '%5503%' OR d.typeEven LIKE '%5510%' OR d.typeEven LIKE '%5600%' OR
d.typeEven LIKE '%5650%') "; d.typeEven LIKE '%5650%') ";
elseif (is_array($rubrique) && count($rubrique)>0) { } elseif (is_array($rubrique) && count($rubrique)>0) {
$strIdAnn=" AND ("; $strIdAnn=" AND (";
foreach ($rubrique as $codeEven) foreach ($rubrique as $codeEven) {
$tabTmp[]=" d.typeEven LIKE '%$codeEven%' "; $tabTmp[]=" d.typeEven LIKE '%$codeEven%' ";
}
$strIdAnn.= implode(' OR ',$tabTmp); $strIdAnn.= implode(' OR ',$tabTmp);
$strIdAnn.=')'; $strIdAnn.=')';
//@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "classMInsee::getAnnonces... sur $siren", $strIdAnn);
} }
//Stockage en mémoire pour requetes multiples //Stockage en mémoire pour requetes multiples
@ -4392,7 +4410,7 @@ class MInsee
/** /**
* On vérifie si la société n'est pas in bonis pour les raisons suivantes : * On vérifie si la société n'est pas in bonis pour les raisons suivantes :
* 1502 : Clôture de la procédure pour extinction du passif * 1502 : Clôture de la procédure pour extinction du passif
**/ */
if ($rubrique=='P') { if ($rubrique=='P') {
$tabJugements=array(); $tabJugements=array();
foreach ($tabRet as $i=>$ann) { foreach ($tabRet as $i=>$ann) {
@ -4489,7 +4507,9 @@ class MInsee
} }
} }
} }
} elseif ($rubrique=='D' && count($tabRet)>0) { }
elseif ($rubrique=='D' && count($tabRet)>0) {
$tabJugements=array(); $tabJugements=array();
foreach ($tabRet as $i=>$ann) { foreach ($tabRet as $i=>$ann) {
$tabJugements[$ann['DateParution']]=$ann['evenements'][0]['CodeEven']; $tabJugements[$ann['DateParution']]=$ann['evenements'][0]['CodeEven'];