diff --git a/application/modules/default/controllers/JuridiqueController.php b/application/modules/default/controllers/JuridiqueController.php
index 46f351f1e..90cdc9922 100644
--- a/application/modules/default/controllers/JuridiqueController.php
+++ b/application/modules/default/controllers/JuridiqueController.php
@@ -224,6 +224,89 @@ class JuridiqueController extends Zend_Controller_Action
}
}
+ /**
+ * Liste des contentieux
+ */
+ public function ctxAction()
+ {
+ $request = $this->getRequest();
+ $session = new Scores_Session_Entreprise($this->siret, $this->id);
+
+ $this->view->headTitle()->prepend("Contentieux");
+ $this->view->headTitle()->prepend("Siret ".$this->siret);
+
+ $siren = substr($this->siret, 0,9);
+ $type = $request->getParam('type', 'DF');
+ $nbReponses = 20;
+ $page = $request->getParam('page', 1);
+ if ( $page <= 0 ) $page = 1;
+ $position = ($page - 1 ) * $nbReponses;
+
+ $params = new stdClass();
+ $params->companyId = $siren;
+ $params->tiers = $type;
+ $params->p = $position;
+ $params->limit = $nbReponses;
+
+ $ws = new Scores_Ws_Client('entreprise', '0.9');
+ $response = $ws->getGreffeAffaireList($params);
+
+ $this->view->List = $response->List->item;
+
+ // --- Pagination
+ $nbReponsesTotal = $response->Nb;
+ $pageTotal = $pageCurrent = 1;
+ $pagePrev = null;
+ $pageNext = null;
+ if ($nbReponses < $nbReponsesTotal) {
+ $pageTotal = ceil( $nbReponsesTotal / $nbReponses );
+ $pageCurrent = $page;
+ $pagePrev = $page - 1;
+ if ($pagePrev < 1) {
+ $pagePrev = 1;
+ }
+ $pageNext = $page + 1;
+ if( $pageNext > $pageTotal ) {
+ $pageNext = $pageTotal;
+ }
+ }
+ $this->view->assign('PageTotal', $pageTotal);
+ $this->view->assign('PagePrev', $pagePrev);
+ $this->view->assign('PageNext', $pageNext);
+ $this->view->assign('PageCurrent', $pageCurrent);
+
+ $this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
+ $this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
+
+ $this->view->assign('siren', $siren);
+ $this->view->assign('siret', $this->siret);
+ $this->view->assign('raisonSociale', $session->getRaisonSociale());
+ }
+
+ public function ctxdetailAction()
+ {
+ $request = $this->getRequest();
+ $session = new Scores_Session_Entreprise($this->siret, $this->id);
+ $siren = substr($this->siret, 0,9);
+
+ $this->view->headTitle()->prepend("Contentieux");
+ $this->view->headTitle()->prepend("Siret ".$this->siret);
+
+ $this->view->assign('siren', $siren);
+ $this->view->assign('siret', $this->siret);
+ $this->view->assign('raisonSociale', $session->getRaisonSociale());
+
+ $id = $request->getParam('affaireId');
+
+ $params = new stdClass();
+ $params->id = $id;
+
+ $ws = new Scores_Ws_Client('entreprise', '0.9');
+ $response = $ws->getGreffeAffaireDetail($params);
+
+ $this->view->Affaire = $response;
+ }
+
/**
* Affichage infos réglementées
*/
diff --git a/application/modules/default/views/default/scripts/juridique/ctx.phtml b/application/modules/default/views/default/scripts/juridique/ctx.phtml
new file mode 100644
index 000000000..297681302
--- /dev/null
+++ b/application/modules/default/views/default/scripts/juridique/ctx.phtml
@@ -0,0 +1,76 @@
+
+
Contentieux
+
+
+
+ |
+ Numéro identifiant Siren |
+ =$this->SirenTexte($this->siren)?> |
+
+
+ |
+ Dénomination Sociale |
+ =$this->raisonSociale?> |
+
+
+ |
+ Affaire en tant que |
+ Défendeur / Demandeur |
+
+
+
+
+
Liste des contentieux en tant que défendeur
+
+List) > 0) {?>
+
+
+
+ Date |
+ Catégorie |
+ Libellé |
+ Tiers demandeur |
+ Etat |
+
+
+
+List as $k => $item) {?>
+
+
+ EnrolementDate, 'y-MM-dd');
+ $dateString = $date->toString('dd/MM/y');
+ } catch(Zend_Date_Exception $e){}
+ ?>=$dateString?> |
+ =$item->CategoryLabel?> |
+ =$item->Label?> |
+
+ TierName->item as $t) {?>
+ =$t?>
+
+ |
+ =$item->StatusLabel?> |
+
+
+
+
+
+PageTotal>1) {?>
+
+
+
+
+
+
+
+
+=$this->render('cgu.phtml', $this->cgu)?>
+
diff --git a/application/modules/default/views/default/scripts/juridique/ctxdetail.phtml b/application/modules/default/views/default/scripts/juridique/ctxdetail.phtml
new file mode 100644
index 000000000..4b8caff8f
--- /dev/null
+++ b/application/modules/default/views/default/scripts/juridique/ctxdetail.phtml
@@ -0,0 +1,73 @@
+
+
Contentieux
+
+
+
+ |
+ Numéro identifiant Siren |
+ =$this->SirenTexte($this->siren)?> |
+
+
+ |
+ Dénomination Sociale |
+ =$this->raisonSociale?> |
+
+
+
+
+
Détail du contentieux
+
+
+
+Tribunal | =$this->Affaire->GreffeLabel?> |
+Date d'enrôlement | =$this->Affaire->EnrolementDate?> |
+Etat de l'affaire | =$this->Affaire->StatusLabel?> |
+Nature de la demande | =$this->Affaire->Label?> |
+Type de procédure | =$this->Affaire->CategoryLabel?> |
+
+ Demandeurs |
+
+ Affaire->Tiers->item) > 0) {?>
+ Affaire->Tiers->item as $t) {?>
+ TypeCode == 'DE') {?>
+ =$t->companyNom?>companyId)) {?> (=$this->SirenTexte($t->companyId)?>)
+ Acteur)) {?>
+ Acteur->item as $acteur) {?>
+ - =$acteur->Nom?>
+
+
+
+
+
+ |
+
+
+ Défendeurs |
+
+ Affaire->Tiers->item) > 0) {?>
+ Affaire->Tiers->item as $t) {?>
+ TypeCode == 'DF') {?>
+ =$t->companyNom?>companyId)) {?> (=$this->SirenTexte($t->companyId)?>)
+ Acteur)) {?>
+ Acteur->item as $acteur) {?>
+ - =$acteur->Nom?>
+
+
+
+
+
+ |
+
+Historique |
+Affaire->Histo, 'item') && count($this->Affaire->Histo->item) > 0) {?>
+Affaire->Histo->item as $h){?>
+=$h->Date?> | =$h->Label?> |
+
+
+-Aucune information- |
+
+
+
+
+
+
\ No newline at end of file
diff --git a/library/Scores/Menu.php b/library/Scores/Menu.php
index ba88227a9..1aae2e203 100644
--- a/library/Scores/Menu.php
+++ b/library/Scores/Menu.php
@@ -253,6 +253,9 @@ class Scores_Menu
),
array(
'label' => 'ELEMENTS JURIDIQUES',
+ 'activateMenu' => array(
+ array('controller'=>'juridique', 'action'=>'ctxdetail'),
+ ),
'pages' => array(
array(
'label' => "Annonces Légales",
@@ -261,6 +264,11 @@ class Scores_Menu
'forceVisible' => true,
'permission' => 'ANNONCES',
),
+ array(
+ 'label' => "Contentieux",
+ 'controller' => 'juridique',
+ 'action' => 'ctx',
+ ),
array(
'label' => "Information Réglementée",
'controller' => 'juridique',
diff --git a/library/Scores/Ws/Client/Entreprise.php b/library/Scores/Ws/Client/Entreprise.php
index c60cab3da..23a1da64d 100644
--- a/library/Scores/Ws/Client/Entreprise.php
+++ b/library/Scores/Ws/Client/Entreprise.php
@@ -1,6 +1,12 @@
array(
+ 'getGreffeAffaireList' => array(
+ 'debug' => true,
+ ),
+ 'getGreffeAffaireDetail' => array(
+ 'debug' => true,
+ ),
'getIdentite' => array(
'debug' => true,
),