extranet/www/pages/bilans.php
2009-09-08 11:58:05 +00:00

748 lines
30 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);
require_once 'cache/cache.php';
require_once 'ratios/ratios.php';
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
}else{ $fileName = $page2.'-'.$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'];
//Affichage des dates dans l'ordre décroissant
//Tri des tableaux
foreach ($bilansInfos as $key => $row) {
$bilansInfos[$key]['cle'] = $key;
$date[$key] = $row['dateCloture'];
$duree[$key] = $row['duree'];
$devise[$key] = $row['devise'];
$unite[$key] = $row['unite'];
$cle[$key] = $row['cle'];
}
array_multisort($date, SORT_DESC, $duree, SORT_DESC, $devise, SORT_DESC, $unite, SORT_DESC, $cle, SORT_DESC, $bilansInfos);
//Tri des autres tableaux
$tempRatiosEntrep = $ratiosEntrep;
$tempRatiosEntrepEvol = $ratiosEntrepEvol;
$tempRatiosSecteur = $ratiosSecteur;
$i = 0;
foreach ($bilansInfos as $row){
$ratiosEntrep[$i] = $tempRatiosEntrep[$row['cle']];
$ratiosEntrepEvol[$i] = $tempRatiosEntrepEvol[$row['cle']];
$ratiosSecteur[$i] = $tempRatiosSecteur[$row['cle']];
$i++;
}
//Fin de tri des tableaux
$dataActif = array( graphPercent('r51','r22'),
graphPercent('r52','r22'),
graphPercent('r53','r22'),
graphPercent('r60','r22'),
graphPercent('r61','r22'),
graphPercent('r62','r22'),
graphPercent('r63','r22'),
);
$dataPassif = array( graphPercent('r70','r22'),
graphPercent('r71','r22'),
graphPercent('r72','r22'),
graphPercent('r83','r22'),
graphPercent('r84','r22'),
graphPercent('r85','r22'),
graphPercent('r86','r22'),
graphPercent('r87','r22'),
);
$dataSIG = array( graphPercent('r101','r101')-graphPercent('r122','r101'),
graphPercent('r122','r101')-graphPercent('r130','r101'),
graphPercent('r130','r101')-graphPercent('r140','r101'),
graphPercent('r140','r101')-graphPercent('r150','r101'),
graphPercent('r150','r101')-graphPercent('r170','r101'),
graphPercent('r170','r101')-graphPercent('r199','r101'),
graphPercent('r199','r101'),
);
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();
}
}
?>
<style>
.bilans {font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif; font-size:12px; margin:0; width:570px; text-align:left; border-collapse:collapse;}
.bilans th {padding:4px; font-weight:normal; font-size:11px; border:1px solid #000; color:#000; background:#b9c9fe; text-align:center; font-weight:bold;}
.bilans td {padding:4px; border:1px solid #000; color:#000;}
.bilans td.graph {padding:0;}
.bilans th.date {font-size:10px;}
.bilans td.right {text-align:right;}
.bilans td.center {text-align: center;}
.bilans td.italique {font-style:italic;}
.bilans tr.subhead td {padding:4px; background:#b9c9fe; border: 1px solid #000; font-weight:bold; color:#000;}
.entete {margin:1px;}
.subentete {margin:2px;}
</style>
<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>
</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>
<th class="date">
<?php
if(isset($bilansInfos[4]['dateCloture'])) {
print substr($bilansInfos[4]['dateCloture'],6,2).'/'.substr($bilansInfos[4]['dateCloture'],4,2).'/'.substr($bilansInfos[4]['dateCloture'],0,4);?><br/><?php print $bilansInfos[4]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[3]['dateCloture'])) {
print substr($bilansInfos[3]['dateCloture'],6,2).'/'.substr($bilansInfos[3]['dateCloture'],4,2).'/'.substr($bilansInfos[3]['dateCloture'],0,4);?><br/><?php print $bilansInfos[3]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[2]['dateCloture'])) {
print substr($bilansInfos[2]['dateCloture'],6,2).'/'.substr($bilansInfos[2]['dateCloture'],4,2).'/'.substr($bilansInfos[2]['dateCloture'],0,4);?><br/><?php print $bilansInfos[2]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[1]['dateCloture'])) {
print substr($bilansInfos[1]['dateCloture'],6,2).'/'.substr($bilansInfos[1]['dateCloture'],4,2).'/'.substr($bilansInfos[1]['dateCloture'],0,4);?><br/><?php print $bilansInfos[1]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[0]['dateCloture'])) {
print substr($bilansInfos[0]['dateCloture'],6,2).'/'.substr($bilansInfos[0]['dateCloture'],4,2).'/'.substr($bilansInfos[0]['dateCloture'],0,4);?><br/><?php print $bilansInfos[0]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<tr class="subhead">
<td>Actif Immobilisé Net</td>
<td class="right"><?php print dRatio(4,'r59'); ?></td>
<td class="right"><?php print dRatio(3,'r59'); ?></td>
<td class="right"><?php print dRatio(2,'r59'); ?></td>
<td class="right"><?php print dRatio(1,'r59'); ?></td>
<td class="right"><?php print dRatio(0,'r59'); ?></td>
<td class="right"><?php print dPercent(0,'r59','r22')?></td>
</tr>
<tr>
<td>Incorporelles</td>
<td class="right"><?php print dRatio(4,'r51'); ?></td>
<td class="right"><?php print dRatio(3,'r51'); ?></td>
<td class="right"><?php print dRatio(2,'r51'); ?></td>
<td class="right"><?php print dRatio(1,'r51'); ?></td>
<td class="right"><?php print dRatio(0,'r51'); ?></td>
<td class="right"><?php dPercent(0,'r51','r22')?></td>
</tr>
<tr>
<td>Corporelles</td>
<td class="right"><?php print dRatio(4,'r52'); ?></td>
<td class="right"><?php print dRatio(3,'r52'); ?></td>
<td class="right"><?php print dRatio(2,'r52'); ?></td>
<td class="right"><?php print dRatio(1,'r52'); ?></td>
<td class="right"><?php print dRatio(0,'r52'); ?></td>
<td class="right"><?php dPercent(0,'r52','r22')?></td>
</tr>
<tr>
<td>Financières</td>
<td class="right"><?php print dRatio(4,'r53'); ?></td>
<td class="right"><?php print dRatio(3,'r53'); ?></td>
<td class="right"><?php print dRatio(2,'r53'); ?></td>
<td class="right"><?php print dRatio(1,'r53'); ?></td>
<td class="right"><?php print dRatio(0,'r53'); ?></td>
<td class="right"><?php dPercent(0,'r53','r22')?></td>
</tr>
<tr class="subhead">
<td>Actif Circulant Net</td>
<td class="right"><?php print dRatio(4,'r69'); ?></td>
<td class="right"><?php print dRatio(3,'r69'); ?></td>
<td class="right"><?php print dRatio(2,'r69'); ?></td>
<td class="right"><?php print dRatio(1,'r69'); ?></td>
<td class="right"><?php print dRatio(0,'r69'); ?></td>
<td class="right"><?php dPercent(0,'r69','r22')?></td>
</tr>
<tr>
<td>Stock et encours</td>
<td class="right"><?php print dRatio(4,'r60'); ?></td>
<td class="right"><?php print dRatio(3,'r60'); ?></td>
<td class="right"><?php print dRatio(2,'r60'); ?></td>
<td class="right"><?php print dRatio(1,'r60'); ?></td>
<td class="right"><?php print dRatio(0,'r60'); ?></td>
<td class="right"><?php dPercent(0,'r60','r22')?></td>
</tr>
<tr>
<td>Créances Clients</td>
<td class="right"><?php print dRatio(4,'r61'); ?></td>
<td class="right"><?php print dRatio(3,'r61'); ?></td>
<td class="right"><?php print dRatio(2,'r61'); ?></td>
<td class="right"><?php print dRatio(1,'r61'); ?></td>
<td class="right"><?php print dRatio(0,'r61'); ?></td>
<td class="right"><?php dPercent(0,'r61','r22')?></td>
</tr>
<tr>
<td>Autres Créances</td>
<td class="right"><?php print dRatio(4,'r62'); ?></td>
<td class="right"><?php print dRatio(3,'r62'); ?></td>
<td class="right"><?php print dRatio(2,'r62'); ?></td>
<td class="right"><?php print dRatio(1,'r62'); ?></td>
<td class="right"><?php print dRatio(0,'r62'); ?></td>
<td class="right"><?php 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>
<td class="right"><?php print dRatio(4,'r63'); ?></td>
<td class="right"><?php print dRatio(3,'r63'); ?></td>
<td class="right"><?php print dRatio(2,'r63'); ?></td>
<td class="right"><?php print dRatio(1,'r63'); ?></td>
<td class="right"><?php print dRatio(0,'r63'); ?></td>
<td class="right"><?php dPercent(0,'r63','r22')?></td>
</tr>
<tr class="subhead">
<td>TOTAL ACTIF</td>
<td class="right"><?php print dRatio(4,'r22'); ?></td>
<td class="right"><?php print dRatio(3,'r22'); ?></td>
<td class="right"><?php print dRatio(2,'r22'); ?></td>
<td class="right"><?php print dRatio(1,'r22'); ?></td>
<td class="right"><?php print dRatio(0,'r22'); ?></td>
<td class="right"><?php dPercent(0,'r22','r22')?></td>
</tr>
<tr><td colspan="7" class="graph">
<?php print bilans_graph_actif($dataActif, $fileName); ?>
</td></tr>
</tbody>
</table> 
<br/><br/>
<table class="bilans">
<thead>
<tr>
<th>PASSIF</th>
<th class="date">
<?php
if(isset($bilansInfos[4]['dateCloture'])) {
print substr($bilansInfos[4]['dateCloture'],6,2).'/'.substr($bilansInfos[4]['dateCloture'],4,2).'/'.substr($bilansInfos[4]['dateCloture'],0,4);?><br/><?php print $bilansInfos[4]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[3]['dateCloture'])) {
print substr($bilansInfos[3]['dateCloture'],6,2).'/'.substr($bilansInfos[3]['dateCloture'],4,2).'/'.substr($bilansInfos[3]['dateCloture'],0,4);?><br/><?php print $bilansInfos[3]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[2]['dateCloture'])) {
print substr($bilansInfos[2]['dateCloture'],6,2).'/'.substr($bilansInfos[2]['dateCloture'],4,2).'/'.substr($bilansInfos[2]['dateCloture'],0,4);?><br/><?php print $bilansInfos[2]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[1]['dateCloture'])) {
print substr($bilansInfos[1]['dateCloture'],6,2).'/'.substr($bilansInfos[1]['dateCloture'],4,2).'/'.substr($bilansInfos[1]['dateCloture'],0,4);?><br/><?php print $bilansInfos[1]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[0]['dateCloture'])) {
print substr($bilansInfos[0]['dateCloture'],6,2).'/'.substr($bilansInfos[0]['dateCloture'],4,2).'/'.substr($bilansInfos[0]['dateCloture'],0,4);?><br/><?php print $bilansInfos[0]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th>% T.B.</th>
</tr>
</thead>
<tbody>
<tr class="subhead">
<td>Ressources Propres</td>
<td class="right"><?php print dRatio(4,'r79'); ?></td>
<td class="right"><?php print dRatio(3,'r79'); ?></td>
<td class="right"><?php print dRatio(2,'r79'); ?></td>
<td class="right"><?php print dRatio(1,'r79'); ?></td>
<td class="right"><?php print dRatio(0,'r79'); ?></td>
<td class="right"><?php dPercent(0,'r79','r22')?></td>
</tr>
<tr>
<td>Fonds Propres</td>
<td class="right"><?php print dRatio(4,'r70'); ?></td>
<td class="right"><?php print dRatio(3,'r70'); ?></td>
<td class="right"><?php print dRatio(2,'r70'); ?></td>
<td class="right"><?php print dRatio(1,'r70'); ?></td>
<td class="right"><?php print dRatio(0,'r70'); ?></td>
<td class="right"><?php dPercent(0,'r70','r22')?></td>
</tr>
<tr>
<td>Provisions Risques</td>
<td class="right"><?php print dRatio(4,'r71'); ?></td>
<td class="right"><?php print dRatio(3,'r71'); ?></td>
<td class="right"><?php print dRatio(2,'r71'); ?></td>
<td class="right"><?php print dRatio(1,'r71'); ?></td>
<td class="right"><?php print dRatio(0,'r71'); ?></td>
<td class="right"><?php dPercent(0,'r71','r22')?></td>
</tr>
<tr>
<td>Comptes Courants</td>
<td class="right"><?php print dRatio(4,'r72'); ?></td>
<td class="right"><?php print dRatio(3,'r72'); ?></td>
<td class="right"><?php print dRatio(2,'r72'); ?></td>
<td class="right"><?php print dRatio(1,'r72'); ?></td>
<td class="right"><?php print dRatio(0,'r72'); ?></td>
<td class="right"><?php dPercent(0,'r72','r22')?></td>
</tr>
<tr class="subhead">
<td>Ressources Externes</td>
<td class="right"><?php print dRatio(4,'r90'); ?></td>
<td class="right"><?php print dRatio(3,'r90'); ?></td>
<td class="right"><?php print dRatio(2,'r90'); ?></td>
<td class="right"><?php print dRatio(1,'r90'); ?></td>
<td class="right"><?php print dRatio(0,'r90'); ?></td>
<td class="right"><?php dPercent(0,'r90','r22')?></td>
</tr>
<tr>
<td>Dettes Financières</td>
<td class="right"><?php print dRatio(4,'r83'); ?></td>
<td class="right"><?php print dRatio(3,'r83'); ?></td>
<td class="right"><?php print dRatio(2,'r83'); ?></td>
<td class="right"><?php print dRatio(1,'r83'); ?></td>
<td class="right"><?php print dRatio(0,'r83'); ?></td>
<td class="right"><?php dPercent(0,'r83','r22')?></td>
</tr>
<tr>
<td>Dettes Fournisseurs</td>
<td class="right"><?php print dRatio(4,'r84'); ?></td>
<td class="right"><?php print dRatio(3,'r84'); ?></td>
<td class="right"><?php print dRatio(2,'r84'); ?></td>
<td class="right"><?php print dRatio(1,'r84'); ?></td>
<td class="right"><?php print dRatio(0,'r84'); ?></td>
<td class="right"><?php dPercent(0,'r84','r22')?></td>
</tr>
<tr>
<td>Dettes Fiscales</td>
<td class="right"><?php print dRatio(4,'r85'); ?></td>
<td class="right"><?php print dRatio(3,'r85'); ?></td>
<td class="right"><?php print dRatio(2,'r85'); ?></td>
<td class="right"><?php print dRatio(1,'r85'); ?></td>
<td class="right"><?php print dRatio(0,'r85'); ?></td>
<td class="right"><?php dPercent(0,'r85','r22')?></td>
</tr>
<tr>
<td>Autres Dettes</td>
<td class="right"><?php print dRatio(4,'r86'); ?></td>
<td class="right"><?php print dRatio(3,'r86'); ?></td>
<td class="right"><?php print dRatio(2,'r86'); ?></td>
<td class="right"><?php print dRatio(1,'r86'); ?></td>
<td class="right"><?php print dRatio(0,'r86'); ?></td>
<td class="right"><?php dPercent(0,'r86','r22')?></td>
</tr>
<tr>
<td>Trésorerie Passive</td>
<td class="right"><?php print dRatio(4,'r87'); ?></td>
<td class="right"><?php print dRatio(3,'r87'); ?></td>
<td class="right"><?php print dRatio(2,'r87'); ?></td>
<td class="right"><?php print dRatio(1,'r87'); ?></td>
<td class="right"><?php print dRatio(0,'r87'); ?></td>
<td class="right"><?php dPercent(0,'r87','r22')?></td>
</tr>
<tr class="subhead">
<td>TOTAL PASSIF</td>
<td class="right"><?php print dRatio(4,'r22'); ?></td>
<td class="right"><?php print dRatio(3,'r22'); ?></td>
<td class="right"><?php print dRatio(2,'r22'); ?></td>
<td class="right"><?php print dRatio(1,'r22'); ?></td>
<td class="right"><?php print dRatio(0,'r22'); ?></td>
<td class="right"><?php dPercent(0,'r22','r22')?></td>
</tr>
<tr><td colspan="7" class="graph">
<?php print bilans_graph_passif($dataPassif, $fileName);?>
</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>
<th class="date">
<?php
if(isset($bilansInfos[4]['dateCloture'])) {
print substr($bilansInfos[4]['dateCloture'],6,2).'/'.substr($bilansInfos[4]['dateCloture'],4,2).'/'.substr($bilansInfos[4]['dateCloture'],0,4);?><br/><?php print $bilansInfos[4]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[3]['dateCloture'])) {
print substr($bilansInfos[3]['dateCloture'],6,2).'/'.substr($bilansInfos[3]['dateCloture'],4,2).'/'.substr($bilansInfos[3]['dateCloture'],0,4);?><br/><?php print $bilansInfos[3]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[2]['dateCloture'])) {
print substr($bilansInfos[2]['dateCloture'],6,2).'/'.substr($bilansInfos[2]['dateCloture'],4,2).'/'.substr($bilansInfos[2]['dateCloture'],0,4);?><br/><?php print $bilansInfos[2]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[1]['dateCloture'])) {
print substr($bilansInfos[1]['dateCloture'],6,2).'/'.substr($bilansInfos[1]['dateCloture'],4,2).'/'.substr($bilansInfos[1]['dateCloture'],0,4);?><br/><?php print $bilansInfos[1]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th class="date">
<?php
if(isset($bilansInfos[0]['dateCloture'])) {
print substr($bilansInfos[0]['dateCloture'],6,2).'/'.substr($bilansInfos[0]['dateCloture'],4,2).'/'.substr($bilansInfos[0]['dateCloture'],0,4);?><br/><?php print $bilansInfos[0]['duree']; ?> mois
<?php }else{ print '-'; } ?>
</th>
<th>% C.A.</th>
</tr>
</thead>
<tbody>
<tr class="subhead">
<td class="center" colspan="2">CHIFFRE D'AFFAIRES HORS TAXE</td>
<td class="right"><?php print dRatio(4,'r101'); ?></td>
<td class="right"><?php print dRatio(3,'r101'); ?></td>
<td class="right"><?php print dRatio(2,'r101'); ?></td>
<td class="right"><?php print dRatio(1,'r101'); ?></td>
<td class="right"><?php print dRatio(0,'r101'); ?></td>
<td class="right"><?php dPercent(0,'r101','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Achat de marchandises, de matières premières</td>
<td class="right"><?php print dRatio(4,'r102'); ?></td>
<td class="right"><?php print dRatio(3,'r102'); ?></td>
<td class="right"><?php print dRatio(2,'r102'); ?></td>
<td class="right"><?php print dRatio(1,'r102'); ?></td>
<td class="right"><?php print dRatio(0,'r102'); ?></td>
<td class="right"><?php dPercent(0,'r102','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">MARGE COMMERCIALE</td>
<td class="right"><?php print dRatio(4,'r110'); ?></td>
<td class="right"><?php print dRatio(3,'r110'); ?></td>
<td class="right"><?php print dRatio(2,'r110'); ?></td>
<td class="right"><?php print dRatio(1,'r110'); ?></td>
<td class="right"><?php print dRatio(0,'r110'); ?></td>
<td class="right"><?php dPercent(0,'r110','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Production vendue</td>
<td class="right"><?php print dRatio(4,'r111'); ?></td>
<td class="right"><?php print dRatio(3,'r111'); ?></td>
<td class="right"><?php print dRatio(2,'r111'); ?></td>
<td class="right"><?php print dRatio(1,'r111'); ?></td>
<td class="right"><?php print dRatio(0,'r111'); ?></td>
<td class="right"><?php dPercent(0,'r111','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Production immobilisée et stockée</td>
<td class="right"><?php print dRatio(4,'r112'); ?></td>
<td class="right"><?php print dRatio(3,'r112'); ?></td>
<td class="right"><?php print dRatio(2,'r112'); ?></td>
<td class="right"><?php print dRatio(1,'r112'); ?></td>
<td class="right"><?php print dRatio(0,'r112'); ?></td>
<td class="right"><?php dPercent(0,'r112','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">PRODUCTION DE L'EXERCICE</td>
<td class="right"><?php print dRatio(4,'r120'); ?></td>
<td class="right"><?php print dRatio(3,'r120'); ?></td>
<td class="right"><?php print dRatio(2,'r120'); ?></td>
<td class="right"><?php print dRatio(1,'r120'); ?></td>
<td class="right"><?php print dRatio(0,'r120'); ?></td>
<td class="right"><?php dPercent(0,'r120','r101'); ?></td>
</tr>
<tr>
<td>&plusmn;</td><td>Variation de stock de marchandises et matières premières</td>
<td class="right"><?php print dRatio(4,'r121'); ?></td>
<td class="right"><?php print dRatio(3,'r121'); ?></td>
<td class="right"><?php print dRatio(2,'r121'); ?></td>
<td class="right"><?php print dRatio(1,'r121'); ?></td>
<td class="right"><?php print dRatio(0,'r121'); ?></td>
<td class="right"><?php dPercent(0,'r121','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">MARGE BRUTE</td>
<td class="right"><?php print dRatio(4,'r122'); ?></td>
<td class="right"><?php print dRatio(3,'r122'); ?></td>
<td class="right"><?php print dRatio(2,'r122'); ?></td>
<td class="right"><?php print dRatio(1,'r122'); ?></td>
<td class="right"><?php print dRatio(0,'r122'); ?></td>
<td class="right"><?php dPercent(0,'r122','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Autres charges externes</td>
<td class="right"><?php print dRatio(4,'r123'); ?></td>
<td class="right"><?php print dRatio(3,'r123'); ?></td>
<td class="right"><?php print dRatio(2,'r123'); ?></td>
<td class="right"><?php print dRatio(1,'r123'); ?></td>
<td class="right"><?php print dRatio(0,'r123'); ?></td>
<td class="right"><?php dPercent(0,'r123','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">VALEUR AJOUTÉE</td>
<td class="right"><?php print dRatio(4,'r130'); ?></td>
<td class="right"><?php print dRatio(3,'r130'); ?></td>
<td class="right"><?php print dRatio(2,'r130'); ?></td>
<td class="right"><?php print dRatio(1,'r130'); ?></td>
<td class="right"><?php print dRatio(0,'r130'); ?></td>
<td class="right"><?php dPercent(0,'r130','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Charges de personnel</td>
<td class="right"><?php print dRatio(4,'r132'); ?></td>
<td class="right"><?php print dRatio(3,'r132'); ?></td>
<td class="right"><?php print dRatio(2,'r132'); ?></td>
<td class="right"><?php print dRatio(1,'r132'); ?></td>
<td class="right"><?php print dRatio(0,'r132'); ?></td>
<td class="right"><?php dPercent(0,'r132','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Impôts, taxes & versements assimilés</td>
<td class="right"><?php print dRatio(4,'r133'); ?></td>
<td class="right"><?php print dRatio(3,'r133'); ?></td>
<td class="right"><?php print dRatio(2,'r133'); ?></td>
<td class="right"><?php print dRatio(1,'r133'); ?></td>
<td class="right"><?php print dRatio(0,'r133'); ?></td>
<td class="right"><?php dPercent(0,'r133','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Subventions d'exploitation</td>
<td class="right"><?php print dRatio(4,'r131'); ?></td>
<td class="right"><?php print dRatio(3,'r131'); ?></td>
<td class="right"><?php print dRatio(2,'r131'); ?></td>
<td class="right"><?php print dRatio(1,'r131'); ?></td>
<td class="right"><?php print dRatio(0,'r131'); ?></td>
<td class="right"><?php dPercent(0,'r131','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">EXCÉDENT BRUT D'EXPLOITATION (EBE)</td>
<td class="right"><?php print dRatio(4,'r140'); ?></td>
<td class="right"><?php print dRatio(3,'r140'); ?></td>
<td class="right"><?php print dRatio(2,'r140'); ?></td>
<td class="right"><?php print dRatio(1,'r140'); ?></td>
<td class="right"><?php print dRatio(0,'r140'); ?></td>
<td class="right"><?php dPercent(0,'r140','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Autres produits d'exploitation</td>
<td class="right"><?php print dRatio(4,'r141'); ?></td>
<td class="right"><?php print dRatio(3,'r141'); ?></td>
<td class="right"><?php print dRatio(2,'r141'); ?></td>
<td class="right"><?php print dRatio(1,'r141'); ?></td>
<td class="right"><?php print dRatio(0,'r141'); ?></td>
<td class="right"><?php dPercent(0,'r141','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Autres charges d'exploitation</td>
<td class="right"><?php print dRatio(4,'r142'); ?></td>
<td class="right"><?php print dRatio(3,'r142'); ?></td>
<td class="right"><?php print dRatio(2,'r142'); ?></td>
<td class="right"><?php print dRatio(1,'r142'); ?></td>
<td class="right"><?php print dRatio(0,'r142'); ?></td>
<td class="right"><?php dPercent(0,'r142','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Reprise sur dotations & transferts de charges</td>
<td class="right"><?php print dRatio(4,'r143'); ?></td>
<td class="right"><?php print dRatio(3,'r143'); ?></td>
<td class="right"><?php print dRatio(2,'r143'); ?></td>
<td class="right"><?php print dRatio(1,'r143'); ?></td>
<td class="right"><?php print dRatio(0,'r143'); ?></td>
<td class="right"><?php dPercent(0,'r143','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>70% Loyer de crédit bail</td>
<td class="right"><?php print dRatio(4,'r144'); ?></td>
<td class="right"><?php print dRatio(3,'r144'); ?></td>
<td class="right"><?php print dRatio(2,'r144'); ?></td>
<td class="right"><?php print dRatio(1,'r144'); ?></td>
<td class="right"><?php print dRatio(0,'r144'); ?></td>
<td class="right"><?php dPercent(0,'r144','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Dotations d'exploitation & provisions d'exploitation</td>
<td class="right"><?php print dRatio(4,'r145'); ?></td>
<td class="right"><?php print dRatio(3,'r145'); ?></td>
<td class="right"><?php print dRatio(2,'r145'); ?></td>
<td class="right"><?php print dRatio(1,'r145'); ?></td>
<td class="right"><?php print dRatio(0,'r145'); ?></td>
<td class="right"><?php dPercent(0,'r145','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">RÉSULTAT D'EXPLOITATION</td>
<td class="right"><?php print dRatio(4,'r150'); ?></td>
<td class="right"><?php print dRatio(3,'r150'); ?></td>
<td class="right"><?php print dRatio(2,'r150'); ?></td>
<td class="right"><?php print dRatio(1,'r150'); ?></td>
<td class="right"><?php print dRatio(0,'r150'); ?></td>
<td class="right"><?php dPercent(0,'r150','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Produits financiers</td>
<td class="right"><?php print dRatio(4,'r151'); ?></td>
<td class="right"><?php print dRatio(3,'r151'); ?></td>
<td class="right"><?php print dRatio(2,'r151'); ?></td>
<td class="right"><?php print dRatio(1,'r151'); ?></td>
<td class="right"><?php print dRatio(0,'r151'); ?></td>
<td class="right"><?php dPercent(0,'r151','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>30% Loyer de crédit bail</td>
<td class="right"><?php print dRatio(4,'r152'); ?></td>
<td class="right"><?php print dRatio(3,'r152'); ?></td>
<td class="right"><?php print dRatio(2,'r152'); ?></td>
<td class="right"><?php print dRatio(1,'r152'); ?></td>
<td class="right"><?php print dRatio(0,'r152'); ?></td>
<td class="right"><?php dPercent(0,'r152','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Charges financières</td>
<td class="right"><?php print dRatio(4,'r153'); ?></td>
<td class="right"><?php print dRatio(3,'r153'); ?></td>
<td class="right"><?php print dRatio(2,'r153'); ?></td>
<td class="right"><?php print dRatio(1,'r153'); ?></td>
<td class="right"><?php print dRatio(0,'r153'); ?></td>
<td class="right"><?php dPercent(0,'r153','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">RÉSULTAT COURANT AVANT IMPOTS</td>
<td class="right"><?php print dRatio(4,'r170'); ?></td>
<td class="right"><?php print dRatio(3,'r170'); ?></td>
<td class="right"><?php print dRatio(2,'r170'); ?></td>
<td class="right"><?php print dRatio(1,'r170'); ?></td>
<td class="right"><?php print dRatio(0,'r170'); ?></td>
<td class="right"><?php dPercent(0,'r170','r101'); ?></td>
</tr>
<tr>
<td>+</td><td>Produits exceptionnels</td>
<td class="right"><?php print dRatio(4,'r171'); ?></td>
<td class="right"><?php print dRatio(3,'r171'); ?></td>
<td class="right"><?php print dRatio(2,'r171'); ?></td>
<td class="right"><?php print dRatio(1,'r171'); ?></td>
<td class="right"><?php print dRatio(0,'r171'); ?></td>
<td class="right"><?php dPercent(0,'r171','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Charges exceptionnelles</td>
<td class="right"><?php print dRatio(4,'r172'); ?></td>
<td class="right"><?php print dRatio(3,'r172'); ?></td>
<td class="right"><?php print dRatio(2,'r172'); ?></td>
<td class="right"><?php print dRatio(1,'r172'); ?></td>
<td class="right"><?php print dRatio(0,'r172'); ?></td>
<td class="right"><?php dPercent(0,'r172','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Impôts sur les bénéfices</td>
<td class="right"><?php print dRatio(4,'r181'); ?></td>
<td class="right"><?php print dRatio(3,'r181'); ?></td>
<td class="right"><?php print dRatio(2,'r181'); ?></td>
<td class="right"><?php print dRatio(1,'r181'); ?></td>
<td class="right"><?php print dRatio(0,'r181'); ?></td>
<td class="right"><?php dPercent(0,'r181','r101'); ?></td>
</tr>
<tr>
<td>-</td><td>Participation salariale</td>
<td class="right"><?php print dRatio(4,'r182'); ?></td>
<td class="right"><?php print dRatio(3,'r182'); ?></td>
<td class="right"><?php print dRatio(2,'r182'); ?></td>
<td class="right"><?php print dRatio(1,'r182'); ?></td>
<td class="right"><?php print dRatio(0,'r182'); ?></td>
<td class="right"><?php dPercent(0,'r182','r101'); ?></td>
</tr>
<tr class="subhead">
<td class="center" colspan="2">RÉSULTAT NET</td>
<td class="right"><?php print dRatio(4,'r199'); ?></td>
<td class="right"><?php print dRatio(3,'r199'); ?></td>
<td class="right"><?php print dRatio(2,'r199'); ?></td>
<td class="right"><?php print dRatio(1,'r199'); ?></td>
<td class="right"><?php print dRatio(0,'r199'); ?></td>
<td class="right"><?php dPercent(0,'r199','r101'); ?></td>
</tr>
<tr><td colspan="8" class="graph">
<?php print bilans_graph_sig($dataSIG, $fileName);?>
</td></tr>
</tbody>
</table> 
<?php
}
?>
</div>