Gestion de l'affichage des bilans confidentiel
This commit is contained in:
parent
23bd68129c
commit
ed53d33b7e
@ -941,8 +941,6 @@ class FinanceController extends Zend_Controller_Action
|
|||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$unite = $request->getParam('unit','K');
|
$unite = $request->getParam('unit','K');
|
||||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||||
$ws = new WsScores();
|
|
||||||
|
|
||||||
|
|
||||||
// Récupération de la date
|
// Récupération de la date
|
||||||
$dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice);
|
$dateAndType = $request->getParam('date', $defaultTypeBilan.$defaultDateExercice);
|
||||||
@ -953,38 +951,51 @@ class FinanceController extends Zend_Controller_Action
|
|||||||
$date = substr($dateAndType, 1);
|
$date = substr($dateAndType, 1);
|
||||||
|
|
||||||
// Récupération des postes du bilan
|
// Récupération des postes du bilan
|
||||||
$infos = $ws->getBilan(substr($this->siret, 0, 9), $date, $type, true);
|
try {
|
||||||
if ($infos === false) $this->forward('soap', 'error');
|
$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);
|
||||||
|
|
||||||
// Formatage de la liasse
|
// Error
|
||||||
$infoLiasse = new Scores_Finance_Liasse($infos, $unite);
|
if ($infos === false) {
|
||||||
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
|
$this->forward('soap', 'error');
|
||||||
$this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
|
}
|
||||||
|
|
||||||
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
|
// Formatage de la liasse
|
||||||
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
|
$infoLiasse = new Scores_Finance_Liasse($infos, $unite);
|
||||||
|
$this->view->assign('dateCloture', $infoLiasse->getInfo('dateCloture'));
|
||||||
|
$this->view->assign('dateCloturePre', $infoLiasse->getInfo('dateCloturePre'));
|
||||||
|
|
||||||
$dateCloturePre = $infoLiasse->getInfo('dateCloturePre');
|
$date = new Zend_Date($infoLiasse->getInfo('dateCloture'), 'yyyyMMdd');
|
||||||
if ( $dateCloturePre == '' ) {
|
$this->view->assign('dateClotureD', $date->toString('dd/MM/yyyy'));
|
||||||
$this->view->assign('dateCloturePreD', '-');
|
|
||||||
} else {
|
$dateCloturePre = $infoLiasse->getInfo('dateCloturePre');
|
||||||
$date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
|
if ($dateCloturePre == '') {
|
||||||
$this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy'));
|
$this->view->assign('dateCloturePreD', '-');
|
||||||
|
} else {
|
||||||
|
$date = new Zend_Date($dateCloturePre, 'yyyyMMdd');
|
||||||
|
$this->view->assign('dateCloturePreD', $date->toString('dd/MM/yyyy'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
|
||||||
|
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
|
||||||
|
|
||||||
|
$this->view->assign('date', $date);
|
||||||
|
$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();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->assign('dureesMois', $infoLiasse->getInfo('dureeMois'));
|
|
||||||
$this->view->assign('dureesMoisPre', $infoLiasse->getInfo('dureeMoisPre'));
|
|
||||||
|
|
||||||
$this->view->assign('date', $date);
|
|
||||||
$this->view->assign('champType', $type);
|
|
||||||
$this->view->assign('liasse', $infoLiasse->getPostes());
|
|
||||||
$this->view->assign('ancres', $ancres[$type]);
|
|
||||||
|
|
||||||
//Gestion export de la liasse au format XLS
|
//Gestion export de la liasse au format XLS
|
||||||
if ( $user->checkPerm('liassexls') & in_array($type,array('C', 'N', 'S')) ) {
|
if ( $user->checkPerm('liassexls') & in_array($type,array('C', 'N', 'S')) ) {
|
||||||
$this->view->assign('exportxls', true);
|
$this->view->assign('exportxls', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->assign('id', $id);
|
$this->view->assign('id', $id);
|
||||||
|
@ -17,15 +17,14 @@
|
|||||||
|
|
||||||
<h2>Liste des relations bancaires</h2>
|
<h2>Liste des relations bancaires</h2>
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<?php if (empty($this->AutrePage) && $this->edition) {?>
|
<?php if (empty($this->AutrePage) && $this->edition) {?>
|
||||||
<div style="line-height:16px;">
|
<div style="line-height:16px;">
|
||||||
<a class="dialog" title="Ajouter RIB/IBAN" href="<?=$this->url(array('controller'=>'saisie','action'=>'ribiban','mode'=>'add','siren'=>$this->siren), null, true)?>">
|
<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>
|
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /> Ajouter une autre relation bancaire</a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php }?>
|
||||||
}?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if(count($this->banques)>0) { ?>
|
<?php if(count($this->banques)>0) { ?>
|
||||||
<table class="data">
|
<table class="data">
|
||||||
@ -88,7 +87,7 @@ $('a.dialog').on('click', function(){
|
|||||||
Quitter: function() { $(this).dialog('close'); }
|
Quitter: function() { $(this).dialog('close'); }
|
||||||
},
|
},
|
||||||
close: function() { $('#dialog').remove(); }
|
close: function() { $('#dialog').remove(); }
|
||||||
};
|
};
|
||||||
$('<div id="dialog"></div>').dialog(dialogOpts);
|
$('<div id="dialog"></div>').dialog(dialogOpts);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,12 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</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
|
<?php
|
||||||
switch ($this->champType) {
|
switch ($this->champType) {
|
||||||
case 'N' : $name = 'Réel Normal'; break;
|
case 'N' : $name = 'Réel Normal'; break;
|
||||||
@ -64,12 +70,12 @@ switch ($this->champType) {
|
|||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<form method="post" action="<?=$this->url(array('controller'=>'finance','action'=>'liasse','siret'=>$this->siret,'id'=>$this->id))?>">
|
<form method="post" action="<?=$this->url(array('controller'=>'finance','action'=>'liasse','siret'=>$this->siret,'id'=>$this->id))?>">
|
||||||
Valeurs exprimées en
|
Valeurs exprimées en
|
||||||
<select name="unit">
|
<select name="unit">
|
||||||
<?php foreach ($this->unit as $id => $titre):?>
|
<?php foreach ($this->unit as $id => $titre):?>
|
||||||
<option value="<?=$id?>"<?=($id==$this->unite)? ' selected': '';?>><?=$titre?></option>
|
<option value="<?=$id?>"<?=($id==$this->unite)? ' selected': '';?>><?=$titre?></option>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="OK" />
|
<input type="submit" value="OK" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -132,5 +138,7 @@ Valeurs exprimées en
|
|||||||
|
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
<?php echo $this->render('cgu.phtml', $this->cgu);?>
|
<?php echo $this->render('cgu.phtml', $this->cgu);?>
|
||||||
</div>
|
</div>
|
@ -1,5 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
return array(
|
return array(
|
||||||
|
'0.8' => array(
|
||||||
|
'getBilan' => array(
|
||||||
|
'cache' => true,
|
||||||
|
'errorMsg' => array('MSG'),
|
||||||
|
'debug' => true,
|
||||||
|
'log' => 'mail',
|
||||||
|
),
|
||||||
|
),
|
||||||
'0.9' => array(
|
'0.9' => array(
|
||||||
'getGreffeAffaireList' => array(
|
'getGreffeAffaireList' => array(
|
||||||
'debug' => true,
|
'debug' => true,
|
||||||
|
Loading…
Reference in New Issue
Block a user