Merge branch 'develop'
This commit is contained in:
commit
51285f3793
@ -91,17 +91,20 @@ class Enrichissement
|
||||
'creaetab' => array(
|
||||
'label' => "Date de création de l'établissement",
|
||||
'column' => 'dateCrea_etab',
|
||||
'sql' => "IF(dateCrea_etab = 0,'',CONCAT_WS('-',SUBSTRING(dateCrea_etab,0,4),SUBSTRING(dateCrea_etab,4,2),SUBSTRING(dateCrea_etab,6,2))) AS creaetab",
|
||||
'sql' => "IF(dateCrea_etab = 0, '', CONCAT_WS('-',
|
||||
SUBSTR(dateCrea_etab,1,4), SUBSTR(dateCrea_etab,5,2), SUBSTR(dateCrea_etab,7,2))) AS creaetab",
|
||||
),
|
||||
'creaent' => array(
|
||||
'label' => "Date de création de l'entreprise",
|
||||
'column' => 'dateCrea_ent',
|
||||
'sql' => "IF(dateCrea_ent=0,'',CONCAT_WS('-',SUBSTRING(dateCrea_ent,0,4),SUBSTRING(dateCrea_ent,4,2),SUBSTRING(dateCrea_ent,6,2))) AS creaent",
|
||||
'sql' => "IF(dateCrea_ent=0, '', CONCAT_WS('-',
|
||||
SUBSTR(dateCrea_ent,1,4), SUBSTR(dateCrea_ent,5,2), SUBSTR(dateCrea_ent,7,2))) AS creaent",
|
||||
),
|
||||
'dateimmat' => array(
|
||||
'label' => "Date d'immatriculation de l'entreprise",
|
||||
'column' => 'dateImmat',
|
||||
'sql' => "IF(dateImmat=0,'',CONCAT_WS('-',SUBSTRING(dateImmat,0,4),SUBSTRING(dateImmat,4,2),SUBSTRING(dateImmat,6,2))) AS dateImmat",
|
||||
'sql' => "IF(dateImmat=0, '', CONCAT_WS('-',
|
||||
SUBSTR(dateImmat,1,4), SUBSTR(dateImmat,5,2), SUBSTR(dateImmat,7,2))) AS dateImmat",
|
||||
),
|
||||
'cj' => array(
|
||||
'label' => "Code Forme juridique",
|
||||
|
@ -159,6 +159,10 @@ foreach ( $dataProfil as $item ) {
|
||||
|
||||
$outFile = $profil->login.'_'.$id.'_'.date('YmdHis').'.csv';
|
||||
$fp = fopen($path.'/'.$outFile, 'w');
|
||||
if ($fp === false) {
|
||||
echo "Error ".$path."/".$outFile."\n"; exit;
|
||||
}
|
||||
|
||||
// --- Ecrire l'entete
|
||||
if ( count($tabEnteteLabel) > 0 ) {
|
||||
fputcsv($fp, $tabEnteteLabel, ',', '"');
|
||||
|
Loading…
Reference in New Issue
Block a user