|
|
|
@ -11,7 +11,6 @@ class IdentiteEntreprise
|
|
|
|
|
*/
|
|
|
|
|
public function __construct($identite)
|
|
|
|
|
{
|
|
|
|
|
require_once 'common/dates.php';
|
|
|
|
|
$this->identite = $identite;
|
|
|
|
|
$this->view = new Zend_View();
|
|
|
|
|
}
|
|
|
|
@ -118,8 +117,9 @@ class IdentiteEntreprise
|
|
|
|
|
if ($this->identite->Isin == '' || intval($capitalisation) == 0)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
return number_format($capitalisation, 0, '', ' ').' € au '.
|
|
|
|
|
WDate::dateT('Y-m-d', 'd/m/Y', $this->identite->Bourse->derCoursDate);
|
|
|
|
|
$date = new Zend_Date($this->identite->Bourse->derCoursDate, 'yyyy-MM-dd');
|
|
|
|
|
|
|
|
|
|
return number_format($capitalisation, 0, '', ' ').' € au '.$date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getNumRCLabel()
|
|
|
|
@ -217,8 +217,8 @@ class IdentiteEntreprise
|
|
|
|
|
if( $this->identite->Actif != 0) {
|
|
|
|
|
//Activité économique
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) {
|
|
|
|
|
$title.= "Absence d'activité économique depuis le ".
|
|
|
|
|
WDate::dateT('Ymd', 'd/m/Y', $this->identite->ActifEcoDate)."<br/>";
|
|
|
|
|
$date = new Zend_Date($this->identite->ActifEcoDate, 'yyyyMMdd');
|
|
|
|
|
$title.= "Absence d'activité économique depuis le ".$date->toString('dd/MM/yyyy')."<br/>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Activité economique type
|
|
|
|
@ -226,17 +226,26 @@ class IdentiteEntreprise
|
|
|
|
|
case 'NPAI':
|
|
|
|
|
$title.= '<img src="/themes/default/images/interfaces/icone_courrier.png"/>';
|
|
|
|
|
$title.= ' NPAI ';
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) $title.= ' depuis le '.WDate::dateT('Ymd', 'd/m/Y', $this->identite->ActifEcoDate);
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) {
|
|
|
|
|
$date = new Zend_Date($this->identite->ActifEcoDate, 'yyyyMMdd');
|
|
|
|
|
$title.= ' depuis le '.$date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
$title.= '<br/>';
|
|
|
|
|
break;
|
|
|
|
|
case 'PFER':
|
|
|
|
|
$title.= 'Etablisement présumé fermé';
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) $title.= ' depuis le '.WDate::dateT('Ymd', 'd/m/Y', $this->identite->ActifEcoDate);
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) {
|
|
|
|
|
$date = new Zend_Date($this->identite->ActifEcoDate, 'yyyyMMdd');
|
|
|
|
|
$title.= ' depuis le '.$date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
$title.= '<br/>';
|
|
|
|
|
break;
|
|
|
|
|
case 'ECOF':
|
|
|
|
|
$title.= 'Cessation économique';
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) $title.= ' depuis le '.WDate::dateT('Ymd', 'd/m/Y', $this->identite->ActifEcoDate);
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) {
|
|
|
|
|
$date = new Zend_Date($this->identite->ActifEcoDate, 'yyyyMMdd');
|
|
|
|
|
$title.= ' depuis le '.$date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
$title.= '<br/>';
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -244,15 +253,16 @@ class IdentiteEntreprise
|
|
|
|
|
|
|
|
|
|
//Ancien siege
|
|
|
|
|
if (!empty($this->identite->AncienSiegeDateFin)){
|
|
|
|
|
$title.= "Cet établissement était le siège social jusqu'au ".
|
|
|
|
|
WDate::dateT('Ymd', 'd/m/Y', $this->identite->AncienSiegeDateFin)."<br/>";
|
|
|
|
|
$date = new Zend_Date($this->identite->AncienSiegeDateFin, 'yyyyMMdd');
|
|
|
|
|
$title.= "Cet établissement était le siège social jusqu'au ".$date->toString('dd/MM/yyyy')."<br/>";
|
|
|
|
|
}
|
|
|
|
|
if (count($this->identite->AutreSiret->item)>0){
|
|
|
|
|
//Prédécesseur
|
|
|
|
|
foreach($this->identite->AutreSiret->item as $pre){
|
|
|
|
|
if ($pre->type == 'pre'){
|
|
|
|
|
if (!empty($pre->dateEve)) {
|
|
|
|
|
$title.= "Avant le ".WDate::dateT('Ymd', 'd/m/Y', $pre->dateEve).", ";
|
|
|
|
|
$date = new Zend_Date($pre->dateEve, 'yyyyMMdd');
|
|
|
|
|
$title.= "Avant le ".$date->toString('dd/MM/yyyy').", ";
|
|
|
|
|
}
|
|
|
|
|
$adresse = '';
|
|
|
|
|
for($i=1;$i<=7;$i++){
|
|
|
|
@ -276,7 +286,8 @@ class IdentiteEntreprise
|
|
|
|
|
if ($suc->type == 'suc'){
|
|
|
|
|
$title.= "Cet établissement a déménagé ";
|
|
|
|
|
if (!empty($suc->dateEve)) {
|
|
|
|
|
$title.= "le ".WDate::dateT('Ymd', 'd/m/Y', $suc->dateEve)." ";
|
|
|
|
|
$date = new Zend_Date($suc->dateEve, 'yyyyMMdd');
|
|
|
|
|
$title.= "le ".$date->toString('dd/MM/yyyy')." ";
|
|
|
|
|
}
|
|
|
|
|
$adresse = '';
|
|
|
|
|
for($i=1;$i<=7;$i++){
|
|
|
|
@ -317,7 +328,8 @@ class IdentiteEntreprise
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($this->identite->Actif==0 && $this->identite->DateClotEt != '') {
|
|
|
|
|
$data.= "<i> (Fin d'activité en ".WDate::dateT('Ymd', 'm/Y', $this->identite->DateClotEt).')</i>';
|
|
|
|
|
$date = new Zend_Date($this->identite->DateClotEt, 'yyyyMMdd');
|
|
|
|
|
$data.= "<i> (Fin d'activité en ".$date->toString('dd/MM/yyyy').')</i>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$user = new Scores_Utilisateur();
|
|
|
|
@ -339,7 +351,8 @@ class IdentiteEntreprise
|
|
|
|
|
if ( in_array(substr($this->identite->SituationJuridique,0,1), array('P', 'R')) ) {
|
|
|
|
|
$dateRad = '';
|
|
|
|
|
if($this->identite->DateRadiation!='' && $this->identite->DateRadiation!='0000-00-00'){
|
|
|
|
|
$dateRad = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$this->identite->DateRadiation));
|
|
|
|
|
$date = new Zend_Date(str_replace('-','',$this->identite->DateRadiation),'yyyyMMdd');
|
|
|
|
|
$dateRad = $date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
//Procédure collective
|
|
|
|
|
if ($this->identite->SituationJuridique=='PL') {
|
|
|
|
@ -506,7 +519,9 @@ class IdentiteEntreprise
|
|
|
|
|
if (empty($this->identite->DateImmat) || $this->identite->DateImmat=='0000-00-00') {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return WDate::dateT('Y-m-d', 'd/m/Y',$this->identite->DateImmat);
|
|
|
|
|
|
|
|
|
|
$date = new Zend_Date($this->identite->DateImmat, 'yyyy-MM-dd');
|
|
|
|
|
return $date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getDateCreaEnLabel()
|
|
|
|
@ -517,9 +532,11 @@ class IdentiteEntreprise
|
|
|
|
|
{
|
|
|
|
|
$dateCreationEn = str_replace('-', '', $this->identite->DateCreaEn);
|
|
|
|
|
if (substr($dateCreationEn, -2) * 1 == 0) {
|
|
|
|
|
$data = WDate::dateT('Ymd', 'm/Y', $dateCreationEn);
|
|
|
|
|
$date = new Zend_Date($dateCreationEn, 'yyyyMMdd');
|
|
|
|
|
$data = $date->toString('MM/yyyy');
|
|
|
|
|
} else {
|
|
|
|
|
$data = WDate::dateT('Ymd', 'd/m/Y', $dateCreationEn);
|
|
|
|
|
$date = new Zend_Date($dateCreationEn, 'yyyyMMdd');
|
|
|
|
|
$data = $date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
@ -532,12 +549,13 @@ class IdentiteEntreprise
|
|
|
|
|
{
|
|
|
|
|
$dateCreationEt = str_replace('-', '', $this->identite->DateCreaEt);
|
|
|
|
|
if ($dateCreationEt * 1 <> 0) {
|
|
|
|
|
$date = new WDate();
|
|
|
|
|
if (substr($dateCreationEt, -2) * 1 == 0) {
|
|
|
|
|
$data = $date->dateT('Ymd', 'm/Y', $dateCreationEt);
|
|
|
|
|
} else {
|
|
|
|
|
$data = $date->dateT('Ymd', 'd/m/Y', $dateCreationEt);
|
|
|
|
|
}
|
|
|
|
|
if (substr($dateCreationEt, -2) * 1 == 0) {
|
|
|
|
|
$date = new Zend_Date($dateCreationEt, 'yyyyMMdd');
|
|
|
|
|
$data = $date->toString('MM/yyyy');
|
|
|
|
|
} else {
|
|
|
|
|
$date = new Zend_Date($dateCreationEt, 'yyyyMMdd');
|
|
|
|
|
$data = $date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$data = 'N/C';
|
|
|
|
|
}
|
|
|
|
@ -588,7 +606,10 @@ class IdentiteEntreprise
|
|
|
|
|
case 'NPAI':
|
|
|
|
|
$data.= '<div>';
|
|
|
|
|
$txtNpai = 'NPAI ';
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) $txtNpai.= 'depuis le '.WDate::dateT('Ymd', 'd/m/Y', $this->identite->ActifEcoDate);
|
|
|
|
|
if (!empty($this->identite->ActifEcoDate)) {
|
|
|
|
|
$date = new Zend_Date($this->identite->ActifEcoDate, 'yyyyMMdd');
|
|
|
|
|
$txtNpai.= 'depuis le '.$date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
$data.= '<img title="'.$txtNpai.'" src="/themes/default/images/interfaces/icone_courrier.png" />';
|
|
|
|
|
$data.= '</div>';
|
|
|
|
|
break;
|
|
|
|
@ -925,7 +946,8 @@ class IdentiteEntreprise
|
|
|
|
|
$this->deviseText($this->identite->Bilan->Devise);
|
|
|
|
|
}
|
|
|
|
|
if (!empty($this->identite->Bilan->Cloture)) {
|
|
|
|
|
$title .= ' au '. WDate::dateT('Ymd', 'd/m/Y',$this->identite->Bilan->Cloture);
|
|
|
|
|
$date = new Zend_Date($this->identite->Bilan->Cloture, 'yyyyMMdd');
|
|
|
|
|
$title .= ' au '. $date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
return $title;
|
|
|
|
|
}
|
|
|
|
@ -972,7 +994,8 @@ class IdentiteEntreprise
|
|
|
|
|
$this->deviseText($this->identite->Bilan->Devise);
|
|
|
|
|
}
|
|
|
|
|
if (!empty($this->identite->Bilan->Cloture)) {
|
|
|
|
|
$title .= ' au '.WDate::dateT('Ymd', 'd/m/Y',$this->identite->Bilan->Cloture);
|
|
|
|
|
$date = new Zend_Date($this->identite->Bilan->Cloture, 'yyyyMMdd');
|
|
|
|
|
$title .= ' au '.$date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $title;
|
|
|
|
@ -1000,7 +1023,8 @@ class IdentiteEntreprise
|
|
|
|
|
$dir1DateNaiss = '';
|
|
|
|
|
if ($this->identite->dir1DateNaiss != '' &&
|
|
|
|
|
$this->identite->dir1DateNaiss != '0000-00-00') {
|
|
|
|
|
$dir1DateNaiss = WDate::dateT('Y-m-d', 'd/m/Y',$this->identite->dir1DateNaiss);
|
|
|
|
|
$date = new Zend_Date($this->identite->dir1DateNaiss, 'yyyy-MM-dd');
|
|
|
|
|
$dir1DateNaiss = $date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
$dir1LieuNaiss = '';
|
|
|
|
|
if ($this->identite->dir1LieuNaiss != '') {
|
|
|
|
@ -1009,7 +1033,8 @@ class IdentiteEntreprise
|
|
|
|
|
$dir2DateNaiss = '';
|
|
|
|
|
if ($this->identite->dir2DateNaiss != '' &&
|
|
|
|
|
$this->identite->dir2DateNaiss != '0000-00-00') {
|
|
|
|
|
$dir2DateNaiss = WDate::dateT('Y-m-d', 'd/m/Y',$this->identite->dir2DateNaiss);
|
|
|
|
|
$date = new Zend_Date($this->identite->dir2DateNaiss, 'yyyy-MM-dd');
|
|
|
|
|
$dir2DateNaiss = $date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
$dir2LieuNaiss = '';
|
|
|
|
|
if ($this->identite->dir2LieuNaiss != '') {
|
|
|
|
@ -1068,7 +1093,8 @@ class IdentiteEntreprise
|
|
|
|
|
}
|
|
|
|
|
$data.= $this->identite->Bilan->Effectif.' salarié(s) au bilan';
|
|
|
|
|
if (!empty($this->identite->Bilan->Cloture)) {
|
|
|
|
|
$data.= " cloturé le ".WDate::dateT('Ymd', 'd/m/Y',$this->identite->Bilan->Cloture);
|
|
|
|
|
$date = new Zend_Date($this->identite->Bilan->Cloture, 'yyyyMMdd');
|
|
|
|
|
$data.= " cloturé le ".$date->toString('dd/MM/yyyy');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|