561 lines
15 KiB
PHP
561 lines
15 KiB
PHP
<?php
|
|
//Traitement des paramètres
|
|
if (!page_checkParams()) die('Paramètres incorrects !');
|
|
|
|
require_once 'scoresws/scoresws.php';
|
|
require_once 'scoresws/identite.php';
|
|
require_once 'common/dates.php';
|
|
require_once 'utils.php';
|
|
|
|
function dRow($lib, $data, $title = '')
|
|
{
|
|
$html = '<tr>'."\n";
|
|
$html.= ' <td width="30"> </td>'."\n";
|
|
$html.= ' <td width="200" class="StyleInfoLib">'.$lib.'</td>'."\n";
|
|
|
|
if($title!='') $title = ' title="'.$title.'"';
|
|
$html.= ' <td width="350" class="StyleInfoData"'.$title.'>'.$data.'</td>'."\n";
|
|
$html.= '</tr>'."\n";
|
|
return $html;
|
|
}
|
|
|
|
$etab = scoresws_identite($siret, $siren, $idEntreprise);
|
|
?>
|
|
<div id="center">
|
|
<h1>RAPPORT DE SYNTHESE</h1>
|
|
<table>
|
|
<?php
|
|
//Siret siege
|
|
$element = formatElement('identite', 'siretsiege', array($etab['SiretSiege']));
|
|
echo dRow($element['lib'], $element['data']);
|
|
|
|
//Numéro RC
|
|
$element = formatElement('identite', 'numrc', array($etab['NumRC'], $etab['TribunalLib'], $etab['NumRM']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
|
|
|
//Actif INSEE
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Entreprise active INSEE</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('/\bAVISINSEE\b/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>
|
|
</table>
|
|
|
|
<?php
|
|
require_once 'surveillance/surveillance_identite.php';
|
|
?>
|
|
|
|
<h2>Raison sociale & Coordonnées</h2>
|
|
<table>
|
|
<?php
|
|
//Nom
|
|
$element = formatElement('identite', 'raisonsociale', array($etab['Nom'], $etab['Nom2'], $etab['NomLong']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
|
|
|
// Forme juridique
|
|
$element = formatElement('identite', 'fj',
|
|
array($etab['FJ' ], $etab['FJ_lib' ],
|
|
(isset($etab['FJ2'])) ? $etab['FJ2'] : '',
|
|
$etab['FJ2_Lib']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
|
|
|
//Date d'immatriculation
|
|
$element = formatElement('identite', 'dateimmat', array($etab['DateImmat']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
|
|
|
//Date de création de l'établissement
|
|
$element = formatElement('identite', 'datecreaet', array($etab['DateCreaEt']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
|
|
|
//Adresse
|
|
$element = formatElement('identite', 'adresse',
|
|
array(
|
|
$etab['Adresse'],
|
|
$etab['Adresse2'],
|
|
$etab['AdresseNum'],
|
|
$etab['AdresseRue'],
|
|
$etab['CP'],
|
|
$etab['Ville'],
|
|
$etab['Pays'],
|
|
$etab['AdresseDom'],
|
|
$etab['AdresseDomEnt'],
|
|
$etab['AdresseDomNb'])
|
|
);
|
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
|
?>
|
|
</table>
|
|
|
|
<h2>Activité(s) & Chiffre d'affaire</h2>
|
|
<table>
|
|
<?php
|
|
//Activité de l'entreprise
|
|
$element = formatElement('identite', 'activiteen', array($etab['Activite'], $etab['NafEnt'], $etab['NafEntLib']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
|
|
|
//NAF4
|
|
$element = formatElement('identite', 'naf4', array($etab['Naf4Ent'], $etab['Naf4EntLib'], $etab['Naf4Etab'], $etab['Naf4EtabLib']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
|
|
|
//Origine du fond
|
|
$element = formatElement('identite', 'originefond', array($etab['OrigineCreation']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
|
|
|
//Chiffre d'affaire
|
|
$element = formatElement('identite', 'ca', array($etab['Bilan'], $etab['TrancheCALib'], $etab['AnneeTCA']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
|
|
|
//Capital
|
|
$element = formatElement('identite', 'capital', array($etab['Capital'], $etab['CapitalDev'], $etab['CapitalLib'], $etab['CapitalType'], $etab['Bilan']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
|
|
|
//Type d'exploitation
|
|
$element = formatElement('identite', 'typeexploitation', array($etab['TypeExploitation']));
|
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
|
?>
|
|
</table>
|
|
|
|
<h2>Dirigeants</h2>
|
|
<?php
|
|
$dirs = scoresws_dirigeants($siret, $siren, $idEntreprise);
|
|
?>
|
|
<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]=<?=$societe?>" title="Recherche à partir de la raison sociale">
|
|
<?=$societe;?>
|
|
</a>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
if($nom != ''){
|
|
?>
|
|
<a href="/?page=recherche&vue=list&formR[type]=dir&formR[dirNom]=<?=$dir['Nom']?>&formR[dirPrenom]=<?=$dir['Prenom']?>&formR[dirDateNaissJJ]=<?=substr($dir['NaissDate'],0,2)?>&formR[dirDateNaissMM]=<?=substr($dir['NaissDate'],3,2)?>&formR[dirDateNaissAAAA]=<?=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>
|
|
|
|
|
|
|
|
<h2>Actionnaires</h2>
|
|
<?php
|
|
require_once 'partenaires/classMTva.php';
|
|
require_once 'partenaires/classMMap.php';
|
|
|
|
$liens = scoresws_liens($siret, $siren, $idEntreprise);
|
|
?>
|
|
<table>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td colspan="2" width="550" class="StyleInfoData">
|
|
<table>
|
|
<?php
|
|
if( ($_SESSION['tabInfo']['entrep']['fj']>=1000 && $_SESSION['tabInfo']['entrep']['fj']<=1999)
|
|
|| ($_SESSION['tabInfo']['entrep']['fj']>=10 && $_SESSION['tabInfo']['entrep']['fj']<=19) )
|
|
{
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="550" colspan="2" class="StyleInfoData">Cette entreprise est une personne physique.</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
if (@count($liens['actionnaires'])>0)
|
|
{
|
|
foreach ($liens['actionnaires'] as $i=>$lien)
|
|
{
|
|
if ($lien['Actif']==0)
|
|
{
|
|
$font1='<font color="gray"><i>';
|
|
$font2='</i></font>';
|
|
} else
|
|
$font1=$font2='';
|
|
?>
|
|
<tr>
|
|
<td class="StyleInfoData" width="100">
|
|
<?php
|
|
echo $font1;
|
|
if ($lien['Pmin']*1>0) echo $lien['Pmin'].' %';
|
|
elseif ($lien['MajMin']=='+') echo 'major.';
|
|
elseif ($lien['MajMin']=='-') echo 'minor.';
|
|
elseif ($lien['MajMin']=='C') echo 'major.';
|
|
elseif ($lien['MajMin']=='S') echo 'minor.';
|
|
else echo ' ';
|
|
echo $font2;
|
|
?>
|
|
</td>
|
|
<td class="StyleInfoLib" width="300">
|
|
<?php
|
|
echo $font1;
|
|
echo utf8_decode($lien['RaisonSociale']);
|
|
echo $font2;
|
|
?>
|
|
</td>
|
|
<td class="StyleInfoData" width="150">
|
|
<?php
|
|
echo $font1;
|
|
if ( $lien['Siren']<>'' && $lien['Siren']<>0)
|
|
{
|
|
echo 'Siren <a href="./?page=identite&siret='. $lien['Siren'] .'">'. $lien['Siren'].'</a>';
|
|
}
|
|
else ' ';
|
|
|
|
if ($lien['Pays']<>'France') echo '<b>'.utf8_decode($lien['Pays']).'</b>';
|
|
echo $font2;
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
} //Fin pour chaque actionnaire
|
|
} else {
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="550" colspan="2" class="StyleInfoData">Aucun actionnaire référencé par nos services</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}//Fin test personne physique
|
|
?>
|
|
<tr><td colspan="3"> </td></tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<h2>Participations</h2>
|
|
<table>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td colspan="2" width="550" class="StyleInfoData">
|
|
<table>
|
|
<?php
|
|
if (@count($liens['participations'])>0)
|
|
{
|
|
foreach ($liens['participations'] as $i=>$lien)
|
|
{
|
|
if ($lien['Actif']==0) {
|
|
$font1='<font color="gray"><i>';
|
|
$font2='</i></font>';
|
|
} else
|
|
$font1=$font2='';
|
|
?>
|
|
<tr>
|
|
<td class="StyleInfoData" width="100">
|
|
<?php
|
|
echo $font1;
|
|
if ($lien['Pmin']*1>0) echo $lien['Pmin'].' %';
|
|
elseif ($lien['MajMin']=='+') echo 'major.';
|
|
elseif ($lien['MajMin']=='-') echo 'minor.';
|
|
elseif ($lien['MajMin']=='C') echo 'major.';
|
|
elseif ($lien['MajMin']=='S') echo 'minor.';
|
|
else echo ' ';
|
|
echo $font2;
|
|
?>
|
|
</td>
|
|
<td class="StyleInfoLib" width="300"><?
|
|
echo $font1;
|
|
echo utf8_decode($lien['RaisonSociale']);
|
|
echo $font2;
|
|
?>
|
|
</td>
|
|
<td class="StyleInfoData" width="150"><?
|
|
echo $font1;
|
|
if ( $lien['Siren']<>'' && $lien['Siren']<>0) {
|
|
echo 'Siren <a href="./?page=identite&siret='. $lien['Siren'] .'">'. $lien['Siren'].'</a>';
|
|
}
|
|
else ' ';
|
|
|
|
if ($lien['Pays']<>'France') echo '<b>'.utf8_decode($lien['Pays']);
|
|
echo $font2;?></b>
|
|
</td>
|
|
</tr>
|
|
<?
|
|
} // Fin pour chaque participations
|
|
}else{
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="550" colspan="2" class="StyleInfoData">Aucune participation référencée par nos services</td>
|
|
</tr>
|
|
<?
|
|
}//Fin conditions participations
|
|
?>
|
|
<tr><td colspan="3"> </td></tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<h2>Eléments Financiers</h2>
|
|
<?php
|
|
require_once 'ratios/ratios.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'];
|
|
|
|
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_datagraphmin($bilansInfos, $ratiosEntrep);
|
|
$dataGraph = $data['graph'];
|
|
$dataEvol = $data['evol'];
|
|
|
|
if ($numBilanN==0 && $numBilanC==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"></th>
|
|
<th class="date" colspan="2"><?=synthese_formatdateCloture($bilansInfos, 2)?></th>
|
|
<th class="date" colspan="2"><?=synthese_formatdateCloture($bilansInfos, 1)?></th>
|
|
<th class="date" colspan="2"><?=synthese_formatdateCloture($bilansInfos, 0)?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?=synthese_tablerowmin($ratiosInfos, $dataEvol)?>
|
|
</tbody>
|
|
</table>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<h2>Paiements</h2>
|
|
<?php
|
|
require_once 'partenaires/classMCoface.php';
|
|
|
|
$etab = scoresws_indiscore($siret, $siren, $idEntreprise);
|
|
$firephp->log($etab,'indiscore');
|
|
?>
|
|
<table>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="550" colspan="2" class="StyleInfoData">
|
|
<?=html_entity_decode($etab['infoPaiement'])?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Procédures collectives</h2>
|
|
<table>
|
|
<?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']));
|
|
}
|
|
?>
|
|
<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 echo $dateRadiation; } ?>
|
|
<?php
|
|
}/*else{
|
|
if($dateRadiation!=''){ ?>Radié du RCS le <?php print $dateRadiation; }
|
|
}*/
|
|
//Radiation
|
|
elseif($etab['SituationJuridique']=='RR')
|
|
{
|
|
?> Radié du RCS <?php if($dateRadiation!=''){ ?> le <?php echo $dateRadiation; }
|
|
}elseif($etab['SituationJuridique']=='RP'){
|
|
?> Radiation publiée <?php if($dateRadiation!=''){ ?> le <?php echo $dateRadiation; }
|
|
}else{
|
|
?>Aucune procédure enregistrée à ce jour par nos services.<?php
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
// Fin Situation juridique
|
|
?>
|
|
</table>
|
|
|
|
<h2>Scores et encours</h2>
|
|
<table>
|
|
<?php
|
|
if(!empty($etab['scores']['ConanH']))
|
|
{
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Score Conan Holder</td>
|
|
<td width="350" class="StyleInfoData scoreTip" titre="Score Conan Holder" rel="./?page=scorestooltip&score=conanh&val=<?=$etab['scores']['ConanH']?>">
|
|
<?=$etab['scores']['ConanH']?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
if(!empty($etab['scores']['Afdcc2']))
|
|
{
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Score Afdcc 2</td>
|
|
<td width="350" class="StyleInfoData scoreTip" titre="Score Afdcc2" rel="./?page=scorestooltip&score=afdcc2&val=<?=$etab['scores']['Afdcc2']?>">
|
|
<?=$etab['scores']['Afdcc2']?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
if(!empty($etab['scores']['Z']))
|
|
{
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Score Z</td>
|
|
<td width="350" class="StyleInfoData scoreTip" titre="Score Z" rel="./?page=scorestooltip&score=scorez&val=<?=$etab['scores']['Z']?>">
|
|
<?=$etab['scores']['Z']?>
|
|
</td>
|
|
</tr>
|
|
<?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;
|
|
}
|
|
|
|
if(!empty($indiscore))
|
|
{
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">IndiScore</td>
|
|
<td width="350" class="StyleInfoData scoreTip" titre="Indiscore"
|
|
rel="./?page=scorestooltip&score=indiscore&val=<?=$indiscore?>">
|
|
<?=$indiscore?> (<?=$etab['TendanceIndiscore']?>)
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Encours conseillé</td>
|
|
<td width="350" class="StyleInfoData">
|
|
<?php
|
|
if($etab['infoEncours']!='' && !is_numeric($etab['encours']) && $etab['encours']=='N/A'){
|
|
?><?=$etab['infoEncours']?>
|
|
<?php
|
|
}else{
|
|
if ($etab['Indiscore']!=0)
|
|
{
|
|
?>
|
|
<?=round($etab['encours']/1000)?> K€
|
|
<?php
|
|
}
|
|
?>
|
|
<?php print $etab['infoEncours'];?>
|
|
<?php
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<p class="confidentiel blockh2">
|
|
<?php
|
|
require_once 'cgu/cgu.php';
|
|
echo afficheCgu();
|
|
?>
|
|
</p>
|
|
</div>
|