Merge correction ratio
This commit is contained in:
parent
d1ef47887c
commit
8a86b501ec
@ -28,7 +28,6 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
|
||||
$ratiosInfos = cache_get('ratiosInfos');
|
||||
$bilansInfos = cache_get('bilansInfos');
|
||||
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
|
||||
$firephp->log($ratiosEntrepEvol,'ratiosEntrepEvol');
|
||||
}else{
|
||||
try {
|
||||
$O = $client->getRatios($siren, 'synthese');
|
||||
@ -36,6 +35,11 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
|
||||
$ratiosInfos = $O['result']['RatiosInfos'];
|
||||
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
||||
$format = ratiosRatios($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosInfos, $ratiosSecteur);
|
||||
while ( list($key, $val) = each( $format ) )
|
||||
{
|
||||
${$key} = $val;
|
||||
}
|
||||
cache_delete();
|
||||
cache_add('ratiosEntrep',$ratiosEntrep);
|
||||
cache_add('bilansInfos',$bilansInfos);
|
||||
@ -47,6 +51,28 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
|
||||
die();
|
||||
}
|
||||
}
|
||||
$firephp->log($bilansInfos, 'bilansInfos');
|
||||
|
||||
if(count($bilansInfos)>0)
|
||||
{
|
||||
//En fonction du type de bilan sélectionné
|
||||
//on filtre les bilans avant de les envoyer sur l'affichage
|
||||
$index = 0;
|
||||
foreach($bilansInfos as $key => $item)
|
||||
{
|
||||
if($item['typeBilan']!=$typeBilan)
|
||||
{
|
||||
array_slice($bilansInfos, $index, 1);
|
||||
array_slice($ratiosInfos, $index, 1);
|
||||
array_slice($ratiosEntrep, $index, 1);
|
||||
array_slice($ratiosEntrepEvol, $index, 1);
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
}
|
||||
|
||||
$nbrAnnees = count($bilansInfos)-1;
|
||||
$firephp->log($bilansInfos);
|
||||
|
||||
//Liste des ratios pour le graphique général
|
||||
$tabRatioGraph = array( 0 => array('ratio'=>'r236', 'op' => 1000),
|
||||
@ -63,7 +89,7 @@ $tabRatio = array(
|
||||
'r22' => array('evol'=>'r23', 'op' => 1000, 'titre'=>'TOTAL BILAN'),
|
||||
'r231' => array('evol'=>'r235', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
|
||||
'r232' => array('evol'=>'r236', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
|
||||
'r62' => array('evol'=>'r64', 'op' => 1000, 'titre'=>'TRESORERIE'),
|
||||
'r63' => array('evol'=>'r64', 'op' => 1000, 'titre'=>'TRESORERIE'),
|
||||
'r24' => array('evol'=>'r24', 'op' => 1, 'titre'=>'EFFECTIF', 'unite' => 1),
|
||||
);
|
||||
|
||||
@ -75,8 +101,6 @@ $data = synthese_datagraph($bilansInfos, $ratiosEntrep, $tabRatioGraph, $tabRati
|
||||
$dataGraph = $data['graph'];
|
||||
$dataEvol = $data['evol'];
|
||||
|
||||
$firephp->log($dataEvol, 'evol');
|
||||
|
||||
?>
|
||||
<div id="center">
|
||||
<h1>SYNTHÈSE</h1>
|
||||
@ -114,7 +138,7 @@ else
|
||||
<th class="date"><?php print synthese_formatdateCloture($bilansInfos, 2); ?></th>
|
||||
<th class="date"><?php print synthese_formatdateCloture($bilansInfos, 1); ?></th>
|
||||
<th class="date">Evolution</th>
|
||||
<th class="date"><?php print synthese_formatdateCloture($bilansInfos, 0); ?></th>
|
||||
<th class="date"><?php print synthese_formatdateCloture($bilansInfos, $nbrAnnees-$nbrAnnees); ?></th>
|
||||
<th class="date">Evolution</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user