Issue #0001766: [Liens inter-entreprises] Ajouter le lien "Lancer une recherche dirigeant" pour PP

This commit is contained in:
Aram HARUTYUNYAN 2014-02-28 07:53:17 +00:00
parent 045572ca57
commit 0d5bbe188a
3 changed files with 56 additions and 3 deletions

View File

@ -589,6 +589,10 @@ class IdentiteController extends Zend_Controller_Action
if ($identite->PpPm=='PP') {
$this->view->assign('PP', true);
$this->view->assign('nom', $identite->nom);
$this->view->assign('prenom', $identite->prenom);
$this->view->assign('civilite', $identite->civilite);
$this->view->assign('naissanceDate', $identite->naissanceDate);
}
//Get links
@ -626,6 +630,21 @@ class IdentiteController extends Zend_Controller_Action
if ( ($session->getFormeJuridique()>=1000 && $session->getFormeJuridique()<=1999)
|| ($session->getFormeJuridique()>=10 && $session->getFormeJuridique()<=19) ) {
$this->view->assign('PP', true);
$result = $ws->searchLienRef($siren, 'siren');
if (count($result->item)>0) {
foreach ($result->item as $item) {
$id = $item->id;
break;
}
}
$result = $ws->getSaisieLienRef($id);
$items = json_decode($result, true);
Zend_Registry::get('firebug')->info($items);
$this->view->assign('nom', $items['nom']);
$this->view->assign('prenom', $items['prenom']);
$this->view->assign('civilite', $items['civilite']);
$this->view->assign('naissanceDate', $items['naissance_date']);
}
if ( in_array($session->getFormeJuridique(), array(5488,5498,5720)) ) {

View File

@ -1,8 +1,8 @@
<div>
<?php if ($this->result->PpPm == 'PP') {?>
<?php if (!empty($this->result->civilite)) {?>
<?=$this->result->civilite?>&nbsp;
<?php $sexe=($this->result->civilite=='M')?'':'e';?>
<?php }?>
<?php if (!empty($this->result->nom)) {?>
<?=$this->result->nom?>&nbsp;
@ -14,7 +14,8 @@
(<?=$this->result->nomUsage?>)&nbsp;
<?php }?>
<?php if (!empty($this->result->naissanceDate) && $this->result->naissanceDate!='0000-00-00') {?>
<br/>Née le <?=$this->result->naissanceDate?>&nbsp;
<?php $date = new Zend_Date($this->result->naissanceDate, 'YYYY-MM-dd')?>
<br/><?=$sexe;?> le <?=$date->toString('dd/MM/yyyy');?>&nbsp;
<?php }?>
<?php if (!empty($this->result->naissanceLieu)) {?>
à <?=$this->result->naissanceLieu?>&nbsp;
@ -87,4 +88,17 @@ else
<?php foreach ($this->result->identification->item as $id) {?>
<div><?=$id->label?> - <?=$id->num?></div>
<?php }?>
<?php }?>
<?php }?>
<?php if ($this->result->PpPm == 'PP') {
$param = array(
'controller'=>'recherche',
'action'=>'dirigeant',
'dirNom'=>$this->result->nom,
'dirPrenom'=>$this->result->prenom,
'dirDateNaissJJ' =>$date->get('dd'),
'dirDateNaissMM' =>$date->get('MM'),
'dirDateNaissAAAA' =>$date->get('YYYY')
);
?>
<br/><a href="<?=$this->url($param,null,true);?>">Lancer une recherche dirigeant</a>
<?php } ?>

View File

@ -96,6 +96,26 @@
<a class="confirm" title="Fiche suppression" href="<?=$hrefSuppr; ?>">Supprimer la fiche</a>
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"></td>
<td width="350" class="StyleInfoLib">
<?php
if ($this->PP) {
$date = new Zend_Date($this->naissanceDate, 'YYYY-MM-dd');
$param = array(
'controller'=>'recherche',
'action'=>'dirigeant',
'dirNom'=>$this->nom,
'dirPrenom'=>$this->prenom,
'dirDateNaissJJ' =>$date->get('dd'),
'dirDateNaissMM' =>$date->get('MM'),
'dirDateNaissAAAA' =>$date->get('YYYY')
);
?>
<a href="<?=$this->url($param,null,true);?>">Lancer une recherche dirigeant</a><?php }?>
</td>
</tr>
<?php }?>
</table>
</div>