diff --git a/application/controllers/IdentiteController.php b/application/controllers/IdentiteController.php index cd6ad2afc..df0963104 100644 --- a/application/controllers/IdentiteController.php +++ b/application/controllers/IdentiteController.php @@ -119,6 +119,8 @@ class IdentiteController extends Zend_Controller_Action 'AutreId', 'Actif', 'SituationJuridique', + 'SituationInsee', + 'SituationRncs', 'AutreSiren', 'RaisonSociale', 'NomCommercial', @@ -189,7 +191,7 @@ class IdentiteController extends Zend_Controller_Action //Vérification des permissions $user = new Scores_Utilisateur(); if(!$user->checkPerm('idprocol')){ - $this->_forward('perms', 'error'); + $this->forward('perms', 'error'); } $siren = substr($this->siret,0,9); @@ -1611,6 +1613,12 @@ class IdentiteController extends Zend_Controller_Action */ public function avisrncsAction() { + //Vérification des permissions + $user = new Scores_Utilisateur(); + if( $user->getIdClient()!=1 /*!$user->checkPerm('avisrncs')*/ ){ + $this->forward('perms', 'error'); + } + $request = $this->getRequest(); $this->view->assign('siret', $this->siret); @@ -1639,8 +1647,12 @@ class IdentiteController extends Zend_Controller_Action $this->view->assign('NumGest', $result->NumGest); // 4 ou 2 + 1 lettre + - $date = new Zend_Date($result->ImmatDate, 'yyyy-MM-dd'); - $this->view->assign('ImmatDate', $date->toString('dd/MM/yyyy')); + if ($result->ImmatDate === null || $result->ImmatDate=='0000-00-00 00:00:00' ) { + $this->view->assign('ImmatDate', ''); + } else { + $date = new Zend_Date($result->ImmatDate, 'yyyy-MM-dd'); + $this->view->assign('ImmatDate', $date->toString('dd/MM/yyyy')); + } $this->view->assign('FormeJuridique', $result->FjLabel); $this->view->assign('Capital', number_format($result->Capital, 0, ',', ' ').' '.$result->CapitalDev); @@ -1650,9 +1662,14 @@ class IdentiteController extends Zend_Controller_Action $result->SiegeAdresseCP . ' ' . $result->SiegeAdresseVille); - $date = new Zend_Date(); - $date->set($result->CompteArretMois, Zend_Date::MONTH, $locale); - $this->view->assign('CompteArretDate', $result->CompteArretJour . ' ' . $date->toString(Zend_Date::MONTH_NAME)); + + if ( $result->CompteArretMois === null ) { + $this->view->assign('CompteArretDate', ''); + } else { + $date = new Zend_Date(); + $date->set($result->CompteArretMois, Zend_Date::MONTH, $locale); + $this->view->assign('CompteArretDate', $result->CompteArretJour . ' ' . $date->toString(Zend_Date::MONTH_NAME)); + } $administration = array(); foreach ($result->Administration->item as $item) { @@ -1713,8 +1730,12 @@ class IdentiteController extends Zend_Controller_Action $this->view->assign('Activite', $result->Activite); - $date = new Zend_Date($result->ActiviteDate, 'yyyy-MM-dd'); - $this->view->assign('ActiviteDate', $date->toString('dd/MM/yyyy')); + if ( $result->ActiviteDate === null || $result->ActiviteDate == '0000-00-00 00:00:00') { + $this->view->assign('ActiviteDate', ''); + } else { + $date = new Zend_Date($result->ActiviteDate, 'yyyy-MM-dd'); + $this->view->assign('ActiviteDate', $date->toString('dd/MM/yyyy')); + } $tabTypeExploitation = array( 0 => "-", diff --git a/application/views/default/scripts/error/perms.phtml b/application/views/default/scripts/error/perms.phtml index a617d7622..0ce1204af 100644 --- a/application/views/default/scripts/error/perms.phtml +++ b/application/views/default/scripts/error/perms.phtml @@ -1,9 +1,7 @@

Droits d'accès

- +

Erreur :

diff --git a/application/views/default/scripts/identite/avisrncs.phtml b/application/views/default/scripts/identite/avisrncs.phtml index 93f44726e..25fcccf30 100644 --- a/application/views/default/scripts/identite/avisrncs.phtml +++ b/application/views/default/scripts/identite/avisrncs.phtml @@ -24,11 +24,16 @@ div.avisrncs-footer p { margin:0; padding:0; }

Avis de situtation RNCS édité le AvisDateTxt?>

Département Système et Opérations

-

Société Scores & Decisions SAS

+

Société Scores & Décisions SAS

1 rue de Clairefontaine - 78120 Rambouillet

+
+ +Rediffuseur officiel du RNCS - Service distinct +
+

translate("AVIS DE SITUATION RNCS")?>

translate("REGISTRE NATIONAL DU COMMERCES ET DES SOCIETES")?>

diff --git a/application/views/default/scripts/identite/fiche.phtml b/application/views/default/scripts/identite/fiche.phtml index 5a7932a04..b74fafdfc 100644 --- a/application/views/default/scripts/identite/fiche.phtml +++ b/application/views/default/scripts/identite/fiche.phtml @@ -51,6 +51,8 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['AutreId']); //echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRM']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Actif']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SituationJuridique']); +echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SituationInsee']); +echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SituationRncs']); echo $this->partial('identite/fiche-item.phtml', $this->dBlock['AutreSiren']); ?> diff --git a/library/Scores/IdentiteEntreprise.php b/library/Scores/IdentiteEntreprise.php index bea6def80..fb6b3799c 100644 --- a/library/Scores/IdentiteEntreprise.php +++ b/library/Scores/IdentiteEntreprise.php @@ -321,10 +321,9 @@ class IdentiteEntreprise } if ( $this->identite->AncienSiege==1 - || ( property_exists($this->identite->AutreSiret, 'item') && count($this->identite->AutreSiret->item)>0 ) - || ($this->identite->ActifEco==0 && !empty($this->identite->ActifEcoDate)) ) - { - $data.= ''; + || ( property_exists($this->identite->AutreSiret, 'item') && count($this->identite->AutreSiret->item)>0 ) + || ($this->identite->ActifEco==0 && !empty($this->identite->ActifEcoDate)) ) { + $data.= ''; } if ($this->identite->Actif==0 && $this->identite->DateClotEt != '') { @@ -332,15 +331,41 @@ class IdentiteEntreprise $data.= " (Fin d'activité en ".$date->toString('dd/MM/yyyy').')'; } - $user = new Scores_Utilisateur(); - if (intval($this->identite->Siren)!=0 && $user->checkPerm('avisinsee')) { - $data.='   (Situation au répertoire SIRENE)'; + return $data; + } + + public function getSituationInseeLabel() + { + return ''; + } + public function getSituationInseeTexte() + { + $user = new Scores_Utilisateur(); + $data = ''; + if ( intval($this->identite->Siren)!=0 && $user->checkPerm('avisinsee') ) { + $data ='Situation au répertoire SIRENE'; } return $data; } + public function getSituationRncsLabel() + { + return ''; + } + public function getSituationRncsTexte() + { + $user = new Scores_Utilisateur(); + $data = ''; + if ( intval($this->identite->Siren)!=0 && $user->getIdClient()==1 /*$user->checkPerm('avisrncs')*/ ) { + $data ='Situation au répertoire RNCS'; + } + + return $data; + } + public function getSituationJuridiqueLabel() { return 'Situation juridique'; diff --git a/library/Scores/Menu.php b/library/Scores/Menu.php index af4153bdf..c18696d4c 100644 --- a/library/Scores/Menu.php +++ b/library/Scores/Menu.php @@ -816,12 +816,6 @@ class Scores_Menu } return false; break; - case 'avisrncs': - $user = new Scores_Utilisateur(); - if ( $user->getIdClient()==1 ){ - return true; - } - break; case 'groupe': case 'etablissements': case 'evenements': diff --git a/public/themes/default/styles/main.css b/public/themes/default/styles/main.css index 4a4e18787..59c45f601 100644 --- a/public/themes/default/styles/main.css +++ b/public/themes/default/styles/main.css @@ -437,8 +437,8 @@ div.paragraph {margin:5px;padding:5px;} a:link {color: #9c093a; text-decoration:none;} a:visited {color: #0000CC; text-decoration:none;} a:hover {color: #000066; text-decoration:none;} -.StyleInfoLib {font-family: Arial, Helvetica, sans-serif;font-size:11px;font-weight:bold;color:#535353; vertical-align:top;line-height:16px;} -.StyleInfoData {font-family: Arial, Helvetica, sans-serif;font-size:11px;color:#535353;line-height:16px;} +.StyleInfoLib {font-family: Arial, Helvetica, sans-serif;font-size:11px;font-weight:bold;color:#535353; vertical-align:top;line-height:18px;} +.StyleInfoData {font-family: Arial, Helvetica, sans-serif;font-size:11px;color:#535353;line-height:18px;} .StyleInfoDataActif {font-family: Arial, Helvetica, sans-serif;font-size:11px;line-height:16px;} table.identite {border-collapse:separate;border-spacing:4px;} table.data {width:100%;}