Premier jet

This commit is contained in:
Michael RICOIS 2013-10-18 13:04:08 +00:00
parent a7e494b6d8
commit e668bdf240
7 changed files with 107 additions and 158 deletions

View File

@ -100,20 +100,18 @@ class ReportController extends Zend_Controller_Action
//Write the state to the session
$cmdState = 2;
if ( Zend_Session::namespaceIsset('Cmd') ) {
$session = new Zend_Session_Namespace('Cmd');
if ( $session->state > $cmdState ) {
$this->redirect($url);
} else {
$session->state = $cmdState;
}
} else {
$session = new Zend_Session_Namespace('Cmd');
if ( $session->state > $cmdState ) {
$this->redirect($url);
} else {
$session->state = $cmdState;
}
$values = $request->getPost();
$form->populate($values);
$this->view->CmdID = $session->CmdID;
if ( $form->isValid($values) ) {
//Sauvegarde des informations
@ -193,17 +191,13 @@ class ReportController extends Zend_Controller_Action
//Write the state to the session
$cmdState = 3;
if ( Zend_Session::namespaceIsset('Cmd') ) {
$session = new Zend_Session_Namespace('Cmd');
if ( $session->state > $cmdState || $session->CmdID != $cmdId ) {
$this->redirect($url);
} else {
$session->state = $cmdState;
}
} else {
$this->redirect($url);
}
$session = new Zend_Session_Namespace('Cmd');
if ( $session->state > $cmdState || $session->CmdID != $cmdId ) {
$this->redirect($url);
} else {
$session->state = $cmdState;
}
//Est ce que la commande existe
$commandM = new Application_Model_Command();

View File

@ -47,17 +47,17 @@
</li>
<li class="list-group-item">
<span class="badge"><?=$this->NbLiens?></span>
<span class="badge"><?=($this->NbLiens == 0) ? 'Néant': 'Inclus';?></span>
Liens inter-entreprises
</li>
<li class="list-group-item">
<span class="badge"><?=$this->NbAnnonces?></span>
<span class="badge"><?=($this->NbAnnonces == 0) ? 'Néant': 'Inclus';?></span>
Annonces légales
</li>
<li class="list-group-item">
<span class="badge"><?=$this->NbBilans?></span>
<span class="badge"><?=($this->NbBilans == 0 ) ? 'Néant': 'Inclus';?></span>
Bilans, ratios et SIG
</li>

View File

@ -1,5 +1,5 @@
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
<?php if($this->typeBilan == 'B' and $this->typeBilan == 'A'):?>
<?php if($this->typeBilan == 'B' and $this->typeBilan == 'A') {?>
<div class="paragraph">
<table>
@ -10,9 +10,9 @@
</table>
</div>
<?php else: ?>
<?php } else { ?>
<?php if ($this->nbBilanN==0 && $this->nbBilanN==0):?>
<?php if ($this->nbBilanN!=0 || $this->nbBilanC!=0) {?>
<div class="paragraph">
<table>
@ -23,15 +23,98 @@
</table>
</div>
<?php else:?>
<?php } else {?>
<h2>Bilan actif - passif</h2>
<?=$this->partial('finance/bilan/actif.phtml')?>
<?=$this->partial('finance/bilan/passif.phtml')?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Actif</th>
<?php foreach($this->tabResultActif as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<?php $lastDateCloture = $info['dateCloture']; ?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioActif as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($this->tabResultActif as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Passif</th>
<?php foreach($this->tabResultPassif as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioPassif as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($this->tabResultPassif as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<h2>Soldes Intermédiaire de Gestion</h2>
<?=$this->partial('finance/bilan/sig.phtml')?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th colspan="2">SOLDES INTERMEDIAIRE DE GESTION</th>
<?php foreach($this->tabResultSig as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% C.A.</th>
</tr>
</thead>
<tbody>
<?php foreach($this->tabRatioSig as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<?php if(empty($info['op'])){?>
<td colspan="2"><?=$info['titre']?></td>
<?php } else {?>
<td><?=$info['op']?></td><td><?=$info['titre']?></td>
<?php }?>
<?php foreach($this->tabResultSig as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<?php endif;?>
<?php }?>
<?php endif;?>
<?php }?>

View File

@ -1,42 +0,0 @@
<?php
$tabResult = $this->partial()->view->tabResultActif;
$tabRatio = $this->partial()->view->tabRatioActif;
?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Actif</th>
<?php foreach($tabResult as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<?php $lastDateCloture = $info['dateCloture']; ?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($tabRatio as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($tabResult as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'actif',
'typeBilan' => $this->partial()->view->typeBilan,
'dateCloture' => $this->partial()->view->lastDateCloture,
'siret' => $this->partial()->view->siret,
'id' => $this->partial()->view->id,
))?>
</div>

View File

@ -1,41 +0,0 @@
<?php
$tabResult = $this->partial()->view->tabResultPassif;
$tabRatio = $this->partial()->view->tabRatioPassif;
?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th>Passif</th>
<?php foreach($tabResult as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<?php foreach($tabRatio as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<td>
<?=$info['titre']?></td>
<?php foreach($tabResult as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'passif',
'typeBilan' => $this->partial()->view->typeBilan,
'dateCloture' => $this->partial()->view->lastDateCloture,
'siret' => $this->partial()->view->siret,
'id' => $this->partial()->view->id,
))?>
</div>

View File

@ -1,44 +0,0 @@
<?php
$tabResult = $this->partial()->view->tabResultSig;
$tabRatio = $this->partial()->view->tabRatioSig;
?>
<div class="paragraph">
<table class="bilans">
<thead>
<tr>
<th colspan="2">SOLDES INTERMEDIAIRE DE GESTION</th>
<?php foreach($tabResult as $info) { ?>
<th class="date" >
<?=$info['dateCloture']?><br/><?=$info['duree']?>
</th>
<?php }?>
<th>% C.A.</th>
</tr>
</thead>
<tbody>
<?php foreach($tabRatio as $idRatio => $info) { ?>
<tr<?php if (!empty($info['class'])) echo ' class="'.$info['class'].'"'?>>
<?php if(empty($info['op'])){?>
<td colspan="2"><?=$info['titre']?></td>
<?php } else {?>
<td><?=$info['op']?></td><td><?=$info['titre']?></td>
<?php }?>
<?php foreach($tabResult as $value) { ?>
<td class="left"><?=$value['entrep'][$idRatio]?></td>
<?php }?>
<td><?=$value['total'][$idRatio]?></td>
<?php }?>
</tr>
</tbody>
</table>
</div>
<div class="paragraph">
<?=$this->action('bilangraph', 'finance', null, array(
'type' => 'sig',
'typeBilan' => $this->partial()->view->typeBilan,
'dateCloture' => $this->partial()->view->lastDateCloture,
'siret' => $this->partial()->view->siret,
'id' => $this->partial()->view->id,
))?>
</div>

View File

@ -40,7 +40,6 @@ try {
//Options
array(
'help|?' => "Affiche les informations d'utilisation",
'check' => "Vérifie la configuration suivant le fichier de config installé",
'install' => "Installe et configure",
)
);