2009-03-11 07:51:18 +00:00
< ? php
2010-04-27 08:09:23 +00:00
if ( ! page_checkParams ()) die ( 'Paramètres incorrects !' );
2009-02-17 13:14:53 +00:00
function formatPct ( $pct ) {
$pct = round ( $pct / 10 , 0 ) * 10 ;
if ( $pct == 0 ) $pct = 10 ;
return $pct ;
}
2009-08-27 07:28:00 +00:00
require_once 'cache/cache.php' ;
2009-05-20 15:49:08 +00:00
require_once 'partenaires/classMTva.php' ;
require_once 'partenaires/classMMap.php' ;
require_once 'partenaires/classMCoface.php' ;
require_once 'common/dates.php' ;
2009-10-08 13:20:51 +00:00
require_once 'scoresws/scoresws.php' ;
2009-02-17 13:14:53 +00:00
2009-04-01 12:45:45 +00:00
$tabInfo = $_SESSION [ 'tabInfo' ];
2009-10-08 13:20:51 +00:00
$etab = scoresws_indiscore ( $siret , $siren , $idEntreprise );
2009-02-17 13:14:53 +00:00
?>
2009-08-27 07:28:00 +00:00
< div id = " center " >
2010-02-10 17:27:03 +00:00
< h1 class = " titre " > INDISCORE© </ h1 >
2009-08-27 07:28:00 +00:00
< table >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; ro identifiant Siren </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = substr ( $etab [ 'Siren' ], 0 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 3 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 6 , 3 ) ?> </td>
2009-08-27 07:28:00 +00:00
</ tr >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; ro identifiant Siret du si & egrave ; ge </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = substr ( $etab [ 'Siren' ], 0 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 3 , 3 ) . ' ' . substr ( $etab [ 'Siren' ], 6 , 3 ) . ' ' . substr ( $etab [ 'Siret' ], - 5 ) ?> </td>
2009-08-27 07:28:00 +00:00
</ tr >
2010-04-09 14:55:22 +00:00
< ? if ( isset ( $etab [ 'NumRC' ]) == true && $etab [ 'NumRC' ] * 1 <> 0 ) { ?>
2009-08-27 07:28:00 +00:00
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; ro R . C .</ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'NumRC' ] ?> </td>
2009-08-27 07:28:00 +00:00
</ tr >
2009-02-17 13:14:53 +00:00
< ? } ?>
2009-08-27 07:28:00 +00:00
< tr >< td colspan = " 3 " >& nbsp ; </ td ></ tr >
</ table >
2010-02-10 17:27:03 +00:00
< h2 > Raison sociale & amp ; coordonnées </ h2 >
2009-08-27 07:28:00 +00:00
< table >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'Nom' ];
2010-04-09 14:55:22 +00:00
if ( isset ( $etab [ 'Nom2' ]) == true && $etab [ 'Nom2' ] <> '' ) {
echo '<br/>' . $etab [ 'Nom2' ];
} ?> </td>
2009-08-27 07:28:00 +00:00
</ tr >
2009-02-17 13:14:53 +00:00
< ?
if ( $etab [ 'Enseigne' ] <> '' && $etab [ 'Sigle' ] <> '' ) { $titre = 'Enseigne / Sigle' ; $lib = $etab [ 'Enseigne' ] . ' / ' . $etab [ 'Sigle' ]; }
elseif ( $etab [ 'Enseigne' ] <> '' && $etab [ 'Sigle' ] == '' ) { $titre = 'Enseigne' ; $lib = $etab [ 'Enseigne' ]; }
elseif ( $etab [ 'Enseigne' ] == '' && $etab [ 'Sigle' ] <> '' ) { $titre = 'Sigle' ; $lib = $etab [ 'Sigle' ]; }
else $titre = '' ;
if ( $titre <> '' ) {
2009-08-27 07:28:00 +00:00
?>
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " >< ? = $titre ?> </td>
< td width = " 350 " class = " StyleInfoData " >< ? = $lib ?> </td>
2009-08-27 07:28:00 +00:00
</ tr >< ? } ?>
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Forme juridique </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'FJ_lib' ]; //@todo INSEE //.' ('.$etab['FJ']?></td>
2009-08-27 07:28:00 +00:00
</ tr >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
2010-04-09 14:55:22 +00:00
< td width = " 200 " class = " StyleInfoLib " > Date de cr & eacute ; ation de l ' entreprise </ td >
2009-02-17 13:14:53 +00:00
< td width = " 350 " class = " StyleInfoData " >< ? $dateCreation = str_replace ( '-' , '' , $etab [ 'DateCreaEn' ]);
2010-04-09 14:55:22 +00:00
$date = new WDate ;
print $date -> dateT ( 'Ymd' , 'm/Y' , $dateCreation ); ?> </td>
2009-08-27 07:28:00 +00:00
</ tr >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Adresse </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'Adresse' ] ?> <br/>
< ? if ( $etab [ 'Adresse2' ] <> '' ) echo $etab [ 'Adresse2' ] . '<br/>' ; ?>
< ? = $etab [ 'CP' ] ?> <?=$etab['Ville']?></td>
2009-08-27 07:28:00 +00:00
</ tr >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > T & eacute ; l & eacute ; phone </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'Tel' ] ?> </td>
2009-08-27 07:28:00 +00:00
</ tr >
< tr >
2009-05-20 15:49:08 +00:00
< td width = " 30 " >& nbsp ; </ td >
2009-05-22 12:26:07 +00:00
< td colspan = " 2 " width = " 550 " class = " StyleInfoData " >
2009-06-17 14:11:02 +00:00
< ? php
2009-05-20 15:49:08 +00:00
require_once 'surveillance/surveillance.php' ;
2009-12-15 17:14:21 +00:00
echo getSurveillance ( 'score' , $siret );
2009-05-20 15:49:08 +00:00
?>
</ td >
2009-08-27 07:28:00 +00:00
</ tr >
< tr >< td colspan = " 3 " >& nbsp ; </ td ></ tr >
</ table >
< h2 >& Eacute ; valuation </ h2 >
< table >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
2010-02-10 17:27:03 +00:00
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " > L ' & eacute ; valuation indiScore & copy ; est en partie basée sur les points notables suivants :< br />
2009-02-17 13:14:53 +00:00
< h3 >< u > Conformit & eacute ; l & eacute ; gale :</ u ></ h3 >
< div class = " stats gradiant_pic " >
< ul >
2009-04-02 14:52:51 +00:00
< li >
< i >< ? = $etab [ 'AnalyseConfor' ] ?> </i>
2009-09-24 16:05:13 +00:00
< div class = " blocdegrade clearfix " >
< span class = " textdegrade " > Conformit & eacute ; </ 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 >
2009-04-02 14:52:51 +00:00
</ li >
2009-02-17 13:14:53 +00:00
</ ul >
</ div >
< h3 >< u > Dirigeance :</ u ></ h3 >
< div class = " stats gradiant_pic " >
< ul >
2009-04-02 14:52:51 +00:00
< li >
< i >< ? = $etab [ 'AnalyseDirigeance' ] ?> </i>
2009-09-24 16:05:13 +00:00
< 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 >
2010-04-09 14:55:22 +00:00
</ div >
2009-04-02 14:52:51 +00:00
</ li >
2009-02-17 13:14:53 +00:00
</ ul >
</ div >
< h3 >< u > Solvabilit & eacute ; :</ u ></ h3 >
< div class = " stats gradiant_pic " >
< ul >
2009-04-02 14:52:51 +00:00
< li >
< i > L 'analyse de la solvabilité est <?=$etab[' AnalyseSolvabilite ' ] ?> </i>
2009-09-24 16:05:13 +00:00
< div class = " blocdegrade clearfix " >
< span class = " textdegrade " > Solvabilit & eacute ; </ 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 >
2010-04-09 14:55:22 +00:00
</ div >
2009-04-02 14:52:51 +00:00
</ li >
2009-02-17 13:14:53 +00:00
</ ul >
</ div >
</ td >
</ tr >
2009-08-27 07:28:00 +00:00
< ?
$millesimeMax = date ( 'Ymd' , mktime ( 0 , 0 , 0 , date ( 'm' ), date ( 'd' ), date ( 'Y' ) - 2 ));
if ( $etab [ 'NbBilansScore' ] > 0 && $etab [ 'Bilans' ][ 0 ][ 'Millesime' ] >= $millesimeMax )
{
?>
2009-02-17 13:14:53 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
2009-07-22 16:59:19 +00:00
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " > A la lecture du dernier bilan , la situation financi & egrave ; re de l 'entreprise <?=$etab[' Nom ']?> est <b><?=$etab[' tabInfosNotations '][' SituationFinanciere ' ] ?> </b>.<br/>
2009-02-17 13:14:53 +00:00
<!-- Cette notation financi & egrave ; re est < ? = $etab [ 'tabInfosNotations' ][ 'Notation' ] ?> .<br/>-->
< ? php
2010-02-10 17:27:03 +00:00
if ( html_entity_decode ( $etab [ 'tabInfosNotations' ][ 'ProbabiliteDefaut' ]) <> 'En défaut' )
2009-02-17 13:14:53 +00:00
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>
2010-04-09 14:55:22 +00:00
</ tr >
2009-12-18 09:21:50 +00:00
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
2009-06-17 14:11:02 +00:00
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >
2010-02-10 17:27:03 +00:00
< i > Pour information , les méthodes standards donnent : Conan & amp ; Holder = < b >< ? = $etab [ 'scores' ][ 'ConanH' ] ?> </b>, Afdcc2 = <b><?=$etab['scores']['Afdcc2']?></b> et Score Z = <b><?=$etab['scores']['Z']?></b>.</i>
2009-06-17 14:11:02 +00:00
2009-02-17 13:14:53 +00:00
</ td >
</ tr >
< ? } else { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
2010-02-10 17:27:03 +00:00
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " > La situation financi & egrave ; re de l 'entreprise ne peut être évaluée en détail car <?if ($etab[' Bilans '][0][' Millesime ']<$millesimeMax && count($etab[' Bilans ' ]) > 0 ) {
2009-02-17 13:14:53 +00:00
echo 'le dernier bilan disponible date de ' . substr ( $etab [ 'Bilans' ][ 0 ][ 'Millesime' ], 0 , 4 ) . '.' ;
} else {
echo 'aucun bilan n\'est disponible.' ;
} ?> </td>
</ tr >
< ? } ?>
2009-08-27 07:28:00 +00:00
< tr >< td colspan = " 3 " >& nbsp ; </ td ></ tr >
</ table >
2010-01-13 12:52:14 +00:00
< h2 > Paiements </ h2 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >
< ? = html_entity_decode ( $etab [ 'infoPaiement' ]) ?>
</ td >
</ tr >
</ table >
2009-08-27 07:28:00 +00:00
< h2 > Conclusion </ h2 >
< table >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
2009-06-17 14:11:02 +00:00
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >
Compte tenu des informations disponibles aupr & egrave ; s des sources officielles Scores et D & eacute ; cisions pr & eacute ; sente la conclusion suivante :< br />
2010-04-09 14:55:22 +00:00
< ? php
2010-01-13 16:29:44 +00:00
switch ( $_SESSION [ 'tabInfo' ][ 'typeScore' ])
{
case '20' :
$maxIndiscore = $_SESSION [ 'tabInfo' ][ 'typeScore' ];
$indiscore = $etab [ 'Indiscore20' ];
break ;
case '100' :
default :
2010-01-15 17:46:47 +00:00
$maxIndiscore = empty ( $_SESSION [ 'tabInfo' ][ 'typeScore' ]) ? '100' : $_SESSION [ 'tabInfo' ][ 'typeScore' ];
2010-01-13 16:29:44 +00:00
$indiscore = $etab [ 'Indiscore' ];
break ;
}
?>
< h3 > LE SCORE EST DE < ? = $indiscore ?> SUR <?=$maxIndiscore?> POINTS</h3>
2009-06-17 14:11:02 +00:00
< ? php
2009-06-17 15:17:13 +00:00
if ( $etab [ 'infoEncours' ] != '' && ! is_numeric ( $etab [ 'encours' ]) && $etab [ 'encours' ] == 'N/A' ){ ?>
2009-12-04 17:17:09 +00:00
< h3 >< ? = $etab [ 'infoEncours' ]; ?> </h3>
2009-06-17 14:11:02 +00:00
< ? php
} else { ?>
< ? php
2010-01-13 16:29:44 +00:00
if ( $indiscore != 0 ) { ?>
2009-06-17 14:11:02 +00:00
< i > La tendance de la note est < ? = $etab [ 'TendanceIndiscore' ] ?> </i>
< h3 > L 'ENCOURS MAXIMUM CONSEILLÉ EST DE <?=round($etab[' encours ' ] / 1000 ) ?> K€</h3>
2009-06-17 15:17:13 +00:00
< ? php } ?>
2009-12-04 17:17:09 +00:00
< h3 >< ? = $etab [ 'infoEncours' ]; ?> </h3>
2009-06-17 14:11:02 +00:00
< ? php
}
?>
2009-02-17 13:14:53 +00:00
</ td >
2009-08-27 07:28:00 +00:00
</ tr >
< tr >< td colspan = " 3 " align = " center " >< img src = " ./img/logo_indiscore.png " /></ td ></ tr >
2009-02-17 13:14:53 +00:00
</ table >
2010-04-12 14:49:55 +00:00
< p class = " confidentiel blockh2 " >
< ? php
require_once 'cgu/cgu.php' ;
echo afficheCgu ();
?>
</ p >
2009-08-27 07:28:00 +00:00
</ div >
2009-02-17 13:14:53 +00:00
< ?
2010-04-09 14:55:22 +00:00
// --------------------------------------------------------------------------- //
// Export
// --------------------------------------------------------------------------- //
require_once 'export.php' ;
if ( isset ( $siret ) == true ) {
$fileName = $page . '-' . $siret ;
} else {
$fileName = $page . '-' . $idEntreprise ;
}
2010-05-24 12:24:02 +00:00
$export = array ( 'siren' => $etab [ 'Siren' ],
'siretSiege' => $etab [ 'Siret' ],
'raisonSociale' => $etab [ 'Nom' ],
'analyseConformite' => $etab [ 'AnalyseConfor' ],
'scoreConformite' => $etab [ 'ScoreConfor' ],
'analyseDirigeance' => $etab [ 'AnalyseDirigeance' ],
'scoreDirigeance' => $etab [ 'ScoreDirigeance' ],
'analyseSolvabilite' => $etab [ 'AnalyseSolvabilite' ],
'scoreSolvabilite' => $etab [ 'ScoreSolvabilite' ],
'situationFinanciere' =>
$etab [ 'tabInfosNotations' ][ 'SituationFinanciere' ],
'probabiliteDefaut' =>
$etab [ 'tabInfosNotations' ][ 'ProbabiliteDefaut' ],
'conanHolder' => $etab [ 'scores' ][ 'ConanH' ],
'afdcc2' => $etab [ 'scores' ][ 'Afdcc2' ],
'scoreZ' => $etab [ 'scores' ][ 'Z' ],
'paiement' => $etab [ 'infoPaiement' ],
'indiscore' => $indiscore ,
'indiscoreMax' => $maxIndiscore ,
'tendance' => $etab [ 'TendanceIndiscore' ],
'encoursMaxConseille' => $etab [ 'encours' ]);
2010-04-09 14:55:22 +00:00
$parseTab = new tabExport ;
2010-05-24 12:24:02 +00:00
$parseTab -> tab = array ( $export );
2010-04-09 14:55:22 +00:00
$parseTab -> type = array ();
$array2csv = new ExportCSV ;
$array2csv -> records = $parseTab -> convertTable ();
$array2csv -> writeCSV ( $fileName );
$array2xml = new ExportXML ;
2010-05-24 12:24:02 +00:00
$array2xml -> rootName = $page ;
$array2xml -> records = $export ;
2010-04-09 14:55:22 +00:00
$array2xml -> writeXML ( $fileName );
2009-02-17 13:14:53 +00:00
?>