Gestion erreur dans cadastre
This commit is contained in:
parent
b012fa258c
commit
182a6c1b8e
@ -248,16 +248,19 @@ class EvaluationController extends Zend_Controller_Action
|
||||
$this->view->headTitle()->prepend("Siret ".$this->siret);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
|
||||
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P')) {
|
||||
$this->forward('perms', 'error');
|
||||
}
|
||||
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
//@todo : transformer le webservice pour ne faire qu'une seule requete
|
||||
$ws = new WsScores();
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$identite = $ws->getIdentite($siren);
|
||||
$indiscore = $ws->getIndiScore($siren);
|
||||
$indiscore = $ws->getIndiScore($siren);
|
||||
if ($indiscore === false) {
|
||||
$this->forward('soap', 'error');
|
||||
}
|
||||
$identite = $ws->getIdentite($siren);
|
||||
$infos = $ws->getRatios($siren, 'indiscore2');
|
||||
|
||||
$score = array();
|
||||
@ -297,13 +300,11 @@ class EvaluationController extends Zend_Controller_Action
|
||||
$annees = array_slice($annees, 0, $nbMaxBilan);
|
||||
sort($annees);
|
||||
$tabResult = array();
|
||||
foreach($annees as $annee)
|
||||
{
|
||||
foreach($annees as $annee) {
|
||||
$data = array();
|
||||
$dataEvol = array();
|
||||
//Formatter les données
|
||||
foreach($tabRatio as $idRatio => $valRatio)
|
||||
{
|
||||
foreach($tabRatio as $idRatio => $valRatio) {
|
||||
$data[$idRatio] = $ratiosData->dRatio($typeBilan, $annee, $idRatio);
|
||||
$dataTotal[$idRatio] = $ratiosData->dTotal($typeBilan, $annee, $idRatio, $valRatio['total']);
|
||||
$dInfo[$idRatio] = $valRatio['total_info'];
|
||||
@ -1053,6 +1054,9 @@ class EvaluationController extends Zend_Controller_Action
|
||||
|
||||
try {
|
||||
$response = $ws->getCadastrePatrimoine($params);
|
||||
if ($response === false) {
|
||||
$this->forward('soap', 'error');
|
||||
}
|
||||
$this->view->List = $response->item;
|
||||
} catch (Exception $e) {
|
||||
$this->view->MsgTxt = $e->getMessage();
|
||||
|
Loading…
Reference in New Issue
Block a user