Modification affichage

This commit is contained in:
Michael RICOIS 2011-05-18 13:35:56 +00:00
parent f717568fd3
commit 16c91081d5
2 changed files with 69 additions and 61 deletions

View File

@ -818,27 +818,25 @@ class FinanceController extends Zend_Controller_Action
*/
public function liassexlsAction()
{
require_once 'finance/LiasseXLS.php';
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$unite = $request->getParam('unit', '€');
$path = APPLICATION_PATH . '/../cache/liasse/';
$file = 'liasse-';
$file = '';
$model = '';
require_once 'finance/LiasseXLS.php';
$liasse = new LiasseXLS($model);
$liasse->dataModel($values);
$liasse->dataFile($file);
if( file_exists($xlsWriteFile) )
{
if( file_exists($path.$file) ){
$client->setLog('liassexls', $siren, 0, '');
echo '<a href="fichier/liasse/'.basename($xlsWriteFile).
'" target="_blank">Télécharger le fichier excel.</a>';
$this->view->assign('file', $file);
}
else
{
echo "Erreur lors de la construction du fichier.";
}
}
@ -885,10 +883,11 @@ class FinanceController extends Zend_Controller_Action
$liasse = array ();
$request = $this->getRequest();
$siret = $this->getRequest()->getParam('siret');
$siren = substr($siret,0,9);
$id = $this->getRequest()->getParam('id');
$listBilan = $this->ws->getListeBilans($this->entreprise->siren);
echo $date = ($request->isPost())?$request->getParam('date'):$listBilan->result->item[0]->dateExercice.':'.
$listBilan->result->item[0]->typeBilan;
$date = ($request->isPost())? $request->getParam('date') :
$listBilan->result->item[0]->dateExercice.':'.$listBilan->result->item[0]->typeBilan;
$unite = ($request->isPost())?$request->getParam('unit'):'€';
foreach ($listBilan->result->item as $item)
@ -919,7 +918,8 @@ class FinanceController extends Zend_Controller_Action
/** Partie vue **/
$this->view->assign('ancres', $ancres);
$this->view->assign('liste', $liste);
$this->view->assign('nomSociete', $this->entreprise->nom);
$this->view->assign('raisonSociale', $this->entreprise->nom);
$this->view->assign('siren', $siren);
$this->view->assign('siret', $siret);
$this->view->assign('id', $id);
$this->view->assign('type', $type);

View File

@ -1,49 +1,55 @@
<div id="center">
<h1>ELEMENTS FINANCIERS</h1>
<div>
<form method="POST" action="<?php echo $this->url(array('controller' => 'finance', 'action' => 'liasse', 'siret' => $this->siret, 'id' => $this->id))?>">
<table id="liasseForm" width="100%">
<tr>
<th>Numéro identifiant Siren : </th>
<td><?php echo $this->siret; ?></td>
</tr>
<tr>
<th>Raison Sociale : </th>
<td><?php echo $this->nomSociete;?></td>
</tr>
<tr>
<th>Valeurs exprimées en : </th>
<td>
<select name="unit">
<?php foreach ($this->unit as $champUnit => $valeurUnit):?>
<option <?php echo (($this->unit == ($valeurUnit))? 'selected': false);?> value="<?php echo $valeurUnit;?>"><?php echo $champUnit;?></option>
<?php endforeach;?>
</select>
</td>
</tr>
<tr>
<th>Millesime : </th>
<td>
<select name="date">
<?php foreach ($this->type as $champType => $name):?>
<?php foreach ($this->liste[$champType] as $element):?>
<option <?php echo (($this->date == ($element))? 'selected': false);?> value="<?php echo $element.':'.$champType?>"><?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $element).' '.$name;?></option>
<?php endforeach;?>
<?php endforeach;?>
</select>
<input type="submit" value="Ok" />
</td>
</tr>
</table>
</form>
</div>
<div>
</div>
<br />
<div align="center" width="100%">
<h1>ELEMENTS FINANCIERS - BILANS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<form method="POST" action="<?php echo $this->url(array('controller' => 'finance', 'action' => 'liasse', 'siret' => $this->siret, 'id' => $this->id))?>">
<tr>
<th>Valeurs exprimées en : </th>
<td>
<select name="unit">
<?php foreach ($this->unit as $champUnit => $valeurUnit):?>
<option <?php echo (($this->unit == ($valeurUnit))? 'selected': false);?> value="<?php echo $valeurUnit;?>"><?php echo $champUnit;?></option>
<?php endforeach;?>
</select>
</td>
</tr>
<tr>
<th>Millesime : </th>
<td>
<select name="date">
<?php foreach ($this->type as $champType => $name):?>
<?php foreach ($this->liste[$champType] as $element):?>
<option <?php echo (($this->date == ($element))? 'selected': false);?> value="<?php echo $element.':'.$champType?>"><?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $element).' '.$name;?></option>
<?php endforeach;?>
<?php endforeach;?>
</select>
<input type="submit" value="Ok" />
</td>
</tr>
</form>
<?php
//Affichage lien Exporter liasse XLS
//Affichage lien saisie bilan
?>
</table>
</div>
<div class="paragraph" align="center" width="100%">
<?php if (!empty($this->date)):?>
<div class="tabbed_area">
<ul class="tabs">
<ul class="tabs">
<?php foreach ($this->ancres as $ancre => $val):?>
<?php if($ancre == $this->champType): ?>
<?php $partials = $val;$i=1;?>
@ -59,21 +65,21 @@
<?php foreach ($partials as $partial):?>
<div id="content_<?php echo $i;?>" class="content">
<?php if($this->champType == 'N' or $this->champType == 'S' or $this->champType == 'C'):?>
<?php echo $this->partial('finance/liassesPartials/'.$partial.'.partial.phtml',
<?php echo $this->partial('finance/liassesPartials/'.$partial.'.partial.phtml',
array('liasse' => $this->liasse,
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
'dureesMois' => $this->dureesMois,
'dureesMoisPre'=> $this->dureesMois)).'<br />';?>
<?php elseif ($this->champType == 'B'):?>
<?php echo $this->partial('finance/liassesPartials/banque/'.$partial.'.partial.phtml',
<?php echo $this->partial('finance/liassesPartials/banque/'.$partial.'.partial.phtml',
array('liasse' => $this->liasse,
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
'dureesMois' => $this->dureesMois,
'dureesMoisPre'=> $this->dureesMois)).'<br />';?>
<?php elseif ($this->champType == 'A'):?>
<?php echo $this->partial('finance/liassesPartials/assurance/'.$partial.'.partial.phtml',
<?php echo $this->partial('finance/liassesPartials/assurance/'.$partial.'.partial.phtml',
array('liasse' => $this->liasse,
'dateCloture' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloture),
'dateCloturePre' => $this->dateFunction->dateT('Ymd', 'd/m/Y', $this->dateCloturePre),
@ -85,4 +91,6 @@
<?php endforeach;?>
<?php endif;?>
</div>
</div>