Prise en compte des types de bilans, bilans consolidés masqués
This commit is contained in:
parent
0f9fca285f
commit
7b8b300c3d
@ -12,10 +12,11 @@ if (($siret*1)==0 && $idEntreprise==0) die('Param
|
||||
$siren=substr($siret,0,9);
|
||||
|
||||
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
|
||||
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
|
||||
|
||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
||||
}else{ $fileName = $page2.'-'.$siret; }
|
||||
if($ratio!=''){$fileName.='-'.$ratio;}
|
||||
if($ratio!=''){ $fileName.='-'.$ratio; }
|
||||
cache_filename($fileName);
|
||||
|
||||
$ratiosEntrep = array();
|
||||
@ -53,6 +54,23 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
|
||||
}
|
||||
$firephp->log($bilansInfos, 'bilansInfos');
|
||||
|
||||
$numBilanC = 0;
|
||||
$numBilanN = 0;
|
||||
if(count($bilansInfos)>0)
|
||||
{
|
||||
foreach($bilansInfos as $key => $item)
|
||||
{
|
||||
if($item['typeBilan']!='C') { $numBilanC++; }
|
||||
if($item['typeBilan']!='N') { $numBilanN++; }
|
||||
}
|
||||
}
|
||||
|
||||
if($typeBilan=='')
|
||||
{
|
||||
if($numBilanN>0){ $typeBilan = 'N'; }
|
||||
if($numBilanN==0 && $numBilanC>0){ $typeBilan = 'C'; }
|
||||
}
|
||||
|
||||
if(count($bilansInfos)>0)
|
||||
{
|
||||
//En fonction du type de bilan sélectionné
|
||||
@ -62,17 +80,18 @@ if(count($bilansInfos)>0)
|
||||
{
|
||||
if($item['typeBilan']!=$typeBilan)
|
||||
{
|
||||
array_slice($bilansInfos, $index, 1);
|
||||
array_slice($ratiosInfos, $index, 1);
|
||||
array_slice($ratiosEntrep, $index, 1);
|
||||
array_slice($ratiosEntrepEvol, $index, 1);
|
||||
array_splice($bilansInfos, $index, 1);
|
||||
array_splice($ratiosInfos, $index, 1);
|
||||
array_splice($ratiosEntrep, $index, 1);
|
||||
array_splice($ratiosEntrepEvol, $index, 1);
|
||||
$index--;
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
}
|
||||
|
||||
$nbrAnnees = count($bilansInfos)-1;
|
||||
$firephp->log($bilansInfos);
|
||||
$firephp->log($bilansInfos, 'bilansInfos');
|
||||
|
||||
//Liste des ratios pour le graphique général
|
||||
$tabRatioGraph = array( 0 => array('ratio'=>'r236', 'op' => 1000),
|
||||
@ -116,6 +135,26 @@ $dataEvol = $data['evol'];
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="340" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||||
<td width="340" class="StyleInfoData">
|
||||
Normaux
|
||||
<?php
|
||||
/*
|
||||
if( $numBilanN>0 || $numBilanC>0 )
|
||||
{
|
||||
?>
|
||||
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="N" <?=($typeBilan=='N')? 'checked' : '';?>/><label>Normaux</label><?php }?>
|
||||
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidés</label><?php }?>
|
||||
<?php if($numBilanN>0 && $numBilanC==0){ ?>Normaux<?php }?>
|
||||
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidés<?php }?>
|
||||
<?php
|
||||
}
|
||||
*/
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
@ -145,6 +184,7 @@ else
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
//TODO : Afficher ligne par ligne les éléments
|
||||
print synthese_tablerow($ratiosInfos, $dataEvol, $tabRatio)
|
||||
?>
|
||||
</tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user