extranet/www/pages/bilans.php
2009-02-26 17:16:11 +00:00

771 lines
50 KiB
PHP
Raw Blame History

<? if (!$_SESSION['connected']) die();
function bilanSimplifie2Normal($bilanRS) {
$tabBS2BN=array('AH'=>'010',
'AI'=>'012',
'AJ'=>'014',
'AK'=>'016',
'AT'=>'028',
'AU'=>'030',
'BH'=>'040',
'BI'=>'042',
'BJ'=>'044',
'BK'=>'048',
'BT'=>'060',
'BU'=>'062',
'BV'=>'064',
'BW'=>'066',
'BX'=>'068',
'BY'=>'070',
'BZ'=>'072',
'CA'=>'074',
'CD'=>'080',
'CE'=>'082',
'CF'=>'084',
'CG'=>'086',
'CH'=>'092',
'CI'=>'094',
'CJ'=>'096',
'CK'=>'098',
'CO'=>'110',
'1A'=>'112',
'DA'=>'120',
'DC'=>'124',
'DD'=>'126',
'DF'=>'130',
'DG'=>'132',
'DH'=>'134',
'DI'=>'136',
'DK'=>'140',
'DL'=>'142',
'DR'=>'154',
'DP'=>'154',
'DU'=>'156',
'DV'=>'169',
'DW'=>'164',
'DX'=>'166',
'EA'=>'172-169',
'EB'=>'174',
'EC'=>'176',
'EE'=>'180',
'EH'=>'156-195',
'FA'=>'210-209',
'FB'=>'209',
'FC'=>'210',
'FD'=>'214-215',
'FE'=>'215',
'FF'=>'214',
'FH'=>'217',
'FI'=>'218',
'FK'=>'209+215+217',
'FL'=>'210+214+218',
'FM'=>'222',
'FN'=>'224',
'FO'=>'226',
'FQ'=>'230',
'FR'=>'232',
'FS'=>'234',
'FT'=>'236',
'FU'=>'238',
'FV'=>'240',
'FW'=>'242',
'FX'=>'244',
'FY'=>'250',
'FZ'=>'252',
'GA'=>'254',
'GE'=>'262',
'GF'=>'264',
'GG'=>'270',
'GP'=>'280',
'GU'=>'294',
'GW'=>'270+280+294',
'HD'=>'290',
'HH'=>'300',
'HI'=>'290-300',
'HK'=>'306',
'HL'=>'232+280+290',
'HM'=>'264+294+300+306',
'HN'=>'310',
'YY'=>'374',
'YZ'=>'378',
'YP'=>'376',
);
$bilanRN=array();
foreach ($tabBS2BN as $posteRN => $formule) {
if (preg_match('/\+|\-/', $formule)) {
$tabTmp=preg_split('/\+|\-/', $formule, -1, PREG_SPLIT_OFFSET_CAPTURE);
//$bilanRN[$posteRN]=0;
$scalc='';
foreach ($tabTmp as $i=>$tab) {
if ($i==0) {
$bilanRN[$posteRN]=$bilanRS[$tab[0]];
$scalc.=$bilanRS[$tab[0]];
}
else {
$signe=$formule[$tab[1]-1];
$scalc.=$signe;
if ($signe=='+') $bilanRN[$posteRN]+=$bilanRS[$tab[0]];
elseif ($signe=='-') $bilanRN[$posteRN]-=$bilanRS[$tab[0]];
$scalc.=$bilanRS[$tab[0]];
}
}
$bilanRN[$posteRN]=$bilanRN[$posteRN];
}
else $bilanRN[$posteRN]=$bilanRS[$formule];
}
if ($bilanRS['240']<>0) {
$bilanRN['BL']=$bilanRS['050'];
$bilanRN['BM']=$bilanRS['052'];
} else {
$bilanRN['BN']=$bilanRS['050'];
$bilanRN['BO']=$bilanRS['052'];
}
if ($bilanRS['070']<>0 || $bilanRS['074']<>0 || $bilanRS['052']<>0 || $bilanRS['062']<>0)
$bilanRN['GC']=$bilanRS['256'];
elseif ($bilanRS['070']==0 && $bilanRS['074']==0 && $bilanRS['052']==0 && $bilanRS['062']==0 && $bilanRS['254']<>0)
$bilanRN['GD']=$bilanRS['256'];
if ($bilanRS['584']<>0) {
$bilanRN['HB']=$bilanRS['584'];
$bilanRN['HA']=$bilanRS['290']-$bilanRS['584'];
} else
$bilanRN['HA']=$bilanRS['290'];
if ($bilanRS['582']<>0) {
$bilanRN['HF']=$bilanRS['582'];
$bilanRN['HE']=$bilanRS['582']-$bilanRS['300'];
} else
$bilanRN['HE']=$bilanRS['300'];
return $bilanRN;
}
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Param<61>tres incorrects !');
$id=trim(preg_replace('/[^0-9]/', '', $_REQUEST['id']))*1; // Si id=0 alors non communiqu<71>
if (($siret*1)==0 && $id==0) die('Param<61>tres incorrects !');
$siren=substr($siret,0,9);
$mil=false;
include_once(INCLUDE_PATH.'/partenaires/classMTva.php');
include_once(INCLUDE_PATH.'/partenaires/classMMap.php');
//include_once(INCLUDE_PATH.'partenaires/classMCoface.php');
include_once(FWK_PATH.'/common/dates.php');
/** Utilisation du WS **/
$client = new SoapClient(null, array( 'trace' => 1,
'soap_version' => SOAP_1_1,
'location' => WEBSERVICE_URL,
'uri' => WEBSERVICE_URI,
'login' => $_SESSION['tabInfo']['login'],
'password' => $_SESSION['tabInfo']['password']));
try {
$O = $client->getListeBilans($siren);
$tabBilans=$O['result'];
$tabBilansNC=$tabBilansC=array();
if (is_array($tabBilans))
foreach ($tabBilans as $millesime=>$bil) {
if (substr($millesime,0,1)=='C') $tabBilansC[$millesime]=$bil;
else $tabBilansNC[$millesime]=$bil;
}
if (count($tabBilansC)>0 && count($tabBilansNC)>0) $nbType=2;
elseif (count($tabBilansC)>0 || count($tabBilansNC)>0) $nbType=1;
else $nbType=0;
/*
echo '<option value="'.$millesime.','.$bil['ref'].'"';
if ($mil==$millesime) echo ' selected';
$str=' '. $typBil[];
echo '>'. substr($millesime,-10) . $str .'</option>';
*/
if (isset($_REQUEST['type']) || $nbType==1) {
if ($_REQUEST['type']=='C') $tabBilans=$tabBilansC;
else $tabBilans=$tabBilansNC;
if ($nbType==1) {
$tabBilans=$tabBilansNC;
if (count($tabBilans)==0) $tabBilans=$tabBilansC;
}
$numBil=0;
foreach ($tabBilans as $millesime=>$bil) {
$O = $client->getBilan($siren, substr($millesime,-10), substr($millesime,0,1), $bil['ref']);
$tabTmp=$O['result'];
if ($tabTmp['CONSOLIDE']=='S') {
$tabTmp2=bilanSimplifie2Normal($tabTmp);
$tabBilan[$numBil]=array_merge($tabTmp2, $tabTmp);
} else {
$tabBilan[$numBil]=$tabTmp;
}
$numBil++;
unset($tabTmp); unset($tabTmp2);
if ($numBil>4) break;
}
}
} catch (SoapFault $fault) {
include_once(realpath(dirname(__FILE__).'/../../').'/includes/soaperror.php');
processSoapFault($client,$fault,$tabInfo);
die();
}
$raisonSociale=$tabInfo['entrep']['raisonSociale'];
$typBil=array('C'=>'Consolid<69>', 'N'=>'', 'S'=>'R<>el Simplifi<66>');
?>
<table width="580" border="0" align="left" bgcolor="#FFFFFF">
<tr>
<td colspan="3" align="center"><img src="./img/rub_bilans.png" width="577" height="36" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" 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="350" class="StyleInfoData"><?=$raisonSociale?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Type de Bilan</td>
<td width="350" class="StyleInfoData"><? if ($nbType>1) { ?>
<form action="./?page=bilans&siret=<?=$siren?>" method="POST">
<input type="radio" name="type" value="NC"<?if ($_REQUEST['type']<>'C') echo ' checked';?>>R<>el Normal ou Simplifi<66> &nbsp;&nbsp;&nbsp;
<input type="radio" name="type" value="C"<?if ($_REQUEST['type']=='C') echo ' checked';?>>Consolid<69>
<input type="submit" value="Ok"></form><?
} elseif ($nbType>0) {
if ($_REQUEST['type']=='C') echo 'Consolid<69>';
else echo 'R<>el Normal ou Simplifi<66>';
} else { ?>
<b>Aucun bilan disponible pour cette entreprise !</b>
<? } ?></td>
</tr>
<? if ($nbType>0) { ?>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><img src="./img/srub_bilanap.png" width="576" height="27" /></td>
</tr>
<tr>
<td colspan="3" align="center">
<?if ($numBil>0) {
$div=0.001;
?>
<table class="bilan" width="575" border="1" cellspacing="1" cellpadding="1" style="border-collapse: collapse; border: 1px solid black">
<tr>
<td width="122" align="center"><b><font size="2">ACTIF (en k<?=$tabBilan[0]['devise']?>)</font></b></td>
<td width="55" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[2]['DATE_CLOTURE'])?></i></font></b></td>
<td width="55" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[1]['DATE_CLOTURE'])?></i></font></b></td>
<td width="55" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[0]['DATE_CLOTURE'])?></i></font></b></td>
<td width="1">&nbsp;</td>
<td width="122" align="center"><b><font size="2">PASSIF (en k<?=$tabBilan[0]['devise']?>)</font></b></td>
<td width="55" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[2]['DATE_CLOTURE'])?></i></font></b></td>
<td width="55" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[1]['DATE_CLOTURE'])?></i></font></b></td>
<td width="55" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[0]['DATE_CLOTURE'])?></i></font></b></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">Capital souscrit non appel<65></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['AA']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['AA']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['AA']*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1"><b>Capitaux propres</b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[2]['DL']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[1]['DL']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[0]['DL']*$div,null,null,' ')?></b></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1"><b>Actif immobilis<69></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[2]['BK1']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[1]['BK1']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[0]['BK1']*$div,null,null,' ')?></b></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;capital social</font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['DA']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['DA']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['DA']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;incorporel</font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[2]['AC1']+$tabBilan[2]['AE1']+$tabBilan[2]['AG1']+
$tabBilan[2]['AI1']+$tabBilan[2]['AK1']+$tabBilan[2]['AM1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[1]['AC1']+$tabBilan[1]['AE1']+$tabBilan[1]['AG1']+
$tabBilan[1]['AI1']+$tabBilan[1]['AK1']+$tabBilan[1]['AM1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[0]['AC1']+$tabBilan[0]['AE1']+$tabBilan[0]['AG1']+
$tabBilan[0]['AI1']+$tabBilan[0]['AK1']+$tabBilan[0]['AM1'])*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;r<>sultat</font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['DI']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['DI']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['DI']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;corporel</font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[2]['AO1']+$tabBilan[2]['AQ1']+$tabBilan[2]['AS1']+
$tabBilan[2]['AU1']+$tabBilan[2]['AW1']+$tabBilan[2]['AY1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[1]['AO1']+$tabBilan[1]['AQ1']+$tabBilan[1]['AS1']+
$tabBilan[1]['AU1']+$tabBilan[1]['AW1']+$tabBilan[1]['AY1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[0]['AO1']+$tabBilan[0]['AQ1']+$tabBilan[0]['AS1']+
$tabBilan[0]['AU1']+$tabBilan[0]['AW1']+$tabBilan[0]['AY1'])*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;provisions</font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['DK']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['DK']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['DK']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;financier</font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[2]['CT1']+$tabBilan[2]['CV1']+$tabBilan[2]['BC1']+
$tabBilan[2]['BE1']+$tabBilan[2]['BG1']+$tabBilan[2]['BI1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[1]['CT1']+$tabBilan[1]['CV1']+$tabBilan[1]['BC1']+
$tabBilan[1]['BE1']+$tabBilan[1]['BG1']+$tabBilan[1]['BI1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[0]['CT1']+$tabBilan[0]['CV1']+$tabBilan[0]['BC1']+
$tabBilan[0]['BE1']+$tabBilan[0]['BG1']+$tabBilan[0]['BI1'])*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1"><b>Autres fonds propres</b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[2]['DO']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[1]['DO']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[0]['DO']*$div,null,null,' ')?></b></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1"><b>Actif circulant</b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format(($tabBilan[2]['CK1']-$tabBilan[2]['CH']+$tabBilan[2]['CI'])*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format(($tabBilan[1]['CK1']-$tabBilan[1]['CH']+$tabBilan[1]['CI'])*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format(($tabBilan[0]['CK1']-$tabBilan[0]['CH']+$tabBilan[0]['CI'])*$div,null,null,' ')?></b></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1"><b>Prov. risq. &amp; charges</b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[2]['DR']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[1]['DR']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[0]['DR']*$div,null,null,' ')?></b></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;stocks</font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[2]['BM1']+$tabBilan[2]['BO1']+$tabBilan[2]['BQ1']+
$tabBilan[2]['BS1']+$tabBilan[2]['BU1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[1]['BM1']+$tabBilan[1]['BO1']+$tabBilan[1]['BQ1']+
$tabBilan[1]['BS1']+$tabBilan[1]['BU1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[0]['BM1']+$tabBilan[0]['BO1']+$tabBilan[0]['BQ1']+
$tabBilan[0]['BS1']+$tabBilan[0]['BU1'])*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1"><b>Dettes</b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[2]['EC']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[1]['EC']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[0]['EC']*$div,null,null,' ')?></b></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;av. &amp; acptes vers&eacute;s</font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['BW1']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['BW1']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['BW1']*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;&eacute;tab. cr&eacute;dit</b></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['DU']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['DU']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['DU']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;cr&eacute;ances clients</font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['BY1']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['BY1']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['BY1']*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;autres dettes fin.</b></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['DV']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['DV']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['DV']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;autres cr&eacute;ances</font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[2]['CA1']+$tabBilan[2]['CC1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[1]['CA1']+$tabBilan[1]['CC1'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[0]['CA1']+$tabBilan[0]['CC1'])*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;av. &amp; acptes re&ccedil;us</b></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['DW']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['DW']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['DW']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;disponibilit&eacute;s</font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['CG1']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['CG1']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['CG1']*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1">&nbsp;&nbsp;fournisseurs</b></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['DX']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['DX']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['DX']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1">Autres postes</font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[2]['CE1']+$tabBilan[2]['CI1']+$tabBilan[2]['CL']+$tabBilan[2]['CM']+$tabBilan[2]['CN'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[1]['CE1']+$tabBilan[1]['CI1']+$tabBilan[1]['CL']+$tabBilan[1]['CM']+$tabBilan[1]['CN'])*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format(($tabBilan[0]['CE1']+$tabBilan[0]['CI1']+$tabBilan[0]['CL']+$tabBilan[0]['CM']+$tabBilan[0]['CN'])*$div,null,null,' ')?></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1">Autres postes</font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[2]['ED']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[1]['ED']*$div,null,null,' ')?></font></td>
<td width="55" align="right"><font size="1"><?=number_format($tabBilan[0]['ED']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="122" align="left"><font size="1"><b>TOTAL ACTIF</b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[2]['EE']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[1]['EE']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[0]['EE']*$div,null,null,' ')?></b></font></td>
<td width="1">&nbsp;</td>
<td width="122" align="left"><font size="1"><b>TOTAL PASSIF</b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[2]['EE']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[1]['EE']*$div,null,null,' ')?></b></font></td>
<td width="55" align="right"><font size="1"><b><?=number_format($tabBilan[0]['EE']*$div,null,null,' ')?></b></font></td>
</tr>
<?
$pie=array( $tabBilan[0]['AA']/1000,
($tabBilan[0]['AC1']+$tabBilan[0]['AE1']+$tabBilan[0]['AG1']+
$tabBilan[0]['AI1']+$tabBilan[0]['AK1']+$tabBilan[0]['AM1'])/1000,
($tabBilan[0]['AO1']+$tabBilan[0]['AQ1']+$tabBilan[0]['AS1']+
$tabBilan[0]['AU1']+$tabBilan[0]['AW1']+$tabBilan[0]['AY1'])/1000,
($tabBilan[0]['CT1']+$tabBilan[0]['CV1']+$tabBilan[0]['BC1']+
$tabBilan[0]['BE1']+$tabBilan[0]['BG1']+$tabBilan[0]['BI1'])/1000,
($tabBilan[0]['BM1']+$tabBilan[0]['BO1']+$tabBilan[0]['BQ1']+
$tabBilan[0]['BS1']+$tabBilan[0]['BU1'])/1000,
($tabBilan[0]['BW1'])/1000,
($tabBilan[0]['BY1'])/1000,
($tabBilan[0]['CA1']+$tabBilan[0]['CC1'])/1000,
($tabBilan[0]['CG1'])/1000,
($tabBilan[0]['CE1']+$tabBilan[0]['CI1']+$tabBilan[0]['CL']+
$tabBilan[0]['CM']+$tabBilan[0]['CN'])/1000,
);
?>
<tr>
<td width="575" align="center" colspan="9"><img src="./graphs/pie.php?w=575&h=210&t=a&r=80&y=80&d=<?=urlencode(serialize($pie))?>" width="575" height="210"/></td>
</tr>
<? /*
$pie=array( $tabBilan[0]['AA']/1000,
($tabBilan[0]['AC1']+$tabBilan[0]['AE1']+$tabBilan[0]['AG1']+
$tabBilan[0]['AI1']+$tabBilan[0]['AK1']+$tabBilan[0]['AM1'])/1000,
($tabBilan[0]['AO1']+$tabBilan[0]['AQ1']+$tabBilan[0]['AS1']+
$tabBilan[0]['AU1']+$tabBilan[0]['AW1']+$tabBilan[0]['AY1'])/1000,
($tabBilan[0]['CT1']+$tabBilan[0]['CV1']+$tabBilan[0]['BC1']+
$tabBilan[0]['BE1']+$tabBilan[0]['BG1']+$tabBilan[0]['BI1'])/1000,
($tabBilan[0]['BM1']+$tabBilan[0]['BO1']+$tabBilan[0]['BQ1']+
$tabBilan[0]['BS1']+$tabBilan[0]['BU1'])/1000,
($tabBilan[0]['BW1'])/1000,
($tabBilan[0]['BY1'])/1000,
($tabBilan[0]['CA1']+$tabBilan[0]['CC1'])/1000,
($tabBilan[0]['CG1'])/1000,
($tabBilan[0]['CE1']+$tabBilan[0]['CI1']+$tabBilan[0]['CL']+
$tabBilan[0]['CM']+$tabBilan[0]['CN'])/1000,
);
?>
<tr>
<td width="575" align="center" colspan="9"><img src="./graphs/pie.php?w=575&h=210&t=a&r=80&y=80&d=<?=urlencode(serialize($pie))?>" width="575" height="210"/></td>
</tr>
<? */ ?>
</table>
<? } ?>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><img src="./img/srub_cdr.png" width="576" height="27" /></td>
</tr>
<tr>
<td colspan="3" align="center">
<?if ($numBil>0) {
$div=0.001;
?>
<table class="bilan" width="575" border="1" cellspacing="1" cellpadding="1" style="border-collapse: collapse; border: 1px solid black">
<tr>
<td width="200" align="center"><b><font size="2">Mill&eacute;simes (en k<?=$tabBilan[0]['devise']?>)</font></b></td></td>
<td width="75" align="center"><b><font size="1" color="Gray"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[4]['DATE_CLOTURE'])?></i></font></b></td>
<td width="75" align="center"><b><font size="1" color="Gray"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[3]['DATE_CLOTURE'])?></i></font></b></td>
<td width="75" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[2]['DATE_CLOTURE'])?></i></font></b></td>
<td width="75" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[1]['DATE_CLOTURE'])?></i></font></b></td>
<td width="75" align="center"><b><font size="1"><i><?=WDate::dateT('Ymd', 'm/Y', $tabBilan[0]['DATE_CLOTURE'])?></i></font></b></td>
</tr>
<? // CA // ?>
<tr>
<td width="200" align="left"><b><font size="1">Chiffre d'affaires net (HT)</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[4]['FL']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[3]['FL']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[2]['FL']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[1]['FL']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[0]['FL']*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><font size="1">&nbsp;&nbsp;dont Exportation</font></td></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format(($tabBilan[4]['FL']-$tabBilan[4]['FJ'])*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format(($tabBilan[3]['FL']-$tabBilan[3]['FJ'])*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format(($tabBilan[2]['FL']-$tabBilan[2]['FJ'])*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format(($tabBilan[1]['FL']-$tabBilan[1]['FJ'])*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format(($tabBilan[0]['FL']-$tabBilan[0]['FJ'])*$div,null,null,' ')?></font></td>
</tr>
<? // ACHATS // ?>
<tr>
<td width="200" align="left"><b><font size="1">Achats et approvisionnements</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[4]['FS']+$tabBilan[4]['FU'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[3]['FS']+$tabBilan[3]['FU'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[2]['FS']+$tabBilan[2]['FU'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[1]['FS']+$tabBilan[1]['FU'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[0]['FS']+$tabBilan[0]['FU'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><font size="1">&nbsp;&nbsp;dont achats de marchandises</font></td></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format($tabBilan[4]['FS']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format($tabBilan[3]['FS']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[2]['FS']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[1]['FS']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[0]['FS']*$div,null,null,' ')?></font></td>
</tr>
<tr>
<td width="200" align="left"><font size="1">&nbsp;&nbsp;dont mati<74>res premi<6D>res et approv.</font></td></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format($tabBilan[4]['FU']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format($tabBilan[3]['FU']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[2]['FU']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[1]['FU']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[0]['FU']*$div,null,null,' ')?></font></td>
</tr>
<? // PRODUCTION // ?>
<tr>
<td width="200" align="left"><b><font size="1">Production de l'exercice</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[4]['FF']+$tabBilan[4]['FI']+$tabBilan[4]['FM']+$tabBilan[4]['FN'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[3]['FF']+$tabBilan[3]['FI']+$tabBilan[3]['FM']+$tabBilan[3]['FN'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[2]['FF']+$tabBilan[2]['FI']+$tabBilan[2]['FM']+$tabBilan[2]['FN'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[1]['FF']+$tabBilan[1]['FI']+$tabBilan[1]['FM']+$tabBilan[1]['FN'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[0]['FF']+$tabBilan[0]['FI']+$tabBilan[0]['FM']+$tabBilan[0]['FN'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">+ Marge commerciale</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[4]['FC']-$tabBilan[4]['FS']-$tabBilan[4]['FT'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[3]['FC']-$tabBilan[3]['FS']-$tabBilan[3]['FT'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[2]['FC']-$tabBilan[2]['FS']-$tabBilan[2]['FT'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[1]['FC']-$tabBilan[1]['FS']-$tabBilan[1]['FT'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[0]['FC']-$tabBilan[0]['FS']-$tabBilan[0]['FT'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">- Consommation de l'exercice</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[4]['FU']+$tabBilan[4]['FV']+$tabBilan[4]['FW'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[3]['FU']+$tabBilan[3]['FV']+$tabBilan[3]['FW'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[2]['FU']+$tabBilan[2]['FV']+$tabBilan[2]['FW'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[1]['FU']+$tabBilan[1]['FV']+$tabBilan[1]['FW'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[0]['FU']+$tabBilan[0]['FV']+$tabBilan[0]['FW'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><font size="1">&nbsp;&nbsp;dont achats et charges externes</font></td></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format($tabBilan[4]['FW']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format($tabBilan[3]['FW']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[2]['FW']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[1]['FW']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[0]['FW']*$div,null,null,' ')?></font></td>
</tr>
<? // VA // ?>
<tr>
<td width="200" align="left"><b><font size="1">Valeur ajout<75>e</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[4]['FL']+$tabBilan[4]['FM']+$tabBilan[4]['FN']-$tabBilan[4]['FS']-$tabBilan[4]['FT']-$tabBilan[4]['FU']-$tabBilan[4]['FV']-$tabBilan[4]['FW'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[3]['FL']+$tabBilan[3]['FM']+$tabBilan[3]['FN']-$tabBilan[3]['FS']-$tabBilan[3]['FT']-$tabBilan[3]['FU']-$tabBilan[3]['FV']-$tabBilan[3]['FW'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[2]['FL']+$tabBilan[2]['FM']+$tabBilan[2]['FN']-$tabBilan[2]['FS']-$tabBilan[2]['FT']-$tabBilan[2]['FU']-$tabBilan[2]['FV']-$tabBilan[2]['FW'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[1]['FL']+$tabBilan[1]['FM']+$tabBilan[1]['FN']-$tabBilan[1]['FS']-$tabBilan[1]['FT']-$tabBilan[1]['FU']-$tabBilan[1]['FV']-$tabBilan[1]['FW'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[0]['FL']+$tabBilan[0]['FM']+$tabBilan[0]['FN']-$tabBilan[0]['FS']-$tabBilan[0]['FT']-$tabBilan[0]['FU']-$tabBilan[0]['FV']-$tabBilan[0]['FW'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">- Charges de personnel</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[4]['FY']+$tabBilan[4]['FZ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[3]['FY']+$tabBilan[3]['FZ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[2]['FY']+$tabBilan[2]['FZ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[1]['FY']+$tabBilan[1]['FZ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[0]['FY']+$tabBilan[0]['FZ'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">- Imp<6D>ts, taxes et vers. assimil<69>s</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-$tabBilan[4]['FX']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-$tabBilan[3]['FX']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-$tabBilan[2]['FX']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-$tabBilan[1]['FX']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-$tabBilan[0]['FX']*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">+ Subventions d'exploitation</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[4]['FO']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[3]['FO']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[2]['FO']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[1]['FO']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[0]['FO']*$div,null,null,' ')?></font></b></td>
</tr>
<? // EBE // ?>
<tr>
<td width="200" align="left"><b><font size="1">Exc<78>dent Brut d'Exploitation</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[4]['FL']+$tabBilan[4]['FM']+$tabBilan[4]['FN']+$tabBilan[4]['FO']-$tabBilan[4]['FS']-$tabBilan[4]['FT']-$tabBilan[4]['FU']-$tabBilan[4]['FV']-$tabBilan[4]['FW']-$tabBilan[4]['FX']-$tabBilan[4]['FY']-$tabBilan[4]['FZ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[3]['FL']+$tabBilan[3]['FM']+$tabBilan[3]['FN']+$tabBilan[3]['FO']-$tabBilan[3]['FS']-$tabBilan[3]['FT']-$tabBilan[3]['FU']-$tabBilan[3]['FV']-$tabBilan[3]['FW']-$tabBilan[3]['FX']-$tabBilan[3]['FY']-$tabBilan[3]['FZ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[2]['FL']+$tabBilan[2]['FM']+$tabBilan[2]['FN']+$tabBilan[2]['FO']-$tabBilan[2]['FS']-$tabBilan[2]['FT']-$tabBilan[2]['FU']-$tabBilan[2]['FV']-$tabBilan[2]['FW']-$tabBilan[2]['FX']-$tabBilan[2]['FY']-$tabBilan[2]['FZ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[1]['FL']+$tabBilan[1]['FM']+$tabBilan[1]['FN']+$tabBilan[1]['FO']-$tabBilan[1]['FS']-$tabBilan[1]['FT']-$tabBilan[1]['FU']-$tabBilan[1]['FV']-$tabBilan[1]['FW']-$tabBilan[1]['FX']-$tabBilan[1]['FY']-$tabBilan[1]['FZ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[0]['FL']+$tabBilan[0]['FM']+$tabBilan[0]['FN']+$tabBilan[0]['FO']-$tabBilan[0]['FS']-$tabBilan[0]['FT']-$tabBilan[0]['FU']-$tabBilan[0]['FV']-$tabBilan[0]['FW']-$tabBilan[0]['FX']-$tabBilan[0]['FY']-$tabBilan[0]['FZ'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">+ Autres Produits, charges et reprises</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[4]['FP']+$tabBilan[4]['FQ']-$tabBilan[4]['GE'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[3]['FP']+$tabBilan[3]['FQ']-$tabBilan[3]['GE'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[2]['FP']+$tabBilan[2]['FQ']-$tabBilan[2]['GE'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[1]['FP']+$tabBilan[1]['FQ']-$tabBilan[1]['GE'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[0]['FP']+$tabBilan[0]['FQ']-$tabBilan[0]['GE'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">- Dot. d'exploItation (amor. et prov.)</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[4]['GA']+$tabBilan[4]['GB']+$tabBilan[4]['GC']+$tabBilan[4]['GD'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[3]['GA']+$tabBilan[3]['GB']+$tabBilan[3]['GC']+$tabBilan[3]['GD'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[2]['GA']+$tabBilan[2]['GB']+$tabBilan[2]['GC']+$tabBilan[2]['GD'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[1]['GA']+$tabBilan[1]['GB']+$tabBilan[1]['GC']+$tabBilan[1]['GD'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[0]['GA']+$tabBilan[0]['GB']+$tabBilan[0]['GC']+$tabBilan[0]['GD'])*$div,null,null,' ')?></font></b></td>
</tr>
<? // RESULTAT EXPLOITATION // ?>
<tr>
<td width="200" align="left"><b><font size="1">R<>sultat d'exploitation</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[4]['GG']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[3]['GG']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[2]['GG']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[1]['GG']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[0]['GG']*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">+ Op<4F>rations en commun</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[4]['GH']-$tabBilan[4]['GI'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(($tabBilan[3]['GH']-$tabBilan[3]['GI'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[2]['GH']-$tabBilan[2]['GI'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[1]['GH']-$tabBilan[1]['GI'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(($tabBilan[0]['GH']-$tabBilan[0]['GI'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">+ Produits financiers</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[4]['GP']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[3]['GP']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[2]['GP']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[1]['GP']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[0]['GP']*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">- Charges financi<63>res</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[4]['GU'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[3]['GU'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[2]['GU'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[1]['GU'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[0]['GU'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><font size="1">&nbsp;&nbsp;dont int<6E>r<EFBFBD>ts et charges assimil<69>es</font></td></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format($tabBilan[4]['GR']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1" color="Gray"><?=number_format($tabBilan[3]['GR']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[2]['GR']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[1]['GR']*$div,null,null,' ')?></font></td>
<td width="75" align="right"><font size="1"><?=number_format($tabBilan[0]['GR']*$div,null,null,' ')?></font></td>
</tr>
<? // RESULTAT COURANT AVT IMPOTS // ?>
<tr>
<td width="200" align="left"><b><font size="1">R<>sultat Courant Avant Imp<6D>ts</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[4]['GW']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[3]['GW']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[2]['GW']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[1]['GW']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[0]['GW']*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">+ Produits exceptionnels</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[4]['HD']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[3]['HD']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[2]['HD']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[1]['HD']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[0]['HD']*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">- Charges exceptionnelles</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[4]['HH'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[3]['HH'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[2]['HH'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[1]['HH'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[0]['HH'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">- Participation des salari<72>s</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[4]['HJ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[3]['HJ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[2]['HJ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[1]['HJ'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[0]['HJ'])*$div,null,null,' ')?></font></b></td>
</tr>
<tr>
<td width="200" align="left"><b><font size="1">- Imp<6D>t sur le b<>n<EFBFBD>fice</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[4]['HK'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format(-($tabBilan[3]['HK'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[2]['HK'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[1]['HK'])*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format(-($tabBilan[0]['HK'])*$div,null,null,' ')?></font></b></td>
</tr>
<? // BENEFICE OU PERTE // ?>
<tr>
<td width="200" align="left"><b><font size="1">R<>sultat (B<>n<EFBFBD>fice ou Perte)</font></b></td></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[4]['HN']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1" color="Gray"><?=number_format($tabBilan[3]['HN']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[2]['HN']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[1]['HN']*$div,null,null,' ')?></font></b></td>
<td width="75" align="right"><b><font size="1"><?=number_format($tabBilan[0]['HN']*$div,null,null,' ')?></font></b></td>
</tr>
<?
$pie=array( $tabBilan[0]['HN']/1000,
($tabBilan[0]['HK']+$tabBilan[0]['HJ'])/1000,
($tabBilan[0]['HH']-$tabBilan[0]['HD'])/1000,
(-$tabBilan[0]['GH']+$tabBilan[0]['GI']-$tabBilan[0]['GP']+
$tabBilan[0]['GU'])/1000,
(-$tabBilan[0]['FQ']+$tabBilan[0]['GE']+$tabBilan[0]['GA']+$tabBilan[0]['GB']+$tabBilan[0]['GC']+$tabBilan[0]['GD']
-$tabBilan[0]['FP'])/1000,
($tabBilan[0]['FY']+$tabBilan[0]['FZ']+$tabBilan[0]['FX']-$tabBilan[0]['FO'])/1000,
($tabBilan[0]['FW'])/1000,
($tabBilan[0]['FS']+$tabBilan[0]['FU'])/1000,
);
?>
<tr>
<td width="575" align="center" colspan="6"><img src="./graphs/pie.php?w=575&h=210&t=c&r=80&y=80&d=<?=urlencode(serialize($pie))?>" width="575" height="210"/></td>
</tr>
</table>
</tr>
</table>
<? } ?>
</td>
</tr>
<? } ?>
<tr>
</table><?/*?>
<br>
<hr/>
<u>$tabBilans :</u>
<pre>
<?print_r($tabBilans);?>
</pre>
<hr/>
<u>$tabBilan :</u>
<pre>
<?print_r($tabBilan)?>
</pre>
<?
*/
?>