From fbadbb691ad20db616560ae4a77de04640fba28f Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Thu, 19 Jan 2017 12:17:18 +0100 Subject: [PATCH] Correction date crea etab ent immat --- library/Scores/Enrichissement.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/Scores/Enrichissement.php b/library/Scores/Enrichissement.php index 0e52bb21..a3620e06 100644 --- a/library/Scores/Enrichissement.php +++ b/library/Scores/Enrichissement.php @@ -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",