Integrate issue #0001417

This commit is contained in:
Michael RICOIS 2012-10-29 09:34:46 +00:00
commit e636270615
3 changed files with 66 additions and 30 deletions

View File

@ -601,6 +601,23 @@ class IdentiteController extends Zend_Controller_Action
'siret' => $siren
), null, true) );
}
if ( $user->checkPerm('ACTES') ) {
if ( $session->getFormeJuridique()>=3100 && $session->getFormeJuridique()<=3199
|| $session->getFormeJuridique()>=4000 && $session->getFormeJuridique()<=4999
|| $session->getFormeJuridique()>=5000 && $session->getFormeJuridique()<=5999
|| $session->getFormeJuridique()>=6000 && $session->getFormeJuridique()<=6999 ) {
$this->view->assign('lienStatuts', $this->view->url(array(
'controller' => 'pieces',
'action' => 'actes',
'siret' => $siren ), null, true) );
$this->view->assign('lienBilans', $this->view->url(array(
'controller' => 'pieces',
'action' => 'bilans',
'siret' => $siren ), null, true) );
}
}
require_once 'Scores/WsScores.php';
$ws = new WsScores();

View File

@ -1639,35 +1639,34 @@ class PiecesController extends Zend_Controller_Action
}
/**
* Affiche les privilèges en surveillance
*/
public function privilegesAction()
{
$request = $this->getRequest();
$type = $request->getParam('type', null);
$siren = substr($this->siret, 0, 9);
$detail = false;
if (!empty($type)){
$detail = true;
}
$session = new SessionEntreprise($this->siret, $this->id);
$ws = new WsScores();
if ($detail){
$infos = $ws->getPrivilegesDetail($siren, array($type));
$this->view->assign('detail', $detail);
} else {
$infos = $ws->getPrivilegesCumul($siren);
}
Zend_Registry::get('firebug')->info($infos);
$this->view->assign('privileges', $infos->result->item);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$user = new Scores_Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survpriv'));
}
/**
* Affiche les privilèges en surveillance
*/
public function privilegesAction()
{
$request = $this->getRequest();
$type = $request->getParam('type', null);
$siren = substr($this->siret, 0, 9);
$detail = false;
if (!empty($type)){
$detail = true;
}
$session = new SessionEntreprise($this->siret, $this->id);
$ws = new WsScores();
if ($detail){
$infos = $ws->getPrivilegesDetail($siren, array($type));
$this->view->assign('detail', $detail);
} else {
$infos = $ws->getPrivilegesCumul($siren);
}
Zend_Registry::get('firebug')->info($infos);
$this->view->assign('privileges', $infos->result->item);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$user = new Scores_Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survpriv'));
}
}

View File

@ -94,11 +94,31 @@
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">Aucun actionnaire r&eacute;f&eacute;renc&eacute; par nos services</td>
</tr>
<?php if ($this->lienStatuts) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
<?php if ($this->lienStatuts) {?>
Afin didentifier les actionnaires de cette entreprise, consulter ses <a href="<?=$this->lienStatuts?>">statuts</a>.
<?php }?>
</td>
</tr>
<?php }?>
<?php } else {?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">Aucune participation r&eacute;f&eacute;renc&eacute;e par nos services</td>
</tr>
<?php if ($this->lienBilans) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">
<?php if ($this->lienStatuts) {?>
Afin didentifier les participations de cette entreprise, consulter son <a href="<?=$this->lienBilans?>">dernier bilan publié</a>.
<?php }?>
</td>
</tr>
<?php }?>
<?php } ?>
<?php } ?>
</table>