extranet/www/pages/bilans.php
2009-10-02 09:59:26 +00:00

862 lines
20 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
if (!$_SESSION['connected']) die();
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
$siren=substr($siret,0,9);
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
require_once 'cache/cache.php';
require_once 'ratios/ratios.php';
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
}else{ $fileName = $page.'-'.$siret; }
cache_filename($fileName);
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) )
{
$bilansInfos = cache_get('bilansInfos');
$ratiosInfos = cache_get('ratiosInfos');
$ratiosEntrep = cache_get('ratiosEntrep');
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
$dataActif = cache_get('dataActif');
$dataPassif = cache_get('dataPassif');
$dataSIG = cache_get('dataSIG');
}
else
{
try {
$O = $client->getRatios($siren, 'bilan');
$bilansInfos = $O['result']['BilansInfos'];
$ratiosInfos = $O['result']['RatiosInfos'];
$ratiosEntrep = $O['result']['RatiosEntrep'];
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
$format = ratiosBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosInfos);
while ( list($key, $val) = each( $format ) )
{
${$key} = $val;
}
cache_delete();
cache_add('bilansInfos', $bilansInfos);
cache_add('ratiosInfos', $ratiosInfos);
cache_add('ratiosEntrep', $ratiosEntrep);
cache_add('ratiosEntrepEvol', $ratiosEntrepEvol);
cache_add('dataActif', $dataActif);
cache_add('dataPassif', $dataPassif);
cache_add('dataSIG', $dataSIG);
}catch (SoapFault $fault) {
require_once 'soaperror.php';
processSoapFault($client,$fault,$_SESSION['tabInfo']);
die();
}
}
$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é
//on filtre les bilans avant de les envoyer sur l'affichage
$index = 0;
foreach($bilansInfos as $key => $item)
{
if($item['typeBilan']!=$typeBilan)
{
array_splice($bilansInfos, $index, 1);
array_splice($ratiosInfos, $index, 1);
array_splice($ratiosEntrep, $index, 1);
array_splice($ratiosEntrepEvol, $index, 1);
array_splice($dataActif, $index, 1);
array_splice($dataPassif, $index, 1);
array_splice($dataSIG, $index, 1);
$index--;
}
$index++;
}
}
$firephp->log($bilansInfos, 'bilansInfos');
?>
<script type="text/javascript">
$(document).ready(function()
{
$('input[type=radio][name=typeBilan]').change(function(){
url = document.location.href;
url = url.replace('&type=C', '');
url = url.replace('&type=N', '');
document.location.href=url+'&type='+$(this).val();
});
});
</script>
<div id="center">
<h1>&Eacute;L&Eacute;MENTS FINANCIERS - BILANS</h1>
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="340" class="StyleInfoData"><?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="340" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale']?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Type de bilans</td>
<td width="340" class="StyleInfoData">
<?php
if( $numBilanN>0 || $numBilanC>0 )
{
$firephp->log($typeBilan, 'typeBilan');
?>
<?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
if (count($ratiosEntrep)==0 || !isset($ratiosEntrep)){
?>
<table>
<tr><td width="30">&nbsp;</td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
</table>
<?php
}else{
?>
<h2>Bilan actif - passif</h2>
<table class="bilans">
<thead>
<tr>
<th>ACTIF</th>
<?php
$nb_bilans = 5;
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<th class="date">
<?php
if(isset($bilansInfos[$nb_bilans-$i]['dateCloture'])) {
print substr($bilansInfos[$nb_bilans-$i]['dateCloture'],6,2).'/'.substr($bilansInfos[$nb_bilans-$i]['dateCloture'],4,2).'/'.substr($bilansInfos[$nb_bilans-$i]['dateCloture'],0,4);?><br/><?php print $bilansInfos[$nb_bilans-$i]['duree']; ?> mois
<?php
}else{ print '-'; } ?>
</th>
<?php
}
?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<tr class="subhead">
<td>Actif Immobilisé Net</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r59'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r59','r22')?></td>
</tr>
<tr>
<td>Incorporelles</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r51'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r51','r22')?></td>
</tr>
<tr>
<td>Corporelles</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r52'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r52','r22')?></td>
</tr>
<tr>
<td>Financières</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r53'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r53','r22')?></td>
</tr>
<tr class="subhead">
<td>Actif Circulant Net</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r69'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r69','r22')?></td>
</tr>
<tr>
<td>Stock et encours</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r60'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r60','r22')?></td>
</tr>
<tr>
<td>Créances Clients</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r61'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r61','r22')?></td>
</tr>
<tr>
<td>Autres Créances</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r62'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r62','r22')?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Trésorerie Active</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r63'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r63','r22')?></td>
</tr>
<tr class="subhead">
<td>TOTAL ACTIF</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r22'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r22','r22')?></td>
</tr>
<tr><td colspan="7" class="graph">
<?php print bilans_graph_actif($dataActif[0], $fileName.$typeBilan); ?>
</td></tr>
</tbody>
</table> 
<br/><br/>
<table class="bilans">
<thead>
<tr>
<th>PASSIF</th>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<th class="date">
<?php
if(isset($bilansInfos[$nb_bilans-$i]['dateCloture'])) {
print substr($bilansInfos[$nb_bilans-$i]['dateCloture'],6,2).'/'.substr($bilansInfos[$nb_bilans-$i]['dateCloture'],4,2).'/'.substr($bilansInfos[$nb_bilans-$i]['dateCloture'],0,4);?><br/><?php print $bilansInfos[$nb_bilans-$i]['duree']; ?> mois
<?php
}else{ print '-'; } ?>
</th>
<?php
}
?>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<tr class="subhead">
<td>Ressources Propres</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r79'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r79','r22')?></td>
</tr>
<tr>
<td>Fonds Propres</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r70'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r70','r22')?></td>
</tr>
<tr>
<td>Provisions Risques</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r71'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r71','r22')?></td>
</tr>
<tr>
<td>Comptes Courants</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r72'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r72','r22')?></td>
</tr>
<tr class="subhead">
<td>Ressources Externes</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r90'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r90','r22')?></td>
</tr>
<tr>
<td>Dettes Financières</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r83'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r83','r22')?></td>
</tr>
<tr>
<td>Dettes Fournisseurs</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r84'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r84','r22')?></td>
</tr>
<tr>
<td>Dettes Fiscales</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r85'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r85','r22')?></td>
</tr>
<tr>
<td>Autres Dettes</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r86'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r86','r22')?></td>
</tr>
<tr>
<td>Trésorerie Passive</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r87'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r87','r22')?></td>
</tr>
<tr class="subhead">
<td>TOTAL PASSIF</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r22'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r22','r22')?></td>
</tr>
<tr><td colspan="7" class="graph">
<?php print bilans_graph_passif($dataPassif[0], $fileName.$typeBilan);?>
</td></tr>
</tbody>
</table> 
<br/><br/>
<h2>Soldes Interm&eacute;diare de Gestion</h2>
<table class="bilans">
<thead>
<tr>
<th colspan="2">SOLDES INTERMEDIAIRES DE GESTION</th>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<th class="date">
<?php
if(isset($bilansInfos[$nb_bilans-$i]['dateCloture'])) {
print substr($bilansInfos[$nb_bilans-$i]['dateCloture'],6,2).'/'.substr($bilansInfos[$nb_bilans-$i]['dateCloture'],4,2).'/'.substr($bilansInfos[$nb_bilans-$i]['dateCloture'],0,4);?><br/><?php print $bilansInfos[$nb_bilans-$i]['duree']; ?> mois
<?php
}else{ print '-'; } ?>
</th>
<?php
}
?>
<th>% C.A.</th>
</tr>
</thead>
<tbody>
<tr class="subhead">
<td class="center" colspan="2">CHIFFRE D'AFFAIRES HORS TAXE</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r101'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r101','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Achat de marchandises, de matières premières</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r102'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r102','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">MARGE COMMERCIALE</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r110'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r110','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Production vendue</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r111'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r111','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Production immobilisée et stockée</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r112'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r112','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">PRODUCTION DE L'EXERCICE</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r120'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r120','r101'); ?></td>
</tr>
<tr>
<td>&plusmn;</td><td>Variation de stock de marchandises et matières premières</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r121'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r121','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">MARGE BRUTE</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r122'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r122','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Autres charges externes</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r123'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r123','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">VALEUR AJOUTÉE</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r130'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r130','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Charges de personnel</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r132'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r132','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Impôts, taxes & versements assimilés</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r133'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r133','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Subventions d'exploitation</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r131'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r131','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">EXCÉDENT BRUT D'EXPLOITATION (EBE)</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r140'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r140','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Autres produits d'exploitation</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r141'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r141','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Autres charges d'exploitation</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r142'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r142','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Reprise sur dotations & transferts de charges</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r143'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r143','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>70% Loyer de crédit bail</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r144'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r144','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Dotations d'exploitation & provisions d'exploitation</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r145'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r145','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">RÉSULTAT D'EXPLOITATION</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r150'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r150','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Produits financiers</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r151'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r151','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>30% Loyer de crédit bail</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r152'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r152','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Charges financières</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r153'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r153','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">RÉSULTAT COURANT AVANT IMPOTS</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r170'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r170','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Produits exceptionnels</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r171'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r171','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Charges exceptionnelles</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r172'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r172','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Impôts sur les bénéfices</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r181'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r181','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Participation salariale</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r182'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r182','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">RÉSULTAT NET</td>
<?php
for($i=1; $i<=$nb_bilans; $i++)
{
?>
<td class="right"><?php print dRatio($nb_bilans-$i,'r199'); ?></td>
<?php
}
?>
<td class="right"><?php print dPercent(0,'r199','r101'); ?></td>
</tr>
<tr><td colspan="8" class="graph">
<?php print bilans_graph_sig($dataSIG[0], $fileName.$typeBilan);?>
</td></tr>
</tbody>
</table> 
<?php
}
?>
</div>