1643 lines
43 KiB
PHP
1643 lines
43 KiB
PHP
<?php
|
||
//Traitement des paramètres
|
||
if (!page_checkParams()) die('Paramètres incorrects !');
|
||
|
||
$niveau = isset($_REQUEST['niveau']) ? $_REQUEST['niveau'] : '';
|
||
?>
|
||
<div id="center">
|
||
<?php
|
||
require_once 'utils.php';
|
||
require_once 'common/dates.php';
|
||
require_once 'cache/cache.php';
|
||
require_once 'logos/logos.php';
|
||
require_once 'scoresws/scoresws.php';
|
||
require_once 'scoresws/identite.php';
|
||
//=> BLOC IDENTITE
|
||
$etab = scoresws_identite($siret, $siren, $idEntreprise);
|
||
?>
|
||
<h1>RAPPORT COMPLET</h1>
|
||
|
||
<p id="rsynthese">SOCIÉTÉ : <?=$etab['Nom']?></p>
|
||
<?php
|
||
require_once 'identite/content.php';
|
||
//=> FIN BLOC IDENTITE
|
||
|
||
//=> BLOC ANNONCES
|
||
require_once 'cache/cache.php';
|
||
require_once 'partenaires/classMTva.php';
|
||
require_once 'partenaires/classMMap.php';
|
||
require_once 'partenaires/classMCoface.php';
|
||
require_once 'common/dates.php';
|
||
require_once 'scoresws/scoresws.php';
|
||
|
||
//Récupération des infos du webservice
|
||
$annonces = scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan);
|
||
|
||
?>
|
||
<h1 class="titre page">ANNONCES LÉGALES</h1>
|
||
<?php
|
||
if (count($annonces)>0)
|
||
{
|
||
//Tri des annonces dans des tableaux différents
|
||
$annoncesBodacc = array();
|
||
$annoncesBalo = array();
|
||
$annoncesAsso = array();
|
||
foreach ($annonces as $i => $ann) {
|
||
if ($ann['BodaccCode']=='BODA' || $ann['BodaccCode']=='BODB' || $ann['BodaccCode']=='BODC') {
|
||
$annoncesBodacc[] = $ann;
|
||
}elseif ($ann['BodaccCode']=='BALO') {
|
||
$annoncesBalo[] = $ann;
|
||
}elseif ($ann['BodaccCode']=='ASSO') {
|
||
$annoncesAsso[] = $ann;
|
||
}else {
|
||
$annoncesBodacc[] = $ann;
|
||
}
|
||
}
|
||
// Affichage de la liste des annonces
|
||
//Affiche annonces Bodacc
|
||
if (count($annoncesBodacc)>0)
|
||
{
|
||
?>
|
||
<h2>EVÉNEMENTS LÉGAUX</h2>
|
||
<table>
|
||
<?php
|
||
foreach($annoncesBodacc as $i => $ann)
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="140" class="StyleInfoLib">
|
||
<span id="annoncesDate"><p>Le <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution']);?></p></span>
|
||
<span id="annoncesImg">
|
||
<?php
|
||
$tabSource=explode('-', $ann['BodaccCode']);
|
||
$source=$tabSource[0];
|
||
$idSource=@$tabSource[1];
|
||
if ($source[0] == 'B'){
|
||
print '<img src="./img/logo_jo.png" title="Source BODACC '.$ann['BodaccNum'].' '.substr($source,-1).' '.substr($ann['DateParution'],0,4).'"/>';
|
||
}elseif ($source[0] == 'G' || $source[0] == 'T'){
|
||
print '<img src="./img/logo_greffe.png" title="Source Collecte Greffe"/>';
|
||
}elseif ($source[0] == 'P'){
|
||
print '<img src="./img/logo_inpi.png" title="Source Collecte RNCS"/>';
|
||
}else{
|
||
print '<img src="./img/logo_jal.png" title="Source Collecte JAL';
|
||
if ($idSource>0) print ' $idSource';
|
||
print '"/>';
|
||
}
|
||
?>
|
||
</span>
|
||
</td>
|
||
<td width="450" colspan="2" class="StyleInfoData">
|
||
<a href="/?page=annonces&siret=<?=$siret?>&idan=<?=$ann['id']?>&vue=bodacc">
|
||
<?php
|
||
foreach ($ann['evenements'] as $i=>$even) {
|
||
print $even['LibEven'];
|
||
$numEven=$even['CodeEven']*1;
|
||
if ($numEven>3000 && $numEven<3999) print ' (clôture au '.WDate::dateT('Y-m-d','d/m/Y',$ann['dateEffet']).')';
|
||
print '<br/>';
|
||
}
|
||
?>
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
</table>
|
||
<?php
|
||
}
|
||
|
||
//Affiche annonces Balo
|
||
if (count($annoncesBalo)>0)
|
||
{
|
||
?>
|
||
<h2>BALO</h2>
|
||
<table>
|
||
<?php
|
||
foreach($annoncesBalo as $i => $ann){?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="140" class="StyleInfoLib">
|
||
<span id="annoncesDate">Le <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution']);?></span>
|
||
<span id="annoncesImg">
|
||
<?php
|
||
if ($ann['BodaccCode'] == 'BALO'){
|
||
print '<img src="./img/logo_jo.png" title="Source BALO n°'.$ann['BodaccNum'].'"/>';
|
||
}
|
||
?>
|
||
</span>
|
||
</td>
|
||
<td width="450" colspan="2" class="StyleInfoData">
|
||
<a href="/?page=annonces&siret=<?=$siret?>&idan=<?=$ann['id']?>&vue=balo">
|
||
<?php
|
||
foreach ($ann['evenements'] as $i=>$even) {
|
||
print $even['LibEven'];
|
||
$numEven=$even['CodeEven']*1;
|
||
if ($numEven>3000 && $numEven<3999) print ' (clôture au '.WDate::dateT('Y-m-d','d/m/Y',$ann['dateEffet']).')';
|
||
print '<br/>';
|
||
}
|
||
?>
|
||
</a></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
</table>
|
||
<?php
|
||
}
|
||
|
||
//Affiche annonces Asso
|
||
if (count($annoncesAsso)>0)
|
||
{
|
||
?>
|
||
<h2>Associations</h2>
|
||
<table>
|
||
<?php
|
||
foreach($annoncesAsso as $i => $ann){ ?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="140" class="StyleInfoLib">
|
||
<span id="annoncesDate">Le <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution']);?></span>
|
||
<span id="annoncesImg">
|
||
<?php
|
||
if ($ann['BodaccCode'] == 'ASSO'){
|
||
print '<img src="./img/logo_jo.png" title="Source JO ASSOCIATION n°'.$ann['BodaccNum'].'"/>';
|
||
}
|
||
?>
|
||
</span>
|
||
</td>
|
||
<td width="450" colspan="2" class="StyleInfoData">
|
||
<a href="/?page=annonces&siret=<?=$siret?>&idan=<?=$ann['id']?>&vue=asso">
|
||
<?php
|
||
foreach ($ann['evenements'] as $i=>$even) {
|
||
print $even['LibEven'];
|
||
$numEven=$even['CodeEven']*1;
|
||
if ($numEven>3000 && $numEven<3999) print ' (clôture au '.WDate::dateT('Y-m-d','d/m/Y',$ann['dateEffet']).')';
|
||
print '<br/>';
|
||
}
|
||
?>
|
||
</a></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
</table>
|
||
<?php
|
||
}
|
||
}
|
||
else
|
||
{
|
||
// Aucune annonce bodacc pour cette entreprise
|
||
?>
|
||
<h2>Evénements légaux</h2>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="100" class="StyleInfoLib"> </td>
|
||
<td width="450" colspan="2" class="StyleInfoData">Néant</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="4"> </td>
|
||
</tr>
|
||
</table>
|
||
<?php
|
||
}
|
||
//=> FIN BLOC ANNONCES
|
||
|
||
//=> BLOC DIRIGEANTS
|
||
require_once 'partenaires/classMTva.php';
|
||
require_once 'partenaires/classMMap.php';
|
||
require_once 'common/dates.php';
|
||
require_once 'cache/cache.php';
|
||
require_once 'scoresws/scoresws.php';
|
||
|
||
$dirs = scoresws_dirigeants($siret, $siren, $idEntreprise);
|
||
?>
|
||
<h1 class="page">DIRIGEANTS</h1>
|
||
<h2>Liste des dirigeants actifs</h2>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td colspan="2" width="540" class="StyleInfoData">
|
||
<table>
|
||
<?php
|
||
if (count($dirs)>0)
|
||
{
|
||
foreach ($dirs as $i=>$dir)
|
||
{
|
||
$societe = str_replace('&#160;',' ', $dir['Societe']);
|
||
$nom = str_replace('&#160;',' ', $dir['Societe'].' '.$dir['Nom'].' '.$dir['Prenom']);
|
||
if(isset($dir['Civilite']) && $dir['Civilite']!=''){$nom = $dir['Civilite'].'. '.$nom;}
|
||
?>
|
||
<tr>
|
||
<td class="StyleInfoData" width="120"><?php print $dir['Titre'];?></td>
|
||
<td class="StyleInfoData" width="200">
|
||
<?php
|
||
if($societe != ''){
|
||
?>
|
||
<a href="/?page=recherche&vue=list&formR[type]=ent&formR[raisonSociale]=<?php print $societe;?>" title="Recherche à partir de la raison sociale">
|
||
<?php print $societe;?>
|
||
</a>
|
||
<?php
|
||
}
|
||
?>
|
||
|
||
<?php
|
||
if($nom != ''){
|
||
?>
|
||
<a href="/?page=recherche&vue=list&formR[type]=dir&formR[dirNom]=<?php print $dir['Nom'];?>&formR[dirPrenom]=<?php print $dir['Prenom'];?>&formR[dirDateNaissJJ]=<?php print substr($dir['NaissDate'],0,2);?>&formR[dirDateNaissMM]=<?php print substr($dir['NaissDate'],3,2);?>&formR[dirDateNaissAAAA]=<?php print substr($dir['NaissDate'],6,4);?>" title="Recherche à partir du nom du dirigeant">
|
||
<?php print $nom;?>
|
||
</a>
|
||
<?php
|
||
}
|
||
?>
|
||
</td>
|
||
<td class="StyleInfoData" width="230"><?
|
||
if (trim($dir['NaissDate'])<>'' && trim($dir['NaissVille'].' '.$dir['NaissDepPays'])<>'') {
|
||
echo 'né(e) le '.$dir['NaissDate'].' à '.$dir['NaissVille'];
|
||
if (trim($dir['NaissDepPays'])<>'')
|
||
echo ' ('.$dir['NaissDepPays'].')';
|
||
} elseif (trim($dir['NaissDate'])<>'') {
|
||
echo 'né(e) le '.$dir['NaissDate'];
|
||
} elseif (trim($dir['NaissVille'].' '.$dir['NaissDepPays'])<>'') {
|
||
echo 'né(e) à '.$dir['NaissVille'];
|
||
echo ' ('.$dir['NaissDepPays'].')';
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?
|
||
}
|
||
}
|
||
else
|
||
{
|
||
echo '<tr><td class="StyleInfoData" width="550"> Aucune donnée n\'est présente dans notre base</td></tr>';
|
||
}
|
||
?>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<?php
|
||
//=> FIN BLOC DIRIGEANTS
|
||
|
||
//=> BLOC LIENS
|
||
//=> FIN BLOC LIENS
|
||
|
||
//=> BLOC SYNTHESE
|
||
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
|
||
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
|
||
|
||
require_once 'cache/cache.php';
|
||
require_once 'ratios/ratios.php';
|
||
require_once 'scoresws/scoresws.php';
|
||
|
||
$result = scoresws_ratios($siret, $siren, $idEntreprise);
|
||
$bilansInfos = $result['bilansInfos'];
|
||
$ratiosInfos = $result['ratiosInfos'];
|
||
$ratiosEntrep = $result['ratiosEntrep'];
|
||
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
|
||
$ratiosSecteur = $result['ratiosSecteur'];
|
||
$dataActif = $result['dataActif'];
|
||
$dataPassif = $result['dataPassif'];
|
||
$dataSIG = $result['dataSIG'];
|
||
|
||
//FB::log($bilansInfos, 'bilansInfos');
|
||
//FB::log($ratiosSecteur, 'ratiosSecteur');
|
||
|
||
list($typeBilan, $numBilan) = countBilans($bilansInfos, $typeBilan);
|
||
$numBilanN = $numBilan['N'];
|
||
$numBilanC = $numBilan['C'];
|
||
$numBilanB = $numBilan['B'];
|
||
$numBilanA = $numBilan['A'];
|
||
list($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol,
|
||
$ratiosSecteur, $dataActif, $dataPassif, $dataSIG) =
|
||
filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol,
|
||
$ratiosSecteur, $dataActif, $dataPassif, $dataSIG, $typeBilan);
|
||
$nbrAnnees = count($bilansInfos)-1;
|
||
$data = synthese_datagraph($bilansInfos, $ratiosEntrep, $ratio);
|
||
$dataGraph = $data['graph'];
|
||
$dataEvol = $data['evol'];
|
||
?>
|
||
<h1 class="page">SYNTHÈSE</h1>
|
||
|
||
<table border="0" align="left">
|
||
<?php
|
||
if ( $numBilanN>0 || $numBilanC>0 )
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||
<td width="340" class="StyleInfoData">
|
||
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=N" <?=($typeBilan=='N')? 'checked' : '';?>/><label>Réel normal ou Simplifié</label><?php }?>
|
||
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
|
||
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
|
||
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
</table>
|
||
<?php
|
||
if ($numBilanN==0 && $numBilanC==0 && $numBilanB==0 && $numBilanA==0)
|
||
{
|
||
?>
|
||
<table>
|
||
<tr><td width="30"> </td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
||
</table>
|
||
<?php
|
||
}
|
||
elseif($numBilanN==0 && $numBilanC==0 && ($numBilanB>0 || $numBilanA>0) )
|
||
{
|
||
?>
|
||
<table>
|
||
<tr><td width="30"> </td><td><b>Bilan de banque/assurance non gérés</b></td></tr>
|
||
</table>
|
||
<?php
|
||
}
|
||
else
|
||
{
|
||
?>
|
||
<table id="synthese">
|
||
<thead>
|
||
<tr>
|
||
<th align="center"><?php if($ratio!=''){?><a href="/?page=synthese&siret=<?=$_REQUEST['siret']?>&idEntreprise=<?=$_REQUEST['idEntreprise']?>" title="Retour à la page complète"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a><?php } ?></th>
|
||
<th class="date"><?php print synthese_formatdateCloture($bilansInfos, 2); ?></th>
|
||
<th class="date"><?php print synthese_formatdateCloture($bilansInfos, 1); ?></th>
|
||
<th class="date">Evolution</th>
|
||
<th class="date"><?php print synthese_formatdateCloture($bilansInfos, 0); ?></th>
|
||
<th class="date">Evolution</th>
|
||
<th> </th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php
|
||
//TODO : Afficher ligne par ligne les éléments
|
||
print synthese_tablerow($ratiosInfos, $dataEvol, $ratio);
|
||
?>
|
||
</tbody>
|
||
</table>
|
||
<br/>
|
||
<?php
|
||
//Affichage du graphique associé au ratio sélectionné
|
||
if(count($tabRatio)==1){ ?>
|
||
<div id="titreEvol"><b>Evolution</b></div>
|
||
<?php
|
||
|
||
if( ($siret*1)==0 || ($siren*1)<100 ){ $fileName = 'synthese-'.$idEntreprise;}
|
||
else{ $fileName = 'synthese-'.$siret; }
|
||
if($ratio!=''){ $fileName.='-'.$ratio; }
|
||
if(count($dataEvol[$ratio])<=1){
|
||
print "Les informations sont insuffisantes pour générer la courbe d'évolution";
|
||
}else{?>
|
||
<img id="imgEvol" src="./imgcache/<?=$fileName.'.png'?>" />
|
||
<?php
|
||
}
|
||
//Affichage du graphique général
|
||
}else{
|
||
if(count($dataGraph)<=1){
|
||
print '<div id="graphInfo">Les informations sont insuffisantes pour générer le graphique de synthèse</div>';
|
||
}else{
|
||
print synthese_graph_linecompare($dataGraph);
|
||
}
|
||
}
|
||
?>
|
||
<br/><br/>
|
||
<?php
|
||
}
|
||
//=> FIN BLOC SYNTHESE
|
||
|
||
//=> BLOC BILANS
|
||
?>
|
||
<h1 class="page">ÉLÉMENTS FINANCIERS - BILANS</h1>
|
||
<table>
|
||
<?php
|
||
if ( $numBilanN>0 || $numBilanC>0 )
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||
<td width="340" class="StyleInfoData">
|
||
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=N" <?=($typeBilan=='N')? 'checked' : '';?>/><label>Réel normal ou Simplifié</label><?php }?>
|
||
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
|
||
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
|
||
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
</table>
|
||
|
||
<?php
|
||
if ($numBilanN==0 && $numBilanC==0 && $numBilanB==0 && $numBilanA==0)
|
||
{
|
||
?>
|
||
<table>
|
||
<tr><td width="30"> </td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
||
</table>
|
||
<?php
|
||
}
|
||
elseif($numBilanN==0 && $numBilanC==0 && ($numBilanB>0 || $numBilanA>0) )
|
||
{
|
||
?>
|
||
<table>
|
||
<tr><td width="30"> </td><td><b>Bilan de banque/assurance non gérés</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> </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 page">
|
||
<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é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>±</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
|
||
}
|
||
//=> FIN BLOC BILANS
|
||
|
||
//=> BLOC RATIOS
|
||
isset($_REQUEST['mil']) ? $mil=$_REQUEST['mil'] : $mil='' ;
|
||
|
||
//On détermine le bilan sélectionné
|
||
if($mil=='')
|
||
{
|
||
$bilan = 0;
|
||
$mil = $bilansInfos[$bilan]['typeBilan'].substr($bilansInfos[$bilan]['dateCloture'],6,2).substr($bilansInfos[$bilan]['dateCloture'],4,2).substr($bilansInfos[$bilan]['dateCloture'],0,4);
|
||
}
|
||
else
|
||
{
|
||
if(count($bilansInfos)>0)
|
||
{
|
||
$countBilans = 0;
|
||
foreach($bilansInfos as $bilanItem)
|
||
{
|
||
$millesime = $bilanItem['typeBilan'].substr($bilanItem['dateCloture'],6,2).substr($bilanItem['dateCloture'],4,2).substr($bilanItem['dateCloture'],0,4);
|
||
if($mil==$millesime)
|
||
{
|
||
$bilan = $countBilans;
|
||
break;
|
||
}
|
||
$countBilans++;
|
||
}
|
||
}
|
||
}
|
||
|
||
?>
|
||
<h1 class="titre page">RATIOS</h1>
|
||
<?php
|
||
if (count($bilansInfos)==0)
|
||
{
|
||
?>
|
||
<table>
|
||
<tr><td width="30"> </td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
||
</table>
|
||
<?php
|
||
}
|
||
else
|
||
{
|
||
?>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Secteur d'activité :</td>
|
||
<td width="340" class="StyleInfoData">
|
||
<?=$_SESSION['tabInfo']['entrep']['nafEn']?> - <?=$_SESSION['tabInfo']['entrep']['nafEnLib']?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
if ( $numBilanN>0 || $numBilanC>0 )
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||
<td width="340" class="StyleInfoData">
|
||
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=N" <?=($typeBilan=='N')? 'checked' : '';?>/><label>Réel normal ou Simplifié</label><?php }?>
|
||
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
|
||
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
|
||
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Millésime</td>
|
||
<td width="340" class="StyleInfoData">
|
||
<form name="selectBilan" method="post" action="index.php?<?=$_SERVER['QUERY_STRING'];?>">
|
||
<select name="mil">
|
||
<?php
|
||
if(count($bilansInfos)>0)
|
||
{
|
||
$countBilans = 0;
|
||
foreach($bilansInfos as $bilanItem)
|
||
{
|
||
if($countBilans>=5){ break; }
|
||
$millesime = '';
|
||
if(isset($bilanItem['dateCloture']))
|
||
{
|
||
$annee = substr($bilanItem['dateCloture'],6,2).substr($bilanItem['dateCloture'],4,2).substr($bilanItem['dateCloture'],0,4);
|
||
$millesime = $bilanItem['typeBilan'].$annee;
|
||
?>
|
||
<option value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&mil=<?=$millesime?>"<?php if($mil==$millesime){ print 'selected="selected"';} ?>>
|
||
<?=substr($bilanItem['dateCloture'],6,2).'/'.substr($bilanItem['dateCloture'],4,2).'/'.substr($bilanItem['dateCloture'],0,4);?>
|
||
<?php
|
||
if( isset($typBil[$bilanItem['typeBilan']]) &&
|
||
( isset($typBil[$bilanItem['typeBilan']])!='N' ||
|
||
isset($typBil[$bilanItem['typeBilan']])!='') )
|
||
{
|
||
?>
|
||
<?=$typBil[$bilanItem['typeBilan']]?>
|
||
<?php
|
||
}
|
||
?>
|
||
</option>
|
||
<?php
|
||
$countBilans++;
|
||
}
|
||
}
|
||
}else{ print '-'; }
|
||
?>
|
||
</select>
|
||
</form>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Durée du bilan</td>
|
||
<td width="340" class="StyleInfoData">
|
||
<?php
|
||
if(isset($bilansInfos[$bilan]['dateCloture']))
|
||
{
|
||
print $bilansInfos[$bilan]['duree']; ?> mois
|
||
<?php
|
||
}else{ print '-'; }
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
if($ratio!=''){
|
||
?>
|
||
<tr>
|
||
<td colspan="3"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Retour à la page complète</td>
|
||
<td width="340" class="StyleInfoData"><a href="/?page=ratios&siret=<?=$_REQUEST['siret']?>&idEntreprise=<?=$_REQUEST['idEntreprise']?>" title="Retour à la page complète"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
</table>
|
||
<div class="blockh2">
|
||
<table id="ratios">
|
||
<tbody>
|
||
<?php print ratios_tablerow($ratiosInfos, $bilan, $ratio);?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<?php
|
||
}
|
||
?>
|
||
<br/>
|
||
<?php
|
||
//Affichage du graphique associé au ratio sélectionné
|
||
if($ratio!=''){
|
||
$data = dGraph($ratio, $bilan);
|
||
?>
|
||
<div id="titreEvol"><b>Evolution</b></div>
|
||
<?php
|
||
if(count($data['data'])<=1){
|
||
print "Les informations sont insuffisantes pour générer la courbe d'évolution";
|
||
}else{
|
||
$image = ratios_graph('', $data, $fileName);
|
||
?>
|
||
<img id="imgEvol" src="./imgcache/<?=$image;?>" />
|
||
<?php
|
||
}
|
||
}
|
||
//=> FIN BLOC RATIOS
|
||
|
||
function formatPct($pct) {
|
||
$pct=round($pct/10,0)*10;
|
||
if ($pct==0) $pct=10;
|
||
return $pct;
|
||
}
|
||
|
||
require_once 'cache/cache.php';
|
||
require_once 'partenaires/classMTva.php';
|
||
require_once 'partenaires/classMMap.php';
|
||
require_once 'partenaires/classMCoface.php';
|
||
require_once 'common/dates.php';
|
||
require_once 'scoresws/scoresws.php';
|
||
|
||
$tabInfo = $_SESSION['tabInfo'];
|
||
|
||
$etab = scoresws_indiscore($siret, $siren, $idEntreprise, $niveau);
|
||
$tabCommentaires = $etab['tabCommentaires'];
|
||
$tabProjection = $etab['tabVariables'];
|
||
FB::log($tabProjection, 'tabProjection');
|
||
//=> BLOC COMMENTAIRES
|
||
?>
|
||
<h1 class="page">COMMENTAIRES</h1>
|
||
<br/>
|
||
<div class="blockh2" id="commentaires">
|
||
<?php
|
||
require_once 'commentaires/commentaires.php';
|
||
$graphCouleurs = array();
|
||
$couleurs = array();
|
||
if(count($tabCommentaires)>0){
|
||
$totalLigne = count($tabCommentaires);
|
||
$currentLigne = 0;
|
||
$inH = 0;
|
||
$inTable = false;
|
||
foreach($tabCommentaires as $key => $commentaires){
|
||
//FB::log($commentaires, 'T');
|
||
$output = '';
|
||
$ligne = true;
|
||
$currentLigne++;
|
||
if(!is_array($commentaires) && !empty($commentaires)){
|
||
//Traitement préalable des lignes
|
||
$commentaires = html_entity_decode($commentaires,
|
||
ENT_COMPAT,'utf-8');
|
||
//Traitement des balises siren
|
||
$commentaires = commentaires_siren($commentaires);
|
||
//Traitement des balises lien
|
||
$commentaires = commentaires_lien($commentaires);
|
||
//Traitement des balises li+, li-, li:, li
|
||
$commentaires = commentaires_liste($commentaires);
|
||
//Traitement des images
|
||
$commentaires = commentaires_image($commentaires);
|
||
//Récupération des couleurs pour les graphiques
|
||
$couleurs = commentaires_graphique_couleur($commentaires);
|
||
if (count($couleurs)>0){
|
||
$graphCouleurs = $couleurs;
|
||
$commentaires = preg_replace('/COULEUR\([^\)]*\)/', '', $commentaires);
|
||
$couleurs = array();
|
||
}
|
||
//Traitement des graphiques
|
||
$commentaires = commentaires_graphique($commentaires);
|
||
|
||
//Traitement pour bloc texte
|
||
if (preg_match('/(.*?)\<h([0-9]{1})\>(.*?)\<\/h[0-9]{1}\>/', $commentaires, $matches)){
|
||
//Fermeture
|
||
if ($inH>0){
|
||
$commentaires = $matches[1].'</div><h'.$matches[2].'>'.$matches[3].'</h'.$matches[2].'>';
|
||
}
|
||
//Ouverture
|
||
$commentaires = $commentaires.'<div class="texth'.$matches[2].'">';
|
||
$inH++;
|
||
$ligne = false;
|
||
}
|
||
//Fermeture dernier div
|
||
if ($currentLigne == $totalLigne){
|
||
$commentaires = $commentaires.'</div>';
|
||
}
|
||
|
||
//Traitement pour fin bloc texte;
|
||
$output.= $commentaires."\n";
|
||
|
||
//Détection des début et fin de tableau
|
||
if ( preg_match('/<(table)/i', $commentaires) ){
|
||
$inTable = true;
|
||
}
|
||
if ( preg_match('/<\/(table)>/i', $commentaires) ){
|
||
$inTable = false;
|
||
}
|
||
//Nouvelle ligne
|
||
|
||
if($inTable){ $ligne = false;}
|
||
if($ligne){ $output.= '<br/>'; }
|
||
echo $output;
|
||
}
|
||
}
|
||
}
|
||
//=> FIN BLOC COMMENTAIRES
|
||
?>
|
||
</div>
|
||
<?php
|
||
//=> BLOC INDISCORE (evaluation conclusion)
|
||
?>
|
||
<br/>
|
||
<h1 class="titre page">INDISCORE©</h1>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||
<td width="340" class="StyleInfoData"><?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3)?></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Numéro identifiant Siret du siège</td>
|
||
<td width="340" class="StyleInfoData"><?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).' '.substr($etab['Siret'],-5)?></td>
|
||
</tr>
|
||
<? if ($etab['NumRC']*1<>0) { ?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||
<td width="340" class="StyleInfoData"><?=$etab['NumRC']?></td>
|
||
</tr>
|
||
<? } ?>
|
||
<tr><td colspan="3"> </td></tr>
|
||
</table>
|
||
|
||
<h2>Raison sociale & coordonnées</h2>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||
<td width="340" class="StyleInfoData"><?=$etab['Nom'];
|
||
if ($etab['Nom2']<>'') echo '<br/>'.$etab['Nom2'];?></td>
|
||
</tr>
|
||
<?
|
||
if ($etab['Enseigne']<>'' && $etab['Sigle']<>'') { $titre='Enseigne / Sigle'; $lib=$etab['Enseigne'].' / '.$etab['Sigle']; }
|
||
elseif ($etab['Enseigne']<>'' && $etab['Sigle']=='') { $titre='Enseigne'; $lib=$etab['Enseigne']; }
|
||
elseif ($etab['Enseigne']=='' && $etab['Sigle']<>'') { $titre='Sigle'; $lib=$etab['Sigle']; }
|
||
else $titre='';
|
||
if ($titre<>'') {
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib"><?=$titre?></td>
|
||
<td width="340" class="StyleInfoData"><?=$lib?></td>
|
||
</tr><? } ?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||
<td width="340" class="StyleInfoData"><?=$etab['FJ_lib'];//@todo INSEE //.' ('.$etab['FJ']?></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Date de création de l'entreprise</td>
|
||
<td width="340" class="StyleInfoData"><? $dateCreation=str_replace('-','',$etab['DateCreaEn']);
|
||
echo WDate::dateT('Ymd', 'm/Y', $dateCreation);?></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||
<td width="340" class="StyleInfoData"><?=$etab['Adresse']?><br/>
|
||
<? if ($etab['Adresse2']<>'') echo $etab['Adresse2'].'<br/>';?>
|
||
<?=$etab['CP']?> <?=$etab['Ville']?></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||
<td width="340" class="StyleInfoData"><?=$etab['Tel']?></td>
|
||
</tr>
|
||
<tr><td colspan="3"> </td></tr>
|
||
</table>
|
||
|
||
<h2>Évaluation</h2>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="540" colspan="2" class="StyleInfoData">L'évaluation indiScore© est en partie basée sur les points notables suivants :<br/>
|
||
<h3><u>Conformité légale :</u></h3>
|
||
<div class="stats gradiant_pic">
|
||
<ul>
|
||
<li>
|
||
<i><?=$etab['AnalyseConfor']?></i>
|
||
<div class="blocdegrade clearfix">
|
||
<span class="textdegrade">Conformité</span>
|
||
<div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-<?=formatPct($etab['ScoreConfor'])?>.png"/></div>
|
||
<div class="regle"><img src="./img/sgradiant2.png" /></div>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<h3><u>Dirigeance :</u></h3>
|
||
<div class="stats gradiant_pic">
|
||
<ul>
|
||
<li>
|
||
<i><?=$etab['AnalyseDirigeance']?></i>
|
||
<div class="blocdegrade clearfix">
|
||
<span class="textdegrade">Dirigeance</span>
|
||
<div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-<?=formatPct($etab['ScoreDirigeance'])?>.png"/></div>
|
||
<div class="regle"><img src="./img/sgradiant2.png" /></div>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<h3><u>Solvabilité :</u></h3>
|
||
<div class="stats gradiant_pic">
|
||
<ul>
|
||
<li>
|
||
<i>L'analyse de la solvabilité est <?=$etab['AnalyseSolvabilite']?></i>
|
||
<div class="blocdegrade clearfix">
|
||
<span class="textdegrade">Solvabilité</span>
|
||
<div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-<?=formatPct($etab['Indiscore'])?>.png"/></div>
|
||
<div class="regle"><img src="./img/sgradiant2.png" /></div>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<?
|
||
$millesimeMax=date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));
|
||
if ($etab['NbBilansScore']>0 && $etab['Bilans'][0]['Millesime']>=$millesimeMax)
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="540" colspan="2" class="StyleInfoData">A la lecture du dernier bilan, la situation financière de l'entreprise <?=$etab['Nom']?> est <b><?=$etab['tabInfosNotations']['SituationFinanciere']?></b>.<br/>
|
||
<!-- Cette notation financière est <?=$etab['tabInfosNotations']['Notation']?>.<br/>-->
|
||
<?php
|
||
if (html_entity_decode($etab['tabInfosNotations']['ProbabiliteDefaut'])<>'En défaut')
|
||
echo 'La probabilité de défaillance associée à cette note avoisine les '.
|
||
number_format($etab['tabInfosNotations']['ProbabiliteDefaut'],3,',',' ') .' %';
|
||
else
|
||
echo 'Cette entreprise est défaillante ou sur le point de le devenir.';
|
||
//[EquivalenceBDF]
|
||
?></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="540" colspan="2" class="StyleInfoData">
|
||
|
||
<i>Pour information, les méthodes standards donnent : Conan & Holder = <b><?=$etab['scores']['ConanH']?></b>, Afdcc2 = <b><?=$etab['scores']['Afdcc2']?></b> et Score Z = <b><?=$etab['scores']['Z']?></b>.</i>
|
||
|
||
</td>
|
||
</tr>
|
||
<? } else { ?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="540" colspan="2" class="StyleInfoData">La situation financière de l'entreprise ne peut être évaluée en détail car <?if ($etab['Bilans'][0]['Millesime']<$millesimeMax && count($etab['Bilans'])>0 ) {
|
||
echo 'le dernier bilan disponible date de '.substr($etab['Bilans'][0]['Millesime'],0,4).'.';
|
||
} else {
|
||
echo 'aucun bilan n\'est disponible.';
|
||
} ?></td>
|
||
</tr>
|
||
<? } ?>
|
||
<tr><td colspan="3"> </td></tr>
|
||
</table>
|
||
|
||
<h2>Paiements</h2>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="550" colspan="2" class="StyleInfoData">
|
||
<?=html_entity_decode($etab['infoPaiement'])?>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<h2>Conclusion</h2>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="550" colspan="2" class="StyleInfoData">
|
||
Compte tenu des informations disponibles auprès des sources officielles Scores et Décisions présente la conclusion suivante :<br/>
|
||
<?php
|
||
switch($_SESSION['tabInfo']['typeScore'])
|
||
{
|
||
case '20':
|
||
$maxIndiscore = $_SESSION['tabInfo']['typeScore'];
|
||
$indiscore = $etab['Indiscore20'];
|
||
break;
|
||
case '100':
|
||
default:
|
||
$maxIndiscore = empty($_SESSION['tabInfo']['typeScore'])? '100' : $_SESSION['tabInfo']['typeScore'];
|
||
$indiscore = $etab['Indiscore'];
|
||
break;
|
||
}
|
||
?>
|
||
<h3>LE SCORE EST DE <?=$indiscore?> SUR <?=$maxIndiscore?> POINTS</h3>
|
||
<?php
|
||
if($etab['infoEncours']!='' && !is_numeric($etab['encours']) && $etab['encours']=='N/A'){ ?>
|
||
<h3><?=$etab['infoEncours'];?></h3>
|
||
<?php
|
||
}else{ ?>
|
||
<?php
|
||
if ($indiscore!=0) { ?>
|
||
<i>La tendance de la note est <?=$etab['TendanceIndiscore']?></i>
|
||
<h3>L'ENCOURS MAXIMUM CONSEILLÉ EST DE <?=round($etab['encours']/1000)?> K€</h3>
|
||
<?php } ?>
|
||
<h3><?=$etab['infoEncours'];?></h3>
|
||
<?php
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<tr><td colspan="3" align="center"><img src="./img/logo_indiscore.png"/></td></tr>
|
||
</table>
|
||
<?php
|
||
//=> FIN BLOC INDISCORE
|
||
|
||
|
||
?>
|
||
<p class="confidentiel">
|
||
<?php
|
||
require_once 'cgu/cgu.php';
|
||
echo afficheCgu();
|
||
?>
|
||
</p>
|
||
|
||
</div>
|
||
<?php
|