Correction format DCREN
This commit is contained in:
parent
43647f9302
commit
075ec5834f
@ -541,14 +541,14 @@ class Metier_Sfr_Scoring
|
|||||||
$this->ValInseeActif = $identite['Actif'];
|
$this->ValInseeActif = $identite['Actif'];
|
||||||
|
|
||||||
//Age de l'entreprise en mois
|
//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();
|
$dateNow = new DateTime();
|
||||||
$interval = $dateNow->diff($dateC);
|
$interval = $dateNow->diff($dateC);
|
||||||
$this->ValInseeAge = $interval->format('%y') * 12 + $interval->format('%m');
|
$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']);
|
$dateC = DateTime::createFromFormat('Y-m-d', $identite['dateImmat']);
|
||||||
$dateNow = new DateTime();
|
$dateNow = new DateTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user