Fix événements de fermeture

This commit is contained in:
Michael RICOIS 2017-01-18 16:13:20 +01:00
parent 53198b87b1
commit e9a011cecf

View File

@ -698,9 +698,9 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
}
} 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;
case 1: $typeSiretAss = 'Loueur de fond'; break;
case 2: $typeSiretAss = 'Locataire du fond'; break;
case 3: $typeSiretAss = 'Prestataire de personnel'; break;
}
$siretAss = $even['insSIRETASS'];
@ -2747,12 +2747,10 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
} else {
$strNic = '';
}
$stmt = $this->conn->executeQuery("SELECT insDATEVE FROM insee.insee_even
WHERE insSIREN=$siren $strNic AND ( insEVE LIKE 'FF' OR insEVE LIKE 'TF'
OR insEVE LIKE '0F' OR insEVE LIKE 'TD' OR insEVE LIKE '0D' OR insEVE LIKE '410'
OR insEVE LIKE '420' OR insEVE LIKE '425' OR insEVE LIKE '400'
OR insEVE LIKE '430' OR insEVE LIKE '435' OR insDESTINAT != '')
ORDER BY insDATEVE DESC LIMIT 0,1");
$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;
@ -7033,7 +7031,6 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
case 'D':
if ($lien == 1) {
continue;
;
}
$typeLien = 'pre';
break(2);
@ -7094,24 +7091,24 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
}
$tabRet[$typeLien] = array(
'siren' => $row['insSIREN'],
'nic' => $row['insNIC'],
'apeEtab' => $row['insAPET700'],
'codeEve' => $row['insEVE'],
'dateEve' => $row['insDATEVE'],
'adrL1' => trim($adr1),
'adrL2' => trim($adr2),
'adrL3' => trim($row['insL3_CADR']),
'adrL4' => trim($adr4),
'adrL5' => trim($row['insL5_DISP']),
'adrL6' => trim($row['insL6_POST']),
'adrL7' => trim($row['insL7_ETRG']),
'siren' => $row['insSIREN'],
'nic' => $row['insNIC'],
'apeEtab' => $row['insAPET700'],
'codeEve' => $row['insEVE'],
'dateEve' => $row['insDATEVE'],
'adrL1' => trim($adr1),
'adrL2' => trim($adr2),
'adrL3' => trim($row['insL3_CADR']),
'adrL4' => trim($adr4),
'adrL5' => trim($row['insL5_DISP']),
'adrL6' => trim($row['insL6_POST']),
'adrL7' => trim($row['insL7_ETRG']),
'depCom' => $row['insDEPCOM'],
'rivoli' => $row['insCODEVOIE'],
'siege' => $row['insSIEGE'],
'destinat' => $row['insDESTINAT'],
'typEtab' => $row['insTYPETAB'],
'origine' => $row['insORIGINE'],
'siege' => $row['insSIEGE'],
'destinat' => $row['insDESTINAT'],
'typEtab' => $row['insTYPETAB'],
'origine' => $row['insORIGINE'],
);
}
}