Formattage
This commit is contained in:
parent
6c18902167
commit
a8769d8a87
@ -1681,7 +1681,7 @@ class MInsee
|
||||
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';
|
||||
@ -1700,7 +1700,7 @@ class MInsee
|
||||
$whereCount = "siren=$siren AND (nic=$nic OR siege=1) $strActif $strSiege";
|
||||
$whereSelect = "siren=$siren AND (nic=$nic OR siege=1) $strActif $strSiege ORDER BY triSiege DESC, e.actif DESC, e.nic DESC $limit";
|
||||
}
|
||||
|
||||
|
||||
$tabTmp = $this->iDb->select('jo.etablissements e', 'count(*)', $whereCount);
|
||||
if (count($tabTmp)>0) {
|
||||
$nbTot = $tabTmp[0][0];
|
||||
@ -4040,7 +4040,7 @@ class MInsee
|
||||
*/
|
||||
public function getAnnoncesLegales($siren, $idAnnonce=0, $rubrique='', $forceVerif=false, $allTextes=false, $deleted=false)
|
||||
{
|
||||
$siren=$siren*1;
|
||||
$siren = intval($siren);
|
||||
$strIdAnn = '';
|
||||
$tabRet = array();
|
||||
$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 ";
|
||||
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;
|
||||
}
|
||||
|
||||
if ($rubrique=='P' || $rubrique=='PH') // Procédure collective
|
||||
$strIdAnn=" AND d.Rubrique='procol' AND d.typeEven NOT LIKE '%1005%'
|
||||
// Procédure collective
|
||||
if ($rubrique=='P' || $rubrique=='PH') {
|
||||
$strIdAnn=" 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%' ";
|
||||
}
|
||||
/**
|
||||
* @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')
|
||||
*/
|
||||
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
|
||||
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%') ";
|
||||
elseif ($rubrique=='BODA') // BODACC A
|
||||
}
|
||||
// BODACC A
|
||||
elseif ($rubrique=='BODA') {
|
||||
$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') ";
|
||||
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%'
|
||||
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
|
||||
d.typeEven LIKE '%2210%' OR d.typeEven LIKE '%2211%' OR d.typeEven LIKE '%2212%' OR
|
||||
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
|
||||
d.typeEven LIKE '%2881%' OR d.typeEven LIKE '%2885%' OR d.typeEven LIKE '%2840%' OR
|
||||
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
|
||||
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
|
||||
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) {
|
||||
} elseif (is_array($rubrique) && count($rubrique)>0) {
|
||||
$strIdAnn=" AND (";
|
||||
foreach ($rubrique as $codeEven)
|
||||
foreach ($rubrique as $codeEven) {
|
||||
$tabTmp[]=" d.typeEven LIKE '%$codeEven%' ";
|
||||
}
|
||||
$strIdAnn.= implode(' OR ',$tabTmp);
|
||||
$strIdAnn.=')';
|
||||
//@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "classMInsee::getAnnonces... sur $siren", $strIdAnn);
|
||||
}
|
||||
|
||||
//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 :
|
||||
* 1502 : Clôture de la procédure pour extinction du passif
|
||||
**/
|
||||
*/
|
||||
if ($rubrique=='P') {
|
||||
$tabJugements=array();
|
||||
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();
|
||||
foreach ($tabRet as $i=>$ann) {
|
||||
$tabJugements[$ann['DateParution']]=$ann['evenements'][0]['CodeEven'];
|
||||
@ -6585,7 +6605,7 @@ class MInsee
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Code Voie Rivoli
|
||||
* @param string $codeCommune
|
||||
@ -6599,7 +6619,7 @@ class MInsee
|
||||
$adrTypVoie = strtoupper($adrTypVoie);
|
||||
$adrLibVoie = strtoupper($adrLibVoie);
|
||||
$adrLibVoie2 = addslashes($adrLibVoie);
|
||||
|
||||
|
||||
$tabVoiesNoff = array(
|
||||
'LD' => '',
|
||||
'R' => 'RUE',
|
||||
@ -6612,7 +6632,7 @@ class MInsee
|
||||
'VLGE' => 'VGE',
|
||||
'VOI' => 'VOIE'
|
||||
);
|
||||
|
||||
|
||||
if (array_key_exists($adrTypVoie, $tabVoiesNoff) || in_array($adrTypVoie, $tabVoiesNoff)) {
|
||||
$typeVoieNoff = $adrTypVoie;
|
||||
$typeVoieOff = $tabVoiesNoff[$adrTypVoie];
|
||||
@ -6625,7 +6645,7 @@ class MInsee
|
||||
$typeVoieOff = $typeVoieNoff = $adrTypVoie;
|
||||
$strTypesVoies =" AND voieNature='$typeVoieOff' ";
|
||||
}
|
||||
|
||||
|
||||
$ret = $this->iDb->select('insee.fantoirVoi', "codComInsee, idVoieCom, cleRivoli, voieNature, voieLib, 1 AS score",
|
||||
"codComInsee='$codeCommune' $strTypesVoies AND voieLib='$adrLibVoie2'", false, MYSQL_ASSOC);
|
||||
$nbRet = count($ret);
|
||||
|
Loading…
Reference in New Issue
Block a user