Gestion de l'affichage des bilans confidentiel

This commit is contained in:
Michael RICOIS 2017-03-08 16:17:07 +01:00
parent 23bd68129c
commit ed53d33b7e
4 changed files with 67 additions and 41 deletions

View File

@ -941,8 +941,6 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest();
$unite = $request->getParam('unit','K');
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores();
// Récupération de la date
$dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice);
@ -953,8 +951,19 @@ class FinanceController extends Zend_Controller_Action
$date = substr($dateAndType, 1);
// Récupération des postes du bilan
$infos = $ws->getBilan(substr($this->siret, 0, 9), $date, $type, true);
if ($infos === false) $this->forward('soap', 'error');
try {
$ws = new Scores_Ws_Client('entreprise', '0.8');
$params = new stdClass();
$params->siren = substr($this->siret, 0, 9);
$params->millesime = $date;
$params->typeBilan = $type;
$params->ref = '';
$infos = $ws->getBilan($params);
// Error
if ($infos === false) {
$this->forward('soap', 'error');
}
// Formatage de la liasse
$infoLiasse = new Scores_Finance_Liasse($infos, $unite);
@ -979,12 +988,14 @@ class FinanceController extends Zend_Controller_Action
$this->view->assign('champType', $type);
$this->view->assign('liasse', $infoLiasse->getPostes());
$this->view->assign('ancres', $ancres[$type]);
} catch (Exception $e) {
$this->view->msg = $e->getMessage();
}
//Gestion export de la liasse au format XLS
if ( $user->checkPerm('liassexls') & in_array($type,array('C', 'N', 'S')) ) {
$this->view->assign('exportxls', true);
}
}
$this->view->assign('id', $id);

View File

@ -22,8 +22,7 @@
<a class="dialog" title="Ajouter RIB/IBAN" href="<?=$this->url(array('controller'=>'saisie','action'=>'ribiban','mode'=>'add','siren'=>$this->siren), null, true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /> Ajouter une autre relation bancaire</a>
</div>
<?php
}?>
<?php }?>

View File

@ -51,6 +51,12 @@
</table>
</div>
<?php if ($this->msg) {?>
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<?=$this->msg?>
</p>
<?php } else {?>
<?php
switch ($this->champType) {
case 'N' : $name = 'Réel Normal'; break;
@ -132,5 +138,7 @@ Valeurs exprimées en
<?php }?>
</div>
<?php }?>
<?php echo $this->render('cgu.phtml', $this->cgu);?>
</div>

View File

@ -1,5 +1,13 @@
<?php
return array(
'0.8' => array(
'getBilan' => array(
'cache' => true,
'errorMsg' => array('MSG'),
'debug' => true,
'log' => 'mail',
),
),
'0.9' => array(
'getGreffeAffaireList' => array(
'debug' => true,