2444 lines
74 KiB
PHP
2444 lines
74 KiB
PHP
<?php
|
||
if (!$_SESSION['connected']) die();
|
||
|
||
//Traitement des paramètres
|
||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||
|
||
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
||
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||
$siren=substr($siret,0,9);
|
||
|
||
?>
|
||
<style>
|
||
.confidentiel {font-style:italic; font-size:9px;}
|
||
</style>
|
||
|
||
<div id="center">
|
||
<h1>RAPPORT DE SYNTHESE</h1>
|
||
|
||
<p>Société : </p>
|
||
|
||
<?php
|
||
require_once 'utils.php';
|
||
require_once 'common/dates.php';
|
||
require_once 'cache/cache.php';
|
||
require_once 'user/user.php';
|
||
require_once 'logos/logos.php';
|
||
require_once 'scoresws/scoresws.php';
|
||
|
||
//=> BLOC IDENTITE
|
||
$etab = scoresws_identite($siret, $siren, $idEntreprise);
|
||
?>
|
||
<h1 class="titre">IDENTITÉ DE L'ENTREPRISE</h1>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Numéro identifiant Siret</td>
|
||
<td width="350" class="StyleInfoData"><?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).' <i>'.substr($etab['Siret'],9,5).'</i>'?></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Numéro identifiant Siret du siège</td>
|
||
<td width="350" class="StyleInfoData"><?=substr($etab['SiretSiege'],0,3).' '.substr($etab['SiretSiege'],3,3).' '.substr($etab['SiretSiege'],6,3).' <i>'.substr($etab['SiretSiege'],9,5).'</i>'?></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Numéro de TVA Intracom.</td>
|
||
<td width="350" class="StyleInfoData" valign="middle"><?
|
||
if($etab['Dept']*1==97) {
|
||
echo '<a href="http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31991L0680:FR:HTML" target="_blank">Non attribué dans les D.O.M.</a>';
|
||
} else {
|
||
echo substr($etab['TvaNumero'],0,2).' '.substr($etab['TvaNumero'],2,2).' '.substr($etab['TvaNumero'],-9);
|
||
if (!$etab['TvaAttribue'])
|
||
echo ' <img src="./img/exclamation.png" title="Non validé. Obligatoire sur factures, déclarations d\'échange de biens et de TVA !">';
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
if ($etab['Isin']<>'')
|
||
{
|
||
$bourse=$etab['Bourse'];
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Code ISIN</td>
|
||
<td width="350" class="StyleInfoData"><a href="./?page=bourse&siret=<?=$etab['Siret']?>" title="Voir les informations boursiéres"><?=$etab['Isin']?></a></td>
|
||
</tr>
|
||
<?php
|
||
if ($bourse['capitalisation']<>0)
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Capitalisation</td>
|
||
<td width="350" class="StyleInfoData"><?=number_format($bourse['capitalisation'],0,'', ' ')?> € au <?=WDate::dateT('Y-m-d','d/m/Y',$bourse['derCoursDate'])?></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
}
|
||
//Ne pas afficher le logo si il n'existe pas OU si le siren est à 0 OU si le siren est inférieur a 100
|
||
list($urlImg, $pathImg) = logo_exist($etab['Siren'], $etab['Isin'], $etab['Web']);
|
||
if( ( ($siren*1!=0 ) || ($siren*1>100) ) && file_exists($pathImg) )
|
||
{
|
||
$tabTmp=@getimagesize($pathImg);
|
||
$w=$tabTmp[0];
|
||
$h=$tabTmp[1];
|
||
if ($w>350) $strSize=@redimage($pathImg,350,150);
|
||
else $strSize='';
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Logo</td>
|
||
<td width="350" class="StyleInfoData"><img src="<?=$urlImg?>" <?=$strSize?>/></td>
|
||
</tr>
|
||
<?
|
||
}
|
||
?>
|
||
|
||
<?php
|
||
//Numéro RC
|
||
$flagNewRC = FALSE;
|
||
if (isset($etab['NumRC']) && $etab['NumRC']!='') {
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||
<td width="350" class="StyleInfoData"><?=$etab['NumRC']?></td>
|
||
</tr>
|
||
<?php
|
||
$flagNewRC = TRUE;
|
||
}
|
||
?>
|
||
|
||
<?php
|
||
//Autre identifiant : Numéro WALDEC ou ancien numéro RC si le nouveau n'est pas disponible
|
||
if (isset($etab['AutreId']) && $etab['AutreId']!='' && (!$flagNewRC || substr($etab['AutreId'],0,1)=='W'))
|
||
{
|
||
$libTrib = '';
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">
|
||
<?php
|
||
if (substr($etab['AutreId'],0,1)=='W') print 'Identifiant Association WALDEC';
|
||
elseif (preg_match('/(A|B|C|D)/i', $etab['AutreId']))
|
||
{
|
||
print 'Numéro R.C.';
|
||
$libTrib = ' RCS '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$etab['TribunalLib']);
|
||
}
|
||
elseif (preg_match('/(P)/i', $etab['AutreId']))
|
||
{
|
||
print 'Numéro R.S.A.C.';
|
||
$libTrib = ' RSAC '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$etab['TribunalLib']);
|
||
}
|
||
?>
|
||
</td>
|
||
<td width="350" class="StyleInfoData"><?=$etab['AutreId'].$libTrib?></td>
|
||
</tr>
|
||
<?
|
||
}
|
||
?>
|
||
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Etablissement actif
|
||
<?php
|
||
if ($etab['Siege']==0)
|
||
echo '<br/><a title="Voir la fiche d\'identité du siège de l\'entreprise" href="/?page=identite&siret='.$etab['Siren'].'&idEntreprise='.$idEntreprise.'">Accès à la fiche du siège</a>';
|
||
?>
|
||
</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<?php
|
||
if ($etab['Actif']==1)
|
||
echo 'Oui';
|
||
else {
|
||
echo '<b>NON</b>';
|
||
$dateCloture=str_replace('-','',$etab['DateClotEt']);
|
||
if ($etab['DateClotEt']<>'')
|
||
echo "<i> (Fin d'activité en ".WDate::dateT('Ymd', 'm/Y', $dateCloture).')</i>';
|
||
}
|
||
if ($etab['Siren']*1<>0 && preg_match('/AVISINSEE/i', $_SESSION['tabInfo']['droits']))
|
||
echo ' <a title="Voir l\'avis de situation correspondant de l\'INSEE" target="_blank" href="/?page=avis&siret='.$siret.'">(Situation au répertoire SIRENE)</a>';
|
||
?>
|
||
</td>
|
||
</tr>
|
||
|
||
<?php
|
||
//Situation Jurique + affichage date de radiation
|
||
$dateRadiation = '';
|
||
if(isset($etab['DateRadiation']) && $etab['DateRadiation']!='' && $etab['DateRadiation']!='0000-00-00'){
|
||
$dateRadiation = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateRadiation']));
|
||
}
|
||
$firephp->log($etab['SituationJuridique'], 'SituationJuridique');
|
||
|
||
if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]=='R' || $_SESSION['tabInfo']['mode_edition']==1)
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Situation juridique</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<?php
|
||
}
|
||
|
||
//Procédure collective
|
||
if ($etab['SituationJuridique']=='P')
|
||
{
|
||
?>
|
||
<a href="./?page=annonces&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">
|
||
<font color="red"><b>En procédure collective</b></font>
|
||
</a>
|
||
<?php if($dateRadiation!=''){ ?><br/>Radié du RCS le <?php print $dateRadiation; } ?>
|
||
<?php
|
||
}/*else{
|
||
if($dateRadiation!=''){ ?>Radié du RCS le <?php print $dateRadiation; }
|
||
}*/
|
||
//Radiation
|
||
if($etab['SituationJuridique']=='RR')
|
||
{
|
||
?> Radié du RCS <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
|
||
}elseif($etab['SituationJuridique']=='RP'){
|
||
?> Radiation publiée <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
|
||
}
|
||
if ($_SESSION['tabInfo']['mode_edition']==1)
|
||
{
|
||
?>
|
||
<a href="./?page=saisie&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">(Edition)</a>
|
||
<?php
|
||
}
|
||
if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]!='R' || $_SESSION['tabInfo']['mode_edition']==1)
|
||
{
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
} // Fin Situation juridique
|
||
?>
|
||
|
||
</table>
|
||
<h2>Raison sociale & Coordonnées</h2>
|
||
<table>
|
||
<?php
|
||
//Nom
|
||
$title = '';
|
||
if(isset($etab['NomLong']) && $etab['NomLong']!='' && $etab['NomLong']!=$etab['Nom'] )
|
||
$title = $etab['NomLong'];
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||
<td width="350" class="StyleInfoData" title="<?=$title?>">
|
||
<?=$etab['Nom']; if ($etab['Nom2']<>'') echo '<br/>'.$etab['Nom2'];?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
//Enseigne / Sigle
|
||
$titre = '';
|
||
if ($etab['Enseigne']!='' && $etab['Sigle']!=''){
|
||
$titre='Enseigne / Sigle';
|
||
$lib=$etab['Enseigne'].' / '.$etab['Sigle'];
|
||
}elseif($etab['Enseigne']!='' && $etab['Sigle']=='' && $etab['SigleLong']!='' ){
|
||
$titre='Enseigne / Sigle';
|
||
$lib=$etab['Enseigne'].' / '.$etab['SigleLong'];
|
||
}elseif($etab['Enseigne']!='' && $etab['Sigle']==''){
|
||
$titre='Enseigne';
|
||
$lib=$etab['Enseigne'];
|
||
}elseif($etab['Enseigne']=='' && $etab['Sigle']!=''){
|
||
$titre='Sigle';
|
||
$lib=$etab['Sigle'];
|
||
}elseif($etab['Enseigne']=='' && $etab['Sigle']=='' && $etab['SigleLong']!=''){
|
||
$titre='Sigle';
|
||
$lib=$etab['SigleLong'];
|
||
}
|
||
|
||
$title = '';
|
||
if( isset($etab['SigleLong']) && $etab['SigleLong']!='' && $etab['SigleLong']!=$etab['Sigle'])
|
||
$title = $etab['SigleLong'];
|
||
|
||
if ($titre!='') {
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">
|
||
<?=$titre?>
|
||
</td>
|
||
<td width="350" class="StyleInfoData" title="<?=$title?>"><?=$lib?></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
<?php
|
||
//Forme juridique
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||
<td width="350" class="StyleInfoData"><?=$etab['FJ'].' : '.strWsToHtml($etab['FJ_lib']);?>
|
||
<?php
|
||
if(isset($etab['FJ2']) && $etab['FJ2']!='' && isset($etab['FJ2_Lib']) && $etab['FJ2_Lib']!='')
|
||
{
|
||
?>
|
||
<img src="./img/exclamation.png" title="Forme jurique au RCS : <?=$etab['FJ2_Lib']?> (<?=$etab['FJ2']?>)"/>
|
||
<?php
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
//Date d'immatriculation
|
||
$dateImmat = '';
|
||
if(isset($etab['DateImmat']) && $etab['DateImmat']!='' && $etab['DateImmat']!='0000-00-00'){
|
||
$dateImmat = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateImmat']));
|
||
}
|
||
if($dateImmat!=''){
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Date d'immatriculation</td>
|
||
<td width="350" class="StyleInfoData"><?=$dateImmat?></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
<?php
|
||
//Date de création de l'entreprise
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Création de l'entreprise</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<?php
|
||
$dateCreationEn=str_replace('-','',$etab['DateCreaEn']);
|
||
if (substr($dateCreationEn,-2)*1==0)
|
||
echo WDate::dateT('Ymd', 'm/Y', $dateCreationEn);
|
||
else
|
||
echo WDate::dateT('Ymd', 'd/m/Y', $dateCreationEn);
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
//Date de création de l'établissement
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Création de l'établissement</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<?php
|
||
$dateCreationEt=str_replace('-','',$etab['DateCreaEt']);
|
||
if ($dateCreationEt*1<>0) {
|
||
if (substr($dateCreationEt,-2)*1==0)
|
||
echo WDate::dateT('Ymd', 'm/Y', $dateCreationEt);
|
||
else
|
||
echo WDate::dateT('Ymd', 'd/m/Y', $dateCreationEt);
|
||
} else echo 'N/C';
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<?php
|
||
if($etab['AdresseRue'] == ''){ $voie = $etab['Adresse2']; }else{ $voie = $etab['AdresseRue']; }
|
||
?>
|
||
<a href="/?page=recherche&vue=list&formR[type]=ent&formR[numVoie]=<?=urlencode($etab['AdresseNum'])?>&formR[voie]=<?=urlencode($voie)?>&formR[cpVille]=<?=urlencode($etab['CP'])?>" title="Rechercher à partir de cette adresse">
|
||
<p class="adresse"><?php print $etab['Adresse'];?></p>
|
||
<?php
|
||
if (preg_match('/CHEZ SOFRADOM/i',$etab['Adresse2']))
|
||
$etab['Adresse2']='<a title="Voir la fiche d\'identité du domiciliataire de cette entreprise" href="/?page=identite&siret=42495045900018&idEntreprise=6720043">CHEZ SOFRADOM</a>';
|
||
//http://extranet.devlocal.com/?page=identite&siret=42495045900018&idEntreprise=6720043
|
||
if ($etab['Adresse2']<>'')
|
||
print '<p class="adresse">'.$etab['Adresse2'].'</p>';
|
||
?>
|
||
<?php
|
||
$cp=$etab['CP']*1;
|
||
if ($cp<>0)
|
||
print '<p class="adresse">'.$etab['CP'].' '.strWsToHtml($etab['Ville']).'</p>';
|
||
if ($etab['Pays']<>'' && strtoupper(substr($etab['Pays'],0,3))<>'FRA')
|
||
print '<p class="adresse">'.strWsToHtml($etab['Pays']).'</p>';
|
||
?>
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
//Zones prioritaires
|
||
//if (@$etab['GeoInfos']['ZUS']<>'NON' || @$etab['GeoInfos']['ZFU']<>'NON' || @$etab['GeoInfos']['ZRU']<>'NON' || @$etab['GeoInfos']['CUCS']<>'NON') {/* && trim(@$etab['GeoInfos']['NCUCS'])<>'')) {*/
|
||
if (@$etab['GeoInfos']['ZUS']=='OUI' || @$etab['GeoInfos']['ZFU']=='OUI' || @$etab['GeoInfos']['ZRU']=='OUI' || @$etab['GeoInfos']['CUCS']=='OUI' || @$etab['GeoInfos']['ZRR']=='OUI' || @$etab['GeoInfos']['AFR']=='OUI')
|
||
{
|
||
/*[GeoInfos] => Array
|
||
(
|
||
[ZUS] => OUI
|
||
[NZUS] => 1127020
|
||
[ZFU] => OUI
|
||
[NZFU] => 11270ZF
|
||
[CUCS] => OUI
|
||
[NCUCS] => 1127020
|
||
)*/
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Zones prioritaires</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<?php
|
||
if ($etab['GeoInfos']['ZUS']=='OUI') echo '<a href="http://sig.ville.gouv.fr/Territoire/'.$etab['GeoInfos']['NZUS'].'" target="_blank">ZUS n°'.$etab['GeoInfos']['NZUS'].'</a><br/>';
|
||
//elseif ($etab['GeoInfos']['ZUS']=='NSP') echo 'Implantation en ZUS à vérifier<br/>';
|
||
if ($etab['GeoInfos']['ZFU']=='OUI') echo '<a href="http://sig.ville.gouv.fr/Territoire/'.$etab['GeoInfos']['NZFU'].'" target="_blank">ZFU n°'.$etab['GeoInfos']['NZFU'].'</a><br/>';
|
||
//elseif ($etab['GeoInfos']['ZFU']=='NSP') echo 'Implantation en ZFU à vérifier<br/>';
|
||
if ($etab['GeoInfos']['ZRU']=='OUI') echo '<a href="http://sig.ville.gouv.fr/Territoire/'.$etab['GeoInfos']['NZRU'].'" target="_blank">ZRU n°'.$etab['GeoInfos']['NZRU'].'</a><br/>';
|
||
|
||
if ($etab['GeoInfos']['ZRR']=='OUI') echo '<a href="http://www.diact.gouv.fr/IMG/Fichiers/Rural%20/ZRR/carte_zrr_20090409.pdf" target="_blank">ZRR n°'.$etab['GeoInfos']['NZRR'].'</a><br/>';
|
||
if ($etab['GeoInfos']['AFR']=='OUI') echo '<a href="http://www.diact.gouv.fr/IMG/Fichiers/AFR/com_fr_AFR0907.pdf" target="_blank">AFR n°'.$etab['GeoInfos']['NAFR'].'</a><br/>';
|
||
//elseif ($etab['GeoInfos']['ZRU']=='NSP') echo 'Implantation en ZRU à vérifier<br/>';
|
||
if ($etab['GeoInfos']['CUCS']=='OUI') echo '<a href="http://sig.ville.gouv.fr/Territoire/'.$etab['GeoInfos']['NCUCS'].'" target="_blank">CUCS n°'.$etab['GeoInfos']['NCUCS'];
|
||
//elseif ($etab['GeoInfos']['CUCS']=='NSP') echo 'Implantation en CUCS à vérifier';
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?
|
||
}
|
||
?>
|
||
<?php
|
||
//Téléphone
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<div class="txtAdresse">
|
||
<p>
|
||
<?php
|
||
if (trim($etab['Tel'])=='') echo 'N/C';
|
||
else echo $etab['Tel'];
|
||
|
||
if ($etab['Enseigne']<>'') $libNom=urlencode($etab['Enseigne']);
|
||
else $libNom=urlencode($etab['Nom']);
|
||
$adresse=$etab['Adresse'];
|
||
$i_adr=0;
|
||
while (substr($adresse,0,1)=='0') {
|
||
$i_adr++;
|
||
$adresse=substr($adresse,1,strlen($adresse)-1);
|
||
if ($i_adr>4) break;
|
||
}
|
||
?>
|
||
<a title="Rechercher le numéro de téléphone dans l'annuaire" target="_blank" href="http://local.search.ke.voila.fr/S/searchproxi?act=&nom=<?=$libNom?>&adr=<?=urlencode(utf8_decode($adresse))?>&loc=<?=urlencode(utf8_decode($etab['CP'].' '.$etab['Ville']))?>&x=0&y=0&bhv=searchproxi&profil=enville&guidelocid=&guideregid=&guidedepid=&actid=&ke=&locid=">
|
||
(Recherche annuaire)</a></p>
|
||
</td>
|
||
</tr>
|
||
<?
|
||
//Fax
|
||
if ($etab['Fax']*1>0)
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Fax</td>
|
||
<td width="350" class="StyleInfoData"><?=$etab['Fax']?></td>
|
||
</tr>
|
||
<?
|
||
}
|
||
|
||
//Site web
|
||
if ($etab['Web']!='')
|
||
{
|
||
if (substr($web,0,7)!='http://') $siteWeb = 'http://'.$etab['Web'];
|
||
else $siteWeb = $etab['Web'];
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Site Internet</td>
|
||
<td width="350" class="StyleInfoData"><a href="<?=$siteWeb?>" target="_blank"><?=$siteWeb?></a></td>
|
||
</tr>
|
||
<?
|
||
}
|
||
|
||
//Email
|
||
if (trim($etab['Mail'])<>'') { ?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Courriel</td>
|
||
<td width="350" class="StyleInfoData"><a href="mailto:<?=$etab['Mail'];?>" target="_blank"><?=$etab['Mail']?></a></td>
|
||
</tr>
|
||
<?
|
||
}
|
||
?>
|
||
</table>
|
||
<h2>Activité(s) & Chiffre d'affaire</h2>
|
||
<?php
|
||
//Activité de l'entreprise
|
||
?>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Activité de l'entreprise</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<?php
|
||
if ($etab['Activite']<>'' && !preg_match('/non pr(e|é)cis(e|é)/i',utf8_decode($etab['Activite']))) {
|
||
$texte=preg_replace_callback("/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/", replace_siren, strWsToHtml($etab['Activite']));
|
||
echo $texte.' ('.$etab['NafEnt'].' : '. strWsToHtml($etab['NafEntLib']).')';
|
||
} else
|
||
echo $etab['NafEnt'].' : '. strWsToHtml($etab['NafEntLib']);
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
//Activité de l'établissement
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Activité de l'établissement</td>
|
||
<td width="350" class="StyleInfoData"><?=$etab['NafEtab'].' : '. strWsToHtml($etab['NafEtabLib']);?></td>
|
||
</tr>
|
||
<?php
|
||
//NAF4
|
||
if (preg_match('/NAF4/i', $_SESSION['tabInfo']['pref']) && trim(@$etab['Naf4Ent'])<>'') {
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Anciens codes NAF</td>
|
||
<td width="350" class="StyleInfoData"><b>Entr. : </b><?=$etab['Naf4Ent'].' - '. strWsToHtml($etab['Naf4EntLib']);?><br/><b>Étab. :</b> <?=$etab['Naf4Etab'].' - '. strWsToHtml($etab['Naf4EtabLib']);?></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
//Nature de l'activité
|
||
if ($etab['NatureActivite']==1 && $etab['Actif']==1)
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Nature de l'activité</td>
|
||
<td width="350" class="StyleInfoData">Saisonnière</td>
|
||
</tr>
|
||
<?
|
||
}
|
||
|
||
//Origine du fond
|
||
if ( ($etab['OrigineCreation']*1>0 && $etab['OrigineCreation']*1<9) ||
|
||
$etab['OrigineCreation']=='A' || $etab['OrigineCreation']=='B' || $etab['OrigineCreation']=='C' ||
|
||
$etab['OrigineCreation']=='D' || $etab['OrigineCreation']=='E' )
|
||
{
|
||
$tabCreation=array( 'a1'=>'Création',
|
||
'a3'=>'Achat',
|
||
'a4'=>'Apport',
|
||
'a6'=>'Prise en location gérance',
|
||
'a7'=>'Partage',
|
||
'a8'=>'Reprise',
|
||
'aA'=>'Reprise globale de l\'exploitation agricole',
|
||
'aB'=>'Poursuite de l\'exploitation agricole par le conjoint',
|
||
'aC'=>'Transfert de propriété de l\'exploitation agricole',
|
||
'aD'=>'Apport d\'exploitation(s) agricole(s) individuelle(s)',
|
||
'aE'=>'Reprise d\'exploitation agricole individuelle',
|
||
);
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Origine du fonds</td>
|
||
<td width="350" class="StyleInfoData"><?=$tabCreation['a'.$etab['OrigineCreation']]?></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
|
||
//Nombre d'établissements actif
|
||
if ($etab['NbEtab']<>'N/C')
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Nombre d'établissements actifs</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<a title="Voir la liste des établissements" href="/?page=etablissements&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>"><?=number_format($etab['NbEtab']*1,null,null,' ')?></a>
|
||
<?php
|
||
if ($etab['NbEtab']*1>1)
|
||
{
|
||
?> <a title="Voir la liste des établissements" href="/?page=etablissements&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">(Liste)</a>
|
||
<?php
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?
|
||
}
|
||
?>
|
||
<?php
|
||
//Capital
|
||
if (isset($etab['Capital']) && $etab['Capital']*1>0)
|
||
{
|
||
$title = '';
|
||
if(isset($etab['Bilan']['Capital'])) $title.='Capital de '.moneyKM($etab['Bilan']['Capital']).deviseText($etab['Bilan']['Devise']);
|
||
if(isset($etab['Bilan']['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Capital <?php if (isset($etab['CapitalType']) && $etab['CapitalType']=='V'){print 'variable';}?></td>
|
||
<td width="350" class="StyleInfoData" title="<?=$title?>"><?=number_format($etab['Capital'],0,',',' ')?>
|
||
<?php
|
||
if ($etab['CapitalDev']=='EUR') echo '€';
|
||
else {
|
||
echo $etab['CapitalDev'].' ('.strWsToHtml($etab['CapitalLib']).')';
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
|
||
<?php
|
||
//Chiffre d'affaire
|
||
$title = '';
|
||
if(isset($etab['Bilan']['CA'])) $title.='Chiffre d\'affaire de '.moneyKM($etab['Bilan']['CA']).deviseText($etab['Bilan']['Devise']);
|
||
if(isset($etab['Bilan']['Resultat'])) $title.=' et Résultat de '.moneyKM($etab['Bilan']['Resultat']).deviseText($etab['Bilan']['Devise']);
|
||
if(isset($etab['Bilan']['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Chiffre d'affaire</td>
|
||
<td width="350" class="StyleInfoData" title="<?=$title?>">
|
||
<?php
|
||
if(isset($etab['Bilan']['CA']) && (!isset($etab['TrancheCALib']) || $etab['TrancheCALib']=='N/C'))
|
||
{
|
||
print moneyKM($etab['Bilan']['CA']).deviseText($etab['Bilan']['Devise']).' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
||
}elseif(isset($etab['TrancheCALib']) && $etab['TrancheCALib']!='N/C'){
|
||
print strWsToHtml($etab['TrancheCALib']);
|
||
}else{
|
||
print 'N/C';
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
|
||
<?php
|
||
//Principaux dirigeants
|
||
$dir1DateNaiss = '';
|
||
if(isset($etab['dir1DateNaiss']) && $etab['dir1DateNaiss']!='' && $etab['dir1DateNaiss']!='0000-00-00'){
|
||
$dir1DateNaiss = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['dir1DateNaiss']));
|
||
}
|
||
$dir1LieuNaiss = '';
|
||
if(isset($etab['dir1LieuNaiss']) && $etab['dir1LieuNaiss']!=''){
|
||
$dir1LieuNaiss = $etab['dir1LieuNaiss'];
|
||
}
|
||
$dir2DateNaiss = '';
|
||
if(isset($etab['dir2DateNaiss']) && $etab['dir2DateNaiss']!='' && $etab['dir2DateNaiss']!='0000-00-00'){
|
||
$dir2DateNaiss = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['dir2DateNaiss']));
|
||
}
|
||
$dir2LieuNaiss = '';
|
||
if(isset($etab['dir2LieuNaiss']) && $etab['dir2LieuNaiss']!=''){
|
||
$dir2LieuNaiss = $etab['dir2LieuNaiss'];
|
||
}
|
||
$dir1NaissText = '';
|
||
if($dir1DateNaiss!='') $dir1NaissText.= 'né(e) le '.$dir1DateNaiss;
|
||
if($dir1LieuNaiss!='' && $dir1NaissText!='') $dir1NaissText.= ' à '.$dir1LieuNaiss;
|
||
elseif($dir1LieuNaiss!='' && $dir1NaissText=='') $dir1NaissText.= 'né(e) à '.$dir1LieuNaiss;
|
||
$dir2NaissText = '';
|
||
if($dir2DateNaiss!='') $dir2NaissText.= 'né(e) le '.$dir2DateNaiss;
|
||
if($dir2LieuNaiss!='' && $dir2NaissText!='') $dir2NaissText.= ' à '.$dir2LieuNaiss;
|
||
elseif($dir2LieuNaiss!='' && $dir2NaissText=='') $dir2NaissText.= 'né(e) à '.$dir2LieuNaiss;
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Principaux Dirigeants</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<div class="txtAdresse">
|
||
<p><u><b><?php print strWsToHtml(ucfirst($etab['dir1Titre'])); ?></b></u><br/><?php print strWsToHtml($etab['dir1NomPrenom']); ?><?php if($dir1NaissText!=''){?>, <?php print $dir1NaissText; }?></p>
|
||
</div>
|
||
<?php
|
||
if ($etab['dir2Titre']<>'') {
|
||
?>
|
||
<br/>
|
||
<div class="txtAdresse">
|
||
<p><u><b><?php print strWsToHtml(ucfirst($etab['dir2Titre'])); ?></b>:</u><br/><?php print strWsToHtml($etab['dir2NomPrenom']); ?> <?php if($dir2NaissText!=''){?>, <?php print $dir2NaissText; }?></p>
|
||
</div>
|
||
<?php
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
|
||
<?php
|
||
//Effectif
|
||
$title = '';
|
||
if(isset($etab['Bilan']['Effectif'])) $title.=$etab['Bilan']['Effectif'].' salarié(s)';
|
||
if(isset($etab['Bilan']['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Effectif de l'entreprise</td>
|
||
<td width="350" class="StyleInfoData" title="<?=$title?>">
|
||
<?php
|
||
if( (!isset($etab['Effectif']) || $etab['Effectif']=='N/C' || $etab['Effectif']==0) && isset($etab['Bilan']['Effectif']))
|
||
{
|
||
print $title;
|
||
}elseif(isset($etab['Effectif']) && $etab['Effectif']!='N/C' && $etab['Effectif']!=0 ){
|
||
print number_format($etab['Effectif']*1,null,null,' ').' salarié(s)';
|
||
}else{
|
||
print 'N/C';
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<h2>Localisation géographique & Recherche presse</h2>
|
||
<table>
|
||
<?php
|
||
//Information géographique
|
||
function normaliseVoie($voie) {
|
||
switch (strtoupper($voie)) {
|
||
case 'BD': case 'BVD': return 'BOULEVARD'; break;
|
||
case 'AV': case 'AVE': return 'AVENUE'; break;
|
||
case 'PL': case 'PLA': return 'PLACE'; break;
|
||
case 'ESP': return 'ESPLANADE'; break;
|
||
//- 8E__ARRONDISSEMENT
|
||
default; return strtoupper($voie); break;
|
||
}
|
||
}
|
||
$ville=' '.trim(preg_replace('/([0-9]|BILLANCOURT|SUR.SEINE| PERRET|ARRONDISSEMENT|_)/i',' ',$etab['Ville'])).' ';
|
||
$ville=trim(strtr($ville, array(' EME '=>'', ' ER '=>'')));
|
||
|
||
if (preg_match('/MAPPY/i', $_SESSION['tabInfo']['pref']) &&
|
||
preg_match('/(LILLE|CAEN|RENNES|BAULE|NANTES|NANCY|STRASBOURG|LYON|BORDEAUX|GRENOBLE|MONTPELLIER|TOULOUSE|MARSEILLE|CANNES|NICE|PARIS|NEUILLY|LEVALLOIS|ASNIERES|COURBEVOIE|NANTERRE|REUIL|BOULOGNE|SEVRES|VERSAILLES|MONTROUGE|MOULINEAUX)/', $ville))
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="580" colspan="3"class="StyleInfoData">
|
||
<table><tr>
|
||
<td width="340" height="420">
|
||
<IFRAME src="http://pro.mappy.com/BtoB/scoresdecisions/photo?photo.town=<?=$ville?>;photo.way=<?=trim(strtr(normaliseVoie($etab['AdresseVoie']).' '.$etab['AdresseRue'], array( ' ST '=>' SAINT ',' STE '=>' SAINTE ', )))?>;photo.num=<?=$etab['AdresseNum']*1?>;photo.postal_code=<?=$etab['CP']?>" width="340" height="420" scrolling="no" frameborder="0"></IFRAME>
|
||
</td>
|
||
<td width="240"><b>Information géographique :</b><br/>
|
||
<? if ($etab['GeoPrecis']>0) { ?>
|
||
Latitude : <?=htmlentities(dec2dms($etab['GeoLat']),null,'ISO-8859-1')?> (<?=$etab['GeoLat']?>)<br/>
|
||
Longitude : <?=htmlentities(dec2dms($etab['GeoLon']),null,'ISO-8859-1')?> (<?=$etab['GeoLon']?>)<br/><? } ?>
|
||
<a href="./?page=referer&part=gmap&siret=<?=$siret?>&url=http://maps.google.com/maps?f=q%26hl=fr%26geocode=%26q=<?=$etab['AdresseNum']?>,+<?=urlencode($etab['AdresseVoie'])?>+<?=urlencode($etab['AdresseRue'])?>,+<?=$etab['CP']?>+<?=urlencode($etab['Ville'])?>" target="_blank">Afficher l'adresse sur Google Map ©</a><br/>
|
||
<br/>
|
||
<b>Code commune / Rivoli :</b><br/>
|
||
<?=$etab['Dept'].' '.$etab['codeCommune']?> / <?=$etab['Rivoli']?>
|
||
</td>
|
||
</tr></table>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
} else {
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Information géographique</td>
|
||
<td width="350" class="StyleInfoData">
|
||
<? if ($etab['GeoPrecis']>0) { ?>
|
||
Latitude : <?=htmlentities(dec2dms($etab['GeoLat']),null,'ISO-8859-1')?> (<?=$etab['GeoLat']?>)<br/>
|
||
Longitude : <?=htmlentities(dec2dms($etab['GeoLon']),null,'ISO-8859-1')?> (<?=$etab['GeoLon']?>)<br/><? } ?>
|
||
<a href="./?page=referer&part=gmap&siret=<?=$siret?>&url=http://maps.google.com/maps?f=q%26hl=fr%26geocode=%26q=<?=$etab['AdresseNum']?>,+<?=urlencode($etab['AdresseVoie'])?>+<?=urlencode($etab['AdresseRue'])?>,+<?=$etab['CP']?>+<?=urlencode($etab['Ville'])?>" target="_blank">Afficher l'adresse sur Google Map ©</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="200" class="StyleInfoLib">Code commune / Rivoli</td>
|
||
<td width="350" class="StyleInfoData"><?=$etab['Dept'].' '.$etab['codeCommune']?> / <?=$etab['Rivoli']?></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
<tr><td colspan="3"> </td></tr>
|
||
<?
|
||
//News
|
||
if (preg_match('/NEWS/i', $_SESSION['tabInfo']['pref']))
|
||
{
|
||
/* Information presse 15 Aug 2007 09:21:49 GMT - */
|
||
require_once ('XML/RSS.php');
|
||
$rss=&new XML_RSS('http://news.google.fr/news?hl=fr&ned=fr&ie=ISO-8859-1&q='.urlencode('"'.$etab['Nom'].'"').'&output=rss');
|
||
$rss->parse();
|
||
$tabMonth=array('Jan'=>1,'Feb'=>2,'Mar'=>3,'Apr'=>4,'May'=>5,'Jun'=>6,'Jul'=>7,'Aug'=>8,'Sep'=>9,'Oct'=>10,'Nov'=>11,'Dec'=>12);
|
||
foreach ($rss->getItems() as $i=>$item)
|
||
{
|
||
if ($i==0)
|
||
{
|
||
?>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="550" class="StyleInfoLib" colspan="2">Information presse (Source Google News ©)<br/>
|
||
<ul>
|
||
<?php
|
||
}
|
||
$tmp=explode(', ', $item['pubdate']);
|
||
$tabDate = explode(' ', $tmp[1]);
|
||
$tabTime = explode(':', $tabDate[3]);
|
||
$pubDate = date('d/m/Y à H:i', gmmktime($tabTime[0]-1, $tabTime[1], $tabTime[2], $tabMonth[$tabDate[1]], $tabDate[0], $tabDate[2]));
|
||
$titre = utf8_decode($item['title']);
|
||
echo '<li><a href="' . $item['link'] . '" target="_blank">Le '. $pubDate ." - $titre</a></li>";
|
||
$i++; if ($i==15) break;
|
||
}
|
||
if ($i>0)
|
||
{
|
||
?>
|
||
</ul></td></tr>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</table>
|
||
<?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);
|
||
|
||
if ($siren != $_SESSION['tabInfo']['entrep']['siren']) {
|
||
$O2 = $client->getIdentite($siret);
|
||
$etab = $O2['result'];
|
||
$tabEntrep = array();
|
||
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
||
$tabEntrep['siren'] = $etab['Siren'];
|
||
$tabEntrep['siret'] = $etab['Siret'];
|
||
$tabEntrep['tva'] = $etab['TvaNumero'];
|
||
$tabEntrep['isin'] = $etab['Isin'];
|
||
$tabEntrep['AutreId'] = $etab['AutreId'];
|
||
$tabEntrep['active'] = $etab['Statut'];
|
||
$tabEntrep['Source'] = $etab['Source'];
|
||
$tabEntrep['SourceId'] = $etab['SourceId'];
|
||
$tabEntrep['codeCommune'] = $etab['Dept'].$etab['codeCommune'];
|
||
$tabEntrep['nafEn'] = $etab['NafEnt'];
|
||
$tabEntrep['nafEt'] = $etab['NafEtab'];
|
||
$tabEntrep['fj'] = $etab['FJ'];
|
||
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
||
$raisonSociale = $etab['Nom'];
|
||
} else
|
||
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||
?>
|
||
<h1 class="titre">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">
|
||
<div id="annoncesDate"><p>Le <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution']);?></p></div>
|
||
<div 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 '"/>';
|
||
}
|
||
?>
|
||
</div>
|
||
</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>DIRIGEANTS</h1>
|
||
<h2>Liste des dirigeants actifs</h2>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td colspan="2" width="550" 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
|
||
}
|
||
?>
|
||
</p>
|
||
</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
|
||
require_once 'cache/cache.php';
|
||
require_once 'ratios/ratios.php';
|
||
require_once 'scoresws/scoresws.php';
|
||
|
||
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
|
||
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
|
||
|
||
$result = scoresws_synthese($siret, $siren, $idEntreprise);
|
||
$bilansInfos = $result['bilansInfos'];
|
||
$ratiosInfos = $result['ratiosInfos'];
|
||
$ratiosEntrep = $result['ratiosEntrep'];
|
||
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
|
||
|
||
$numBilanC = 0;
|
||
$numBilanN = 0;
|
||
if(count($bilansInfos)>0)
|
||
{
|
||
foreach($bilansInfos as $key => $item)
|
||
{
|
||
if($item['typeBilan']=='C') { $numBilanC++; }
|
||
if($item['typeBilan']=='N') { $numBilanN++; }
|
||
}
|
||
}
|
||
|
||
if($typeBilan=='')
|
||
{
|
||
if($numBilanN>0){ $typeBilan='N'; }
|
||
if($numBilanN==0 && $numBilanC>0){ $typeBilan='C'; }
|
||
}
|
||
$firephp->log($typeBilan, 'typeBilan');
|
||
$firephp->log($bilansInfos, 'bilansInfos');
|
||
|
||
if(count($bilansInfos)>0)
|
||
{
|
||
//En fonction du type de bilan sélectionné
|
||
//on filtre les bilans avant de les envoyer sur l'affichage
|
||
$index = 0;
|
||
foreach($bilansInfos as $key => $item)
|
||
{
|
||
if($item['typeBilan']!=$typeBilan)
|
||
{
|
||
array_splice($bilansInfos, $index, 1);
|
||
array_splice($ratiosEntrep, $index, 1);
|
||
array_splice($ratiosEntrepEvol, $index, 1);
|
||
$index--;
|
||
}
|
||
$index++;
|
||
}
|
||
}
|
||
|
||
$nbrAnnees = count($bilansInfos)-1;
|
||
|
||
//Liste des ratios pour le graphique général
|
||
$tabRatioGraph = array( 0 => array('ratio'=>'r236', 'op' => 1000),
|
||
1 => array('ratio'=>'r235', 'op' => 1000),
|
||
2 => array('ratio'=>'r6', 'op' => 1000),
|
||
3 => array('ratio'=>'r146', 'op' => 1000));
|
||
|
||
//Liste des ratios à afficher
|
||
$tabRatio = array(
|
||
'r5' => array('evol'=>'r6', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
|
||
'r7' => array('evol'=>'r8', 'op' => 1000, 'titre'=>'RESULTAT COURANT AVANT IMPOTS'),
|
||
'r10' => array('evol'=>'r11', 'op' => 1000, 'titre'=>'RESULTAT NET'),
|
||
'r18' => array('evol'=>'r19', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
|
||
'r22' => array('evol'=>'r23', 'op' => 1000, 'titre'=>'TOTAL BILAN'),
|
||
'r231' => array('evol'=>'r235', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
|
||
'r232' => array('evol'=>'r236', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
|
||
'r63' => array('evol'=>'r64', 'op' => 1000, 'titre'=>'TRESORERIE'),
|
||
'r24' => array('evol'=>'r24', 'op' => 1, 'titre'=>'EFFECTIF', 'unite' => 1),
|
||
);
|
||
|
||
//On souhaite n'afficher qu'un seul ratio, on réduit donc le tableau
|
||
if($ratio!=''){
|
||
$tabRatio = array( $ratio => $tabRatio[$ratio]);
|
||
}
|
||
$data = synthese_datagraph($bilansInfos, $ratiosEntrep, $tabRatioGraph, $tabRatio);
|
||
$dataGraph = $data['graph'];
|
||
$dataEvol = $data['evol'];
|
||
?>
|
||
<h1>SYNTHÈSE</h1>
|
||
|
||
<table>
|
||
<?php
|
||
if (count($bilansInfos)>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 )
|
||
{
|
||
?>
|
||
<?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 }?>
|
||
<?php
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
</table>
|
||
|
||
<?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 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, $tabRatio)
|
||
?>
|
||
</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
|
||
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
|
||
|
||
require_once 'cache/cache.php';
|
||
require_once 'ratios/ratios.php';
|
||
require_once 'scoresws/scoresws.php';
|
||
|
||
$result = scoresws_bilans($siret, $siren, $idEntreprise);
|
||
$bilansInfos = $result['bilansInfos'];
|
||
$ratiosInfos = $result['ratiosInfos'];
|
||
$ratiosEntrep = $result['ratiosEntrep'];
|
||
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
|
||
$dataActif = $result['dataActif'];
|
||
$dataPassif = $result['dataPassif'];
|
||
$dataSIG = $result['dataSIG'];
|
||
|
||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
|
||
}else{ $fileName = $page.'-'.$siren; }
|
||
|
||
$numBilanC = 0;
|
||
$numBilanN = 0;
|
||
if(count($bilansInfos)>0)
|
||
{
|
||
foreach($bilansInfos as $key => $item)
|
||
{
|
||
if($item['typeBilan']=='C') { $numBilanC++; }
|
||
if($item['typeBilan']=='N') { $numBilanN++; }
|
||
}
|
||
}
|
||
$firephp->log($bilansInfos, 'bilansInfos');
|
||
if($typeBilan=='')
|
||
{
|
||
if($numBilanN>0){ $typeBilan = 'N'; }
|
||
if($numBilanN==0 && $numBilanC>0){ $typeBilan = 'C'; }
|
||
}
|
||
if(count($bilansInfos)>0)
|
||
{
|
||
//En fonction du type de bilan sélectionné
|
||
//on filtre les bilans avant de les envoyer sur l'affichage
|
||
$index = 0;
|
||
foreach($bilansInfos as $key => $item)
|
||
{
|
||
if($item['typeBilan']!=$typeBilan)
|
||
{
|
||
array_splice($bilansInfos, $index, 1);
|
||
array_splice($ratiosEntrep, $index, 1);
|
||
array_splice($ratiosEntrepEvol, $index, 1);
|
||
array_splice($dataActif, $index, 1);
|
||
array_splice($dataPassif, $index, 1);
|
||
array_splice($dataSIG, $index, 1);
|
||
$index--;
|
||
}
|
||
$index++;
|
||
}
|
||
}
|
||
$firephp->log($bilansInfos, 'bilansInfos');
|
||
?>
|
||
<script type="text/javascript">
|
||
$(document).ready(function()
|
||
{
|
||
$('input[type=radio][name=typeBilan]').change(function(){
|
||
document.location.href=$(this).val();
|
||
});
|
||
});
|
||
</script>
|
||
<?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{
|
||
?>
|
||
|
||
<h2>Bilan actif - passif</h2>
|
||
|
||
<table>
|
||
<?php
|
||
if (count($bilansInfos)>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 )
|
||
{
|
||
$firephp->log($typeBilan, 'typeBilan');
|
||
?>
|
||
<?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 }?>
|
||
<?php
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
?>
|
||
</table>
|
||
|
||
<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">
|
||
<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['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
|
||
isset($_REQUEST['mil']) ? $mil=$_REQUEST['mil'] : $mil='' ;
|
||
isset($_REQUEST['ratio']) ? $ratio=$_REQUEST['ratio'] : $ratio='' ;
|
||
|
||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
|
||
}else{ $fileName = $page.'-'.$siren; }
|
||
|
||
$result = scoresws_ratios($siret, $siren, $idEntreprise);
|
||
$bilansInfos = $result['bilansInfos'];
|
||
$ratiosInfos = $result['ratiosInfos'];
|
||
$ratiosEntrep = $result['ratiosEntrep'];
|
||
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
|
||
$ratiosSecteur = $result['ratiosSecteur'];
|
||
|
||
$tabRatio = array(
|
||
0 => array('titre'=>'EQUILIBRE FINANCIER'),
|
||
|
||
1 => array('titre'=>'MARGE BRUTE D\'AUTOFINANCEMENT', 'stitre'=>'(MBA ou CAF)', 'ratio'=>'r233', 'parent'=>0, 'position'=>'>' ),
|
||
2 => array('titre'=>'COUVERTURE du BFR ', 'stitre'=>'(FR/BFR)', 'ratio'=>'r234', 'parent'=>0, 'position'=>'>' ),
|
||
3 => array('titre'=>'COUVERTURE des IMMOS NETTES ', 'stitre'=>'(Capitaux permanents / Immobilisations nettes)', 'ratio'=>'r237', 'parent'=>0, 'position'=>'>' ),
|
||
4 => array('titre'=>'COUVERTURE du CA ', 'stitre'=>'(Fond de roulement net global sur 12m x 360 / Chiffre d\'affaire)', 'ratio'=>'r238', 'parent'=>0, 'position'=>'>' ),
|
||
5 => array('titre'=>'SOLVABILITE ', 'stitre'=>'(Capitaux propres / Ensemble des dettes)', 'ratio'=>'r239', 'parent'=>0, 'position'=>'>' ),
|
||
6 => array('titre'=>'INDEPENDANCE FINANCIERE ', 'stitre'=>'(Cap.propres/Capitaux permanents)', 'ratio'=>'r240', 'parent'=>0, 'position'=>'>' ),
|
||
|
||
7 => array('titre'=>'PROFITABILITE'),
|
||
|
||
8 => array('titre'=>'RENTABILITE ECONOMIQUE ', 'stitre'=>'(EBE/TOTAL bilan)', 'ratio'=>'r262', 'parent'=>7, 'position'=>'>' ),
|
||
9 => array('titre'=>'RENTABILITE FINANCIERE ', 'stitre'=>'(Résult.Net/Cap.propres)', 'ratio'=>'r263', 'parent'=>7, 'position'=>'>' ),
|
||
10 => array('titre'=>'RENTABILITE COMMERCIALE ', 'stitre'=>'(Résultat net/CA)', 'ratio'=>'r264', 'parent'=>7, 'position'=>'>' ),
|
||
11 => array('titre'=>'CONTRIBUTION DU CAPITAL', 'stitre'=>'(Capacité d\'autofinancement sur 12 mois / Capitaux permanents)', 'ratio'=>'r265', 'parent'=>7, 'position'=>'>' ),
|
||
12 => array('titre'=>'CONTRIBUTION DE LA VA', 'stitre'=>'(Capacité d\'autofinancement / Valeur ajoutée)', 'ratio'=>'r266', 'parent'=>7, 'position'=>'>' ),
|
||
|
||
13 => array('titre'=>'LIQUIDITE'),
|
||
|
||
14 => array('titre'=>'LIQUIDITE IMMEDIATE', 'stitre'=>'(Disponibilité / Dettes CT)', 'ratio'=>'r250', 'parent'=>13, 'position'=>'>' ),
|
||
15 => array('titre'=>'LIQUIDITE GENERALE', 'stitre'=>'(Act.circulant net/Dettes CT)', 'ratio'=>'r251', 'parent'=>13, 'position'=>'>' ),
|
||
16 => array('titre'=>'LIQUIDITE REDUITE', 'stitre'=>'(Disponibilité et créances réelles /Dettes CT)', 'ratio'=>'r252', 'parent'=>13, 'position'=>'>' ),
|
||
|
||
17 => array('titre'=>'ENDETTEMENT'),
|
||
|
||
18 => array('titre'=>'ENDETTEMENT ', 'stitre'=>'(Dettes a + 1 an / Capitaux propres)', 'ratio'=>'r244', 'parent'=>17, 'position'=>'<' ),
|
||
19 => array('titre'=>'CAPACITE DE REMBOURSEMENT', 'stitre'=>'(Dettes.bancaires.(+MT+LT+C.bail)/CAF)', 'ratio'=>'r247', 'parent'=>17, 'position'=>'<' ),
|
||
20 => array('titre'=>'FINANCEMENT DES STOCKS', 'stitre'=>'(Dettes aux fournisseurs / Stock)', 'ratio'=>'r248', 'parent'=>17, 'position'=>'<' ),
|
||
|
||
21 => array('titre'=>'PRODUCTIVITE'),
|
||
|
||
22 => array('titre'=>'PRODUCTIVITE DE L\'ACTIF', 'stitre'=>'(Chiffre d\'affaire / Actif comptable)', 'ratio'=>'r271', 'parent'=>21, 'position'=>'>' ),
|
||
23 => array('titre'=>'DUREE CLIENT', 'stitre'=>'(Rotation clients en VJ TTC)', 'ratio'=>'r278', 'parent'=>21, 'position'=>'<' ),
|
||
24 => array('titre'=>'DUREE FOURNISSEUR', 'stitre'=>'(Rotation fournisseurs en JA TTC)', 'ratio'=>'r279', 'parent'=>21, 'position'=>'<' ),
|
||
25 => array('titre'=>'POIDS MASSE SALARIALE', 'stitre'=>'(Ch personnel / VA)', 'ratio'=>'r281', 'parent'=>21, 'position'=>'<' ),
|
||
26 => array('titre'=>'RENDEMENT', 'stitre'=>'(Production sur 12mois / Effectif)', 'ratio'=>'r261', 'parent'=>21, 'position'=>'>' ),
|
||
27 => array('titre'=>'PRODUCTIVITE', 'stitre'=>'(CA / Effectif)', 'ratio'=>'r267', 'parent'=>21, 'position'=>'>' ),
|
||
);
|
||
|
||
//Tableau des différents type de bilans
|
||
$typBil = array('C'=>'Consolidé', 'N'=>'', 'S'=>'Réel Simplifié', 'B'=> 'Banque', 'A'=>'Assurance');
|
||
|
||
$numBilanC = 0;
|
||
$numBilanN = 0;
|
||
if(count($bilansInfos)>0)
|
||
{
|
||
foreach($bilansInfos as $key => $item)
|
||
{
|
||
if($item['typeBilan']=='C') { $numBilanC++; }
|
||
if($item['typeBilan']=='N') { $numBilanN++; }
|
||
}
|
||
}
|
||
if($typeBilan=='')
|
||
{
|
||
if($numBilanN>0){ $typeBilan = 'N'; }
|
||
if($numBilanN==0 && $numBilanC>0){ $typeBilan = 'C'; }
|
||
}
|
||
if(count($bilansInfos)>0)
|
||
{
|
||
//En fonction du type de bilan sélectionné
|
||
//on filtre les bilans avant de les envoyer sur l'affichage
|
||
$index = 0;
|
||
foreach($bilansInfos as $key => $item)
|
||
{
|
||
if($item['typeBilan']!=$typeBilan)
|
||
{
|
||
array_splice($bilansInfos, $index, 1);
|
||
//array_splice($ratiosInfos, $index, 1);
|
||
array_splice($ratiosEntrep, $index, 1);
|
||
array_splice($ratiosEntrepEvol, $index, 1);
|
||
$index--;
|
||
}
|
||
$index++;
|
||
}
|
||
}
|
||
|
||
//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">RATIOS</h1>
|
||
|
||
<?php
|
||
$firephp->log($_SESSION, 'SESSION');
|
||
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">
|
||
<?php print $_SESSION['tabInfo']['entrep']['nafEn']; ?> - <?php print $_SESSION['tabInfo']['entrep']['nafEnLib']; ?>
|
||
</td>
|
||
</tr>
|
||
<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 )
|
||
{
|
||
?>
|
||
<?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 }?>
|
||
<?php
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<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>
|
||
<table id="ratios">
|
||
<tbody>
|
||
<?php print ratios_tablerow($ratiosInfos, $tabRatio, $bilan, $ratio);?>
|
||
</tbody>
|
||
</table>
|
||
<?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
|
||
|
||
//=> BLOC COMMENTAIRES
|
||
//=> FIN BLOC COMMENTAIRES
|
||
|
||
//=> BLOC INDISCORE (evaluation conclusion)
|
||
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';
|
||
|
||
$etab = scoresws_indiscore($siret, $siren, $idEntreprise);
|
||
?>
|
||
<h1 class="titre">INDISCORE©</h1>
|
||
<h2>Évaluation</h2>
|
||
<table>
|
||
<tr>
|
||
<td width="30"> </td>
|
||
<td width="550" 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="550" 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>
|
||
<td width="30"> </td>
|
||
<td width="550" 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="550" 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>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/>
|
||
<h3>LE SCORE EST DE <?=$etab['Indiscore']?> SUR 100 POINTS</h3>
|
||
<?php
|
||
if($etab['infoEncours']!='' && !is_numeric($etab['encours']) && $etab['encours']=='N/A'){ ?>
|
||
<h3><?php print $etab['infoEncours'];?></h3>
|
||
<?php
|
||
}else{ ?>
|
||
<?php
|
||
if ($etab['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><?php print $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">
|
||
* Informations confidentielles, ne pas divulguer.
|
||
<br/>
|
||
La reproduction, la rediffusion ou l'extraction automatique par tout moyen d'informations figurant sur les bases de Scores & Decisions est interdite. L'emploi de robots, programmes permettant l'extraction directe de données est rigoureusement interdit sans accord préalable écrit de Scores & Decisions SAS.
|
||
La consultation ou la réception de documents n'entraîne aucun transfert de droit de propriété intellectuelle en faveur de l'utilisateur. Ce dernier s'engage à ne pas rediffuser ou à reproduire les données fournies autrement que pour son usage propre. Les données transmises sont traitées en conformité avec les usages en vigueur. L'utilisateur recherche, sélectionne et interprète les données sous sa propre responsabilité.
|
||
<br/>
|
||
L'extranet Scores & Decisions est un service privé distinct des Journaux Officiels, de l'INPI et de l'INSEE et est édité par SCORES & DECISIONS SAS, RCS VERSAILLES B 494967938, licencié des sources officielles précités.
|
||
</p>
|
||
|
||
</div>
|
||
<?php
|