2009-03-11 07:51:18 +00:00
< ? php
2009-02-17 13:14:53 +00:00
$siret = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'siret' ]));
if ( strlen ( $siret ) <> 0 && strlen ( $siret ) <> 9 && strlen ( $siret ) <> 14 ) die ( 'Param<61> tres incorrects !' );
2009-03-11 07:51:18 +00:00
$idEntreprise = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'idEntreprise' ])) * 1 ; // Si id=0 alors non communiqu<71>
if (( $siret * 1 ) == 0 && $idEntreprise == 0 ) die ( 'Param<61> tres incorrects !' );
2009-02-17 13:14:53 +00:00
$siren = substr ( $siret , 0 , 9 );
function formatPct ( $pct ) {
$pct = round ( $pct / 10 , 0 ) * 10 ;
if ( $pct == 0 ) $pct = 10 ;
return $pct ;
}
if ( ! $_SESSION [ 'connected' ])
echo ( 'Vous devez <20> tre connect<63> afin de pouvoir utiliser cette fonctionnalit<69> ' );
elseif ( ! preg_match ( '/INDISCORE/i' , $_SESSION [ 'tabInfo' ][ 'droits' ]))
echo ( 'Vous n\'avez pas les droits n<> cessaires pour utiliser cette fonctionnalit<69> (2)' );
2009-06-17 14:11:02 +00:00
else {
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-02-17 13:14:53 +00:00
2009-04-01 12:45:45 +00:00
$tabInfo = $_SESSION [ 'tabInfo' ];
2009-02-17 13:14:53 +00:00
try {
$O = $client -> getIndiscore ( $siren );
$etab = $O [ 'result' ];
2009-06-17 14:11:02 +00:00
$iTva = new MTva ( $etab [ 'Siren' ]);
2009-02-17 13:14:53 +00:00
} catch ( SoapFault $fault ) {
2009-05-20 15:49:08 +00:00
require_once 'soaperror.php' ;
2009-02-26 17:16:11 +00:00
processSoapFault ( $client , $fault , $tabInfo );
2009-02-17 13:14:53 +00:00
die ();
}
?>
2009-08-17 14:36:14 +00:00
< div id = " center " >
< h1 class = " titre " > INDISCORE<EFBFBD> </ h1 >
< 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-17 14:36:14 +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-17 14:36:14 +00:00
</ tr >
2009-02-17 13:14:53 +00:00
< ? if ( $etab [ 'NumRC' ] * 1 <> 0 ) { ?>
2009-08-17 14:36:14 +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-17 14:36:14 +00:00
</ tr >
2009-02-17 13:14:53 +00:00
< ? } ?>
2009-08-17 14:36:14 +00:00
< tr >< td colspan = " 3 " >& nbsp ; </ td ></ tr >
</ table >
< h2 > Raison sociale & coordonn<EFBFBD> es </ h2 >
< 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' ];
if ( $etab [ 'Nom2' ] <> '' ) echo '<br/>' . $etab [ 'Nom2' ]; ?> </td>
2009-08-17 14:36:14 +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-17 14:36:14 +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-17 14:36:14 +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-17 14:36:14 +00:00
</ tr >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Date de cr & eacute ; ation de l ' entreprise </ td >
< td width = " 350 " class = " StyleInfoData " >< ? $dateCreation = str_replace ( '-' , '' , $etab [ 'DateCreaEn' ]);
echo WDate :: dateT ( 'Ymd' , 'm/Y' , $dateCreation ); ?> </td>
2009-08-17 14:36:14 +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-17 14:36:14 +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-17 14:36:14 +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' ;
print getSurveillance ( $page , $siret );
?>
</ td >
2009-08-17 14:36:14 +00:00
</ tr >
< tr >< td colspan = " 3 " >& nbsp ; </ td ></ tr >
</ table >
2009-08-17 16:37:10 +00:00
< h2 >& Eacute ; valuation </ h2 >
2009-08-17 14:36:14 +00:00
< table >
< tr >
2009-02-17 13:14:53 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " > L 'évaluation indiScore© c' est en partie bas<EFBFBD> e sur les points notables suivantes :< br />
< 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>
< span class = " percent v<?=formatPct( $etab['ScoreConfor'] )?> " > Conformit & eacute ; </ span >
< img src = " ./img/sgradiant2.png " />
</ 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>
< span class = " percent v<?=formatPct( $etab['ScoreDirigeance'] )?> " > Dirigeance </ span >
< img src = " ./img/sgradiant2.png " />
</ 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>
< span class = " percent v<?=formatPct( $etab['Indiscore'] )?> " > Solvabilit & eacute ; </ span >
< img src = " ./img/sgradiant2.png " />
</ li >
2009-02-17 13:14:53 +00:00
</ ul >
</ div >
</ td >
</ tr >
2009-08-17 14:36:14 +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
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 " >& nbsp ; </ td >
2009-06-17 14:11:02 +00:00
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " >
< i > Pour information , les m<EFBFBD> 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-02-17 13:14:53 +00:00
</ td >
</ tr >
< ? } else { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
2009-06-17 14:11:02 +00:00
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " > La situation financi & egrave ; re de l 'entreprise ne peut <20> tre <20> valu<6C> 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-17 14:36:14 +00:00
< tr >< td colspan = " 3 " >& nbsp ; </ td ></ tr >
</ table >
< 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 />
2009-08-17 14:36:14 +00:00
< h3 > LE SCORE EST DE < ? = $etab [ 'Indiscore' ] ?> SUR 100 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-08-17 14:36:14 +00:00
< h3 >< ? php print $etab [ 'infoEncours' ]; ?> </h3>
2009-06-17 14:11:02 +00:00
< ? php
} else { ?>
< ? php
2009-06-17 15:17:13 +00:00
if ( $etab [ '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 } ?>
< h3 >< ? php print $etab [ 'infoEncours' ]; ?> </h3>
2009-06-17 14:11:02 +00:00
< ? php
}
?>
2009-02-17 13:14:53 +00:00
</ td >
2009-08-17 14:36:14 +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 >
2009-08-17 14:36:14 +00:00
</ div >
2009-02-17 13:14:53 +00:00
< ?
}
?>