This commit is contained in:
Michael RICOIS 2014-04-09 08:26:51 +00:00
commit 64cb3013d1

View File

@ -2936,9 +2936,8 @@ class MInsee
}
if ($tabRet['Capital']==0 || $tabRet['CapitalDev']=='') {
$iDbHisto=new WDB('historiques');
$bodaccHisto=$iDbHisto->select(
'entrep e, texte x',//.codEven Code évènement du mouvement Bodacc libEven ',
$bodaccHisto=$this->iDb->select(
'historiques.entrep e, historiques.texte x',//.codEven Code évènement du mouvement Bodacc libEven ',
'e.ANBASE, e.NOBOD, e.CODTRI, e.JAL, e.DATE, e.CODEVE, e.SSCODE, e.DEPT, e.NOANN, e.ROLE, e.SIREN, e.E1GSIR, e.E1GNIC, x.annonceNum, x.annonceTxt',
"e.E1GSIR=$siren AND e.ANBASE=x.annonceNum AND e.DATE BETWEEN 19890101 AND 20041231 AND x.annonceTxt LIKE '%capital%' /*AND (e.CODEVE BETWEEN 10 AND 19 OR e.CODEVE BETWEEN 30 AND 41 OR e.CODEVE BETWEEN 51 AND 79 ) */ GROUP BY e.ANBASE ORDER BY e.DATE DESC", false, MYSQL_ASSOC);
if (count($bodaccHisto)>0) {
@ -3020,12 +3019,11 @@ class MInsee
$tabRet['AutreId'] = trim($waldec);
} elseif ($tabRet['Activite']=='' && ($tabInsee['CJ']<7000 || $tabInsee['CJ']>7999)) {
$iDbHisto=new WDB('historiques');
//10 à 19// Création d'entreprise
//30 à 41
//51 à 79=>'1503', // Cloture insuf.Actif
$bodaccHisto=$iDbHisto->select(
'entrep e, texte x',//.codEven Code évènement du mouvement Bodacc libEven ',
$bodaccHisto=$this->iDb->select(
'historiques.entrep e, historiques.texte x',//.codEven Code évènement du mouvement Bodacc libEven ',
'e.ANBASE, e.NOBOD, e.CODTRI, e.JAL, e.DATE, e.CODEVE, e.SSCODE, e.DEPT, e.NOANN, e.ROLE, e.SIREN, e.E1GSIR, e.E1GNIC, x.annonceNum, x.annonceTxt',
"e.E1GSIR=$siren AND e.ANBASE=x.annonceNum AND e.DATE BETWEEN 19890101 AND 20041231 AND x.annonceTxt LIKE '%ctivit%' GROUP BY e.ANBASE ORDER BY e.DATE DESC", false, MYSQL_ASSOC);
if (count($bodaccHisto)>0) {
@ -3651,10 +3649,9 @@ class MInsee
}
}
$iDbHisto=new WDB('historiques');
$iBodacc=new MBodacc();
$bodaccHisto=$iDbHisto->select(
'entrep e, texte x',
$bodaccHisto=$this->iDb->select(
'historiques.entrep e, historiques.texte x',
'e.ANBASE, e.NOBOD, e.CODTRI, e.JAL, e.DATE, e.CODEVE, e.SSCODE, e.DEPT, e.NOANN, e.ROLE, e.SIREN, e.E1GSIR, e.E1GNIC, x.annonceNum, x.annonceTxt',
"e.E1GSIR=$siren AND e.ANBASE=x.annonceNum AND e.DATE BETWEEN 19890101 AND 20050101 AND x.annonceTxt LIKE '%Administration%' GROUP BY e.ANBASE ORDER BY e.DATE DESC", true, MYSQL_ASSOC);
if (count($bodaccHisto)>0) {
@ -4520,9 +4517,8 @@ class MInsee
// On ne part pas dans l'histo dans certains cas...
if ($rubrique<>'V' && $rubrique<>'D' && $rubrique<>'A' && $rubrique<>'C' && $rubrique<>'BODC') {
$iDbHisto = new WDB('historiques');
$bodaccHisto = $iDbHisto->select(
'texte x, entrep e',
$bodaccHisto = $this->iDb->select(
'historiques.texte x, historiques.entrep e',
'e.ANBASE, e.NOBOD, e.CODTRI, e.JAL, e.DATE, e.CODEVE, e.SSCODE, e.DEPT, e.NOANN, e.ROLE, e.SIREN, e.E1GSIR, e.E1GNIC, x.annonceNum, x.annonceTxt',
"e.E1GSIR=$siren AND e.ANBASE=x.annonceNum $strIdAnn AND e.DATE BETWEEN 19890101 AND 20041231 GROUP BY e.ANBASE ORDER BY e.DATE DESC", false, MYSQL_ASSOC);
if (count($bodaccHisto)>0) {