Compare commits

...

3 Commits

Author SHA1 Message Date
Jean Vladimir TWAHIRWA
3ae5a65737 ajouter les methodes utilisées dans l'action liensAction 2016-12-15 16:51:03 +01:00
Jean Vladimir TWAHIRWA
3803ae948f utiliser Scores_Ws_Client dans controlleur 2016-12-15 16:49:10 +01:00
Jean Vladimir TWAHIRWA
2ad0a5a5b0 condition pour afficher l'erreur 2016-12-15 16:48:02 +01:00
3 changed files with 53 additions and 20 deletions

View File

@ -666,8 +666,12 @@ class IdentiteController extends Zend_Controller_Action
$user = new Scores_Utilisateur();
$this->view->assign('edition', $user->checkModeEdition());
$ws = new WsScores();
$params = new stdClass();
$params->lienRef = $lienRef;
$ws = new Scores_Ws_Client('entreprise', '0.8');
if ($lienRef) {
@ -677,7 +681,7 @@ class IdentiteController extends Zend_Controller_Action
$this->view->headTitle()->prepend('Liens inter-entreprises - Id '.$lienRef);
}
$identite = $ws->getLienRef($lienRef);
$identite = $ws->getLienRef($params);
$this->view->assign('raisonSociale', $identite->raisonSociale);
$this->view->assign('identification', $identite->identification);
$this->view->assign('isin', $identite->isin);
@ -702,11 +706,11 @@ class IdentiteController extends Zend_Controller_Action
}
//Get links
$infos = $ws->getLiensById($lienRef);
$infos = $ws->getLiensById($params);
} else {
$siren = substr($this->siret,0,9);
$params->siren = $siren;
if (empty($autrePage)) {
$this->view->headTitle()->prepend('Liens inter-entreprises - Siren '.$siren);
}
@ -727,8 +731,8 @@ class IdentiteController extends Zend_Controller_Action
), 'default', true) );
}
$infos = $ws->getLiens($siren);
if (is_string($infos) || $infos === false) $this->forward('soap', 'error');
$infos = $ws->getLiens($params);
if (is_string($infos) || $infos === false) $this->view->msg = "Erreur";
}
if (isset($session)) {
@ -738,15 +742,16 @@ class IdentiteController extends Zend_Controller_Action
$this->view->assign('PP', true);
//@todo : using this function is strange - How to get the id before ?
$result = $ws->searchLienRef($siren, 'siren');
$result = $ws->searchLienRef($params, 'siren');
if (count($result->item)>0) {
foreach ($result->item as $item) {
$id = $item->id;
$id = $item->id;
$params->id = $id;
break;
}
}
$result = $ws->getLienRef($id);
$result = $ws->getLienRef($params);
$this->view->assign('nom', $result->nom);
$this->view->assign('prenom', $result->prenom);
$this->view->assign('civilite', $result->civilite);

View File

@ -1,9 +1,20 @@
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<h1>LIENS INTER-ENTREPRISES</h1>
<?php echo $this->test;?>
<?php if ($this->msg) {?>
<div class="paragraph">
<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
<strong>Alert:</strong> <?=$this->msg?></p>
</div>
</div>
<?php } else {?>
<?php if (empty($this->AutrePage)) {?>
<div class="paragraph">
<table class="identite">
<?php if ($this->siren) {?>
@ -114,13 +125,13 @@
<td width="350" class="StyleInfoLib">
<?php
$date = new Zend_Date($this->naissanceDate, 'YYYY-MM-dd');
$param = array(
'controller'=>'recherche',
'action'=>'dirigeant',
'dirNom'=>$this->nom,
'dirPrenom'=>$this->prenom,
'dirDateNaissJJ' =>$date?$date->get('dd'):'',
'dirDateNaissMM' =>$date?$date->get('MM'):'',
$param = array(
'controller'=>'recherche',
'action'=>'dirigeant',
'dirNom'=>$this->nom,
'dirPrenom'=>$this->prenom,
'dirDateNaissJJ' =>$date?$date->get('dd'):'',
'dirDateNaissMM' =>$date?$date->get('MM'):'',
'dirDateNaissAAAA' =>$date?$date->get('YYYY'):''
); ?>
<a href="<?=$this->url($param,'default',true);?>">Lancer une recherche dirigeant</a>
@ -304,6 +315,7 @@ Cette entreprise est une personne physique exerçant son activité en nom propre
</table>
</div>
<?php }?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>

View File

@ -33,6 +33,22 @@ return array(
'debug' => true,
'errorMsg' => array('0902'),
'log' => 'mail',
)
),
),
'0.8' => array(
'getLienRef' => array(
'debug' => true,
),
'getLiensById' => array(
'debug' => true,
),
'getLiens' => array(
'debug' => true,
),
'searchLienRef' => array(
'debug' => true,
'log' => 'mail'
),
),
);