Correction format DCREN

This commit is contained in:
Michael RICOIS 2016-09-14 15:07:51 +02:00
parent 43647f9302
commit 075ec5834f

View File

@ -541,14 +541,14 @@ class Metier_Sfr_Scoring
$this->ValInseeActif = $identite['Actif'];
//Age de l'entreprise en mois
if ( !empty($identite['DateCreaEn']) && $identite['DateCreaEn']!='0000-00-00 00:00:00' ) {
if ( !empty($identite['DateCreaEn']) && $identite['DateCreaEn'] != 0 ) {
$dateC = DateTime::createFromFormat('Y-m-d', $identite['DateCreaEn']);
$dateC = DateTime::createFromFormat('Ymd', $identite['DateCreaEn']);
$dateNow = new DateTime();
$interval = $dateNow->diff($dateC);
$this->ValInseeAge = $interval->format('%y') * 12 + $interval->format('%m');
} elseif ( !empty($identite['dateImmat']) && $identite['dateImmat']!='0000-00-00 00:00:00' ) {
} elseif ( !empty($identite['dateImmat']) && $identite['dateImmat'] != '0000-00-00 00:00:00' ) {
$dateC = DateTime::createFromFormat('Y-m-d', $identite['dateImmat']);
$dateNow = new DateTime();