Merge branch 'bilanconfidentiel' into 'develop'

Bilanconfidentiel

See merge request !1
This commit is contained in:
potier 2017-03-29 08:29:02 +00:00
commit d1d3448e2d
6 changed files with 646 additions and 650 deletions

View File

@ -852,6 +852,7 @@ class FinanceController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('siret', $this->siret);
$this->view->assign('idClient', $user->identity->idClient);
$this->view->haveLiasse = ($bilanList->nbReponses > 0) ? true : false;

View File

@ -925,6 +925,7 @@ class SaisieController extends Zend_Controller_Action
if ( !empty($selection) ) {
list($date, $type) = explode(':', $selection);
// --- Correction d'un bilan
if ($date!='NEW') {
$milDate = $milDatePre = null;
@ -954,6 +955,7 @@ class SaisieController extends Zend_Controller_Action
$infos->dureeMois = $response->DUREE_MOIS;
$infos->dureeMoisPre = $response->DUREE_MOIS_PRE;
$infos->unite = empty($response->MONNAIE_LIV_UNITE) ? 'U' : $response->MONNAIE_LIV_UNITE;
$postes = array();
foreach ($response->POSTES->item as $item) {
$postes[$item->id] = $item->val;
@ -969,6 +971,7 @@ class SaisieController extends Zend_Controller_Action
$infos->dateCloturePre = $response->DATE_CLOTURE;
$infos->dureeMoisPre = $response->DUREE_MOIS;
$infos->unite = empty($response->MONNAIE_LIV_UNITE) ? 'U' : $response->MONNAIE_LIV_UNITE;
$postesN1 = array();
foreach ($response->POSTES->item as $item) {
$postesN1[$item->id] = $item->val;

View File

@ -40,6 +40,15 @@
</td>
</tr>
<?php }?>
<?php if (0 < $this->exportObjet->TOP_CONFIDENTIEL) : ?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2">
<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
Ce bilan est confidentiel.
</td>
</tr>
<?php endif ?>
<?php if ( $this->champType == 'S' ) {?>
<tr>
<td colspan="3">

View File

@ -92,9 +92,14 @@ switch ($type) {
$date = new Zend_Date($element->dateExercicePre, 'yyyyMMdd');
echo $date->toString('dd/MM/yyyy');
} ?> - <?php if ($element->dureeExercicePre > 0) {?><?=$element->dureeExercicePre?> Mois<?php } ?></td>
<td><a href="<?=$this->url(array('controller'=>'finance','action'=>'liasse',
'siret'=>$this->siret,'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
Visualiser</a>
<td><?php if (in_array($this->idClient, [1, 147]) || ($element->confidentielClient == $this->idClient || 0 == $element->confidentiel)) : ?>
<a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse',
'siret'=>$this->siret, 'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
Visualiser
</a>
<?php else :?>
Confidentiel
<?php endif; ?>
</td>
</tr>
<?php break;?>
@ -150,9 +155,13 @@ switch ($type) {
?>
- <?php if ($element->dureeExercicePre > 0) {?><?=$element->dureeExercicePre?> Mois<?php } ?>
</td>
<td><a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse', 'siret'=>$this->siret,
'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
Visualiser</a>
<td><?php if (in_array($this->idClient, [1, 147]) || ($element->confidentielClient == $this->idClient || 0 == $element->confidentiel)) : ?>
<a href="<?=$this->url(array('controller'=>'finance', 'action'=>'liasse', 'siret'=>$this->siret,
'id'=>$this->id, 'date'=> $type.$element->dateExercice), 'default', true)?>">
Visualiser</a>
<?php else :?>
Confidentiel
<?php endif; ?>
</td>
</tr>
<?php }?>

View File

@ -31,7 +31,7 @@ span.poste input { width:50px; }
<h2>Liasse</h2>
<div class="paragraph">
<?php if ($this->infos) {?>
<?php if ($this->infos) { ?>
<div class="content">
<?php
$params = array(

View File

@ -2457,24 +2457,11 @@ class WsScores
*/
public function getListeBilans($siren)
{
$filename = 'listebilans-'.$siren;
if ($this->cacheWrite) {
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
}
$params = new StdClass;
$params->siren = $siren;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getListeBilans($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getListeBilansResult);
}
return $reponse->getListeBilansResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
@ -2592,25 +2579,12 @@ class WsScores
*/
public function getRatios($siren, $page = 'ratios')
{
$filename = 'ratios-'.$siren.'-'.$page;
if ($this->cacheWrite) {
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
}
$params = new StdClass();
$params->siren = $siren;
$params->page = $page;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getRatios($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getRatiosResult);
}
return $reponse->getRatiosResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());