2009-09-24 09:26:55 +00:00
< ? php
if ( ! $_SESSION [ 'connected' ]) die ();
//Traitement des param<61> tres
$siret = trim ( preg_replace ( '/[^0-9]/' , '' , $_REQUEST [ 'siret' ]));
if ( strlen ( $siret ) <> 0 && strlen ( $siret ) <> 9 && strlen ( $siret ) <> 14 ) die ( 'Param<61> tres incorrects !' );
$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 !' );
$siren = substr ( $siret , 0 , 9 );
2009-10-08 07:51:36 +00:00
?>
< style >
. confidentiel { font - style : italic ; font - size : 9 px ;}
</ style >
< div id = " center " >
< h1 > RAPPORT DE SYNTHESE </ h1 >
< p > Soci<EFBFBD> t<EFBFBD> : </ p >
< ? php
2009-09-24 09:26:55 +00:00
require_once 'utils.php' ;
require_once 'common/dates.php' ;
require_once 'cache/cache.php' ;
require_once 'user/user.php' ;
2009-10-08 07:51:36 +00:00
require_once 'logos/logos.php' ;
2009-09-24 09:26:55 +00:00
require_once 'scoresws/scoresws.php' ;
2009-10-07 08:33:27 +00:00
2009-10-08 07:51:36 +00:00
//=> BLOC IDENTITE
$etab = scoresws_identite ( $siret , $siren , $idEntreprise );
?>
< h1 class = " titre " > IDENTIT & Eacute ; DE L ' ENTREPRISE </ h1 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; 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 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; ro identifiant Siret du si & egrave ; 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 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num & eacute ; 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<69> . Obligatoire sur factures, d<> clarations d\'<27> change de biens et de TVA !">' ;
}
?>
</ td >
</ tr >
< ? php
if ( $etab [ 'Isin' ] <> '' )
{
$bourse = $etab [ 'Bourse' ];
?>
< tr >
< td width = " 30 " >& nbsp ; </ 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 " >& nbsp ; </ 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 <20> 0 OU si le siren est inf<6E> 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 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Logo </ td >
< td width = " 350 " class = " StyleInfoData " >< img src = " <?= $urlImg ?> " < ? = $strSize ?> /></td>
</ tr >
< ?
}
?>
2009-10-07 08:33:27 +00:00
2009-10-08 07:51:36 +00:00
< ? php
//Num<75> ro RC
$flagNewRC = FALSE ;
if ( isset ( $etab [ 'NumRC' ]) && $etab [ 'NumRC' ] != '' ) {
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Num<EFBFBD> ro R . C .</ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'NumRC' ] ?> </td>
</ tr >
< ? php
$flagNewRC = TRUE ;
}
?>
2009-10-07 08:33:27 +00:00
2009-10-08 07:51:36 +00:00
< ? php
//Autre identifiant : Num<75> ro WALDEC ou ancien num<75> 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 " >& nbsp ; </ 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 >
< ?
}
?>
2009-10-07 08:33:27 +00:00
2009-10-08 07:51:36 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Etablissement actif
< ? php
if ( $etab [ 'Siege' ] == 0 )
echo '<br/><a title="Voir la fiche d\'identit<69> du si<73> ge de l\'entreprise" href="/?page=identite&siret=' . $etab [ 'Siren' ] . '&idEntreprise=' . $idEntreprise . '">Accès <20> 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<69> 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 >
2009-10-07 08:33:27 +00:00
2009-10-08 07:51:36 +00:00
< ? 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' );
2009-10-07 08:33:27 +00:00
2009-10-08 07:51:36 +00:00
if ( $etab [ 'SituationJuridique' ] == 'P' || $etab [ 'SituationJuridique' ][ 0 ] == 'R' || $_SESSION [ 'tabInfo' ][ 'mode_edition' ] == 1 )
{
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Situation juridique </ td >
< td width = " 350 " class = " StyleInfoData " >
< ? php
}
2009-10-07 08:33:27 +00:00
2009-10-08 07:51:36 +00:00
//Proc<6F> dure collective
if ( $etab [ 'SituationJuridique' ] == 'P' )
{
?>
< a href = " ./?page=annonces&siret=<?= $etab['Siret'] ?>&idEntreprise=<?= $idEntreprise ?> " >
< font color = " red " >< b > En proc & eacute ; dure collective </ b ></ font >
</ a >
< ? php if ( $dateRadiation != '' ){ ?> <br/>Radi<64> du RCS le <?php print $dateRadiation; } ?>
< ? php
} /* else {
if ( $dateRadiation != '' ){ ?> Radi<EFBFBD> du RCS le <?php print $dateRadiation; }
} */
//Radiation
if ( $etab [ 'SituationJuridique' ] == 'RR' )
{
?> Radi<64> du RCS <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
} elseif ( $etab [ 'SituationJuridique' ] == 'RP' ){
?> Radiation publi<6C> 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
2009-09-24 09:26:55 +00:00
?>
2009-10-08 07:51:36 +00:00
</ table >
< h2 > Raison sociale & Coordonn<EFBFBD> es </ h2 >
< table >
< ? php
//Nom
$title = '' ;
if ( isset ( $etab [ 'NomLong' ]) && $etab [ 'NomLong' ] != '' && $etab [ 'NomLong' ] != $etab [ 'Nom' ] )
$title = $etab [ 'NomLong' ];
?>
< tr >
< td width = " 30 " >& nbsp ; </ 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 " >& nbsp ; </ 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 " >& nbsp ; </ 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 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Date d ' immatriculation </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $dateImmat ?> </td>
</ tr >
< ? php
}
?>
< ? php
//Date de cr<63> ation de l'entreprise
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Cr & eacute ; 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<63> ation de l'<27> tablissement
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Cr & eacute ; ation de l ' & eacute ; 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 " >& nbsp ; </ 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 <20> 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<69> 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 ] => 11270 ZF
[ CUCS ] => OUI
[ NCUCS ] => 1127020
) */
?>
< tr >
< td width = " 30 " >& nbsp ; </ 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/>' ;
2009-09-24 09:26:55 +00:00
2009-10-08 07:51:36 +00:00
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<EFBFBD> phone
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > T & eacute ; l & eacute ; phone </ td >
< td width = " 350 " class = " StyleInfoData " >
< div class = " txtAdresse " >
< p >
< ? php
if ( trim ( $etab [ 'Tel' ]) == '' ) echo 'N/C' ;
else echo $etab [ 'Tel' ];
2009-10-07 08:33:27 +00:00
2009-10-08 07:51:36 +00:00
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 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Fax </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $etab [ 'Fax' ] ?> </td>
</ tr >
< ?
}
2009-09-24 09:26:55 +00:00
2009-10-08 07:51:36 +00:00
//Site web
if ( $etab [ 'Web' ] != '' )
{
if ( substr ( $web , 0 , 7 ) != 'http://' ) $siteWeb = 'http://' . $etab [ 'Web' ];
else $siteWeb = $etab [ 'Web' ];
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Site Internet </ td >
< td width = " 350 " class = " StyleInfoData " >< a href = " <?= $siteWeb ?> " target = " _blank " >< ? = $siteWeb ?> </a></td>
</ tr >
< ?
}
2009-09-24 09:26:55 +00:00
2009-10-08 07:51:36 +00:00
//Email
if ( trim ( $etab [ 'Mail' ]) <> '' ) { ?>
< tr >
< td width = " 30 " >& nbsp ; </ 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 >
< ?
}
2009-09-24 09:26:55 +00:00
?>
2009-10-08 07:51:36 +00:00
</ table >
< h2 > Activit<EFBFBD> ( s ) & Chiffre d ' affaire </ h2 >
< ? php
//Activit<69> de l'entreprise
?>
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Activit & eacute ; de l ' entreprise </ td >
< td width = " 350 " class = " StyleInfoData " >
< ? php
if ( $etab [ 'Activite' ] <> '' && ! preg_match ( '/non pr(e|<7C> )cis(e|<7C> )/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<69> de l'<27> tablissement
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Activit & eacute ; de l ' & eacute ; 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 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Anciens codes NAF </ td >
< td width = " 350 " class = " StyleInfoData " >< b > Entr . :& nbsp ; & nbsp ; </ b >< ? = $etab [ 'Naf4Ent' ] . ' - ' . strWsToHtml ( $etab [ 'Naf4EntLib' ]); ?> <br/><b>Étab. :</b> <?=$etab['Naf4Etab'].' - '. strWsToHtml($etab['Naf4EtabLib']);?></td>
</ tr >
< ? php
}
//Nature de l'activit<69>
if ( $etab [ 'NatureActivite' ] == 1 && $etab [ 'Actif' ] == 1 )
{
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Nature de l ' activit<EFBFBD> </ td >
< td width = " 350 " class = " StyleInfoData " > Saisonni & egrave ; 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<43> 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<72> t<EFBFBD> de l\'exploitation agricole' ,
'aD' => 'Apport d\'exploitation(s) agricole(s) individuelle(s)' ,
'aE' => 'Reprise d\'exploitation agricole individuelle' ,
);
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Origine du fonds </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $tabCreation [ 'a' . $etab [ 'OrigineCreation' ]] ?> </td>
</ tr >
< ? php
}
//Nombre d'<27> tablissements actif
if ( $etab [ 'NbEtab' ] <> 'N/C' )
{
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Nombre d ' & eacute ; 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 " >& nbsp ; </ 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 " >& nbsp ; </ 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 .= ' <20> ' . $dir1LieuNaiss ;
elseif ( $dir1LieuNaiss != '' && $dir1NaissText == '' ) $dir1NaissText .= 'n<> (e) <20> ' . $dir1LieuNaiss ;
$dir2NaissText = '' ;
if ( $dir2DateNaiss != '' ) $dir2NaissText .= 'n<> (e) le ' . $dir2DateNaiss ;
if ( $dir2LieuNaiss != '' && $dir2NaissText != '' ) $dir2NaissText .= ' <20> ' . $dir2LieuNaiss ;
elseif ( $dir2LieuNaiss != '' && $dir2NaissText == '' ) $dir2NaissText .= 'n<> (e) <20> ' . $dir2LieuNaiss ;
?>
< tr >
< td width = " 30 " >& nbsp ; </ 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<72> (s)' ;
if ( isset ( $etab [ 'Bilan' ][ 'Cloture' ])) $title .= ' au ' . WDate :: dateT ( 'Ymd' , 'd/m/Y' , str_replace ( '-' , '' , $etab [ 'Bilan' ][ 'Cloture' ]));
?>
< tr >
< td width = " 30 " >& nbsp ; </ 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<72> (s)' ;
} else {
print 'N/C' ;
}
?>
</ td >
</ tr >
</ table >
< h2 > Localisation g<EFBFBD> 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 & eacute ; 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 & copy ; </ 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 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Information g & eacute ; 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 & copy ; </ a ></ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ 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 " >& nbsp ; </ 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 " >& nbsp ; </ td >
< td width = " 550 " class = " StyleInfoLib " colspan = " 2 " > Information presse ( Source Google News & copy ;) < br />
< ul >
< ? php
}
$tmp = explode ( ', ' , $item [ 'pubdate' ]);
$tabDate = explode ( ' ' , $tmp [ 1 ]);
$tabTime = explode ( ':' , $tabDate [ 3 ]);
$pubDate = date ( 'd/m/Y <20> 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<75> 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 & Eacute ; GALES </ h1 >
< ? php
if ( count ( $annonces ) > 0 )
{
//Tri des annonces dans des tableaux diff<66> 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 & Eacute ; NEMENTS L & Eacute ; GAUX </ h2 >
< table >
< ? php
foreach ( $annoncesBodacc as $i => $ann )
{
?>
< tr >
< td width = " 30 " >& nbsp ; </ 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<63> 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 " >& nbsp ; </ 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<63> 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 " >& nbsp ; </ 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<63> 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<EFBFBD> nements l<EFBFBD> gaux </ h2 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 100 " class = " StyleInfoLib " >& nbsp ; </ td >
< td width = " 450 " colspan = " 2 " class = " StyleInfoData " > N & eacute ; ant </ td >
</ tr >
< tr >
< td colspan = " 4 " >& nbsp ; </ 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 " >& nbsp ; </ 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 <20> partir de la raison sociale " >
< ? php print $societe ; ?>
</ a >
< ? php
}
?>
& nbsp ;
< ? 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 <20> 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 >
2009-09-24 09:26:55 +00:00
< ? php
2009-10-08 07:51:36 +00:00
//=> FIN BLOC DIRIGEANTS
//=> BLOC LIENS
//=> FIN BLOC LIENS
2009-09-29 13:00:22 +00:00
2009-10-08 07:51:36 +00:00
//=> 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 = array ();
$bilansInfos = $result [ 'bilansInfos' ];
$ratiosInfos = array ();
$ratiosInfos = $result [ 'ratiosInfos' ];
$ratiosEntrep = array ();
$ratiosEntrep = $result [ 'ratiosEntrep' ];
$ratiosEntrepEvol = array ();
$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' ; }
}
$typeBilan = 'N' ;
if ( count ( $bilansInfos ) > 0 )
{
//En fonction du type de bilan s<> lectionn<6E>
//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 ;
2009-09-24 09:26:55 +00:00
//Liste des ratios pour le graphique g<> n<EFBFBD> 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 <20> 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' ),
2009-09-29 13:00:22 +00:00
'r63' => array ( 'evol' => 'r64' , 'op' => 1000 , 'titre' => 'TRESORERIE' ),
2009-09-24 09:26:55 +00:00
'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' ];
2009-10-08 07:51:36 +00:00
?>
< h1 > SYNTH & Egrave ; SE </ h1 >
2009-09-24 09:26:55 +00:00
2009-10-08 07:51:36 +00:00
< ? php
2009-09-24 09:26:55 +00:00
if ( count ( $ratiosEntrep ) == 0 || ! isset ( $ratiosEntrep ))
{
?>
< table >
< tr >< td width = " 30 " >& nbsp ; </ td >< td >< b > Aucun bilan disponible pour cette entreprise !</ b ></ td ></ tr >
</ table >
< ? php
}
else
{
?>
2009-10-08 07:51:36 +00:00
2009-09-24 09:26:55 +00:00
< table id = " synthese " >
< thead >
< tr >
< th align = " center " >< ? php if ( $ratio != '' ){ ?> <a href="/?page=synthese&siret=<?=$_REQUEST['siret']?>&idEntreprise=<?=$_REQUEST['idEntreprise']?>" title="Retour <20> la page compl<70> 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 >& nbsp ; </ th >
</ tr >
</ thead >
< tbody >
< ? php
2009-10-08 07:51:36 +00:00
//TODO : Afficher ligne par ligne les <20> l<EFBFBD> ments
2009-09-24 09:26:55 +00:00
print synthese_tablerow ( $ratiosInfos , $dataEvol , $tabRatio )
?>
</ tbody >
</ table >
< br />
< ? php
//Affichage du graphique associ<63> au ratio s<> lectionn<6E>
if ( count ( $tabRatio ) == 1 ){ ?>
< div id = " titreEvol " >< b > Evolution </ b ></ div >
< ? php
2009-10-08 07:51:36 +00:00
if ( ( $siret * 1 ) == 0 || ( $siren * 1 ) < 100 ){ $fileName = 'synthese-' . $idEntreprise ;}
else { $fileName = 'synthese-' . $siret ; }
if ( $ratio != '' ){ $fileName .= '-' . $ratio ; }
2009-09-24 09:26:55 +00:00
if ( count ( $dataEvol [ $ratio ]) <= 1 ){
print " Les informations sont insuffisantes pour g<> n<EFBFBD> rer la courbe d'<27> volution " ;
} else { ?>
< img id = " imgEvol " src = " ./imgcache/<?= $fileName .'.png'?> " />
< ? php
}
//Affichage du graphique g<> n<EFBFBD> ral
} else {
if ( count ( $dataGraph ) <= 1 ){
print '<div id="graphInfo">Les informations sont insuffisantes pour g<> n<EFBFBD> rer le graphique de synth<74> se</div>' ;
} else {
2009-10-08 07:51:36 +00:00
print synthese_graph_linecompare ( $dataGraph );
2009-09-24 09:26:55 +00:00
}
}
?>
< br />< br />
< ? php
}
2009-10-08 07:51:36 +00:00
//=> FIN BLOC SYNTHESE
2009-09-24 09:26:55 +00:00
2009-10-08 07:51:36 +00:00
//=> 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 )
2009-09-24 09:26:55 +00:00
{
2009-10-08 07:51:36 +00:00
foreach ( $bilansInfos as $key => $item )
{
if ( $item [ 'typeBilan' ] != 'C' ) { $numBilanC ++ ; }
if ( $item [ 'typeBilan' ] != 'N' ) { $numBilanN ++ ; }
}
2009-09-24 09:26:55 +00:00
}
2009-10-08 07:51:36 +00:00
if ( $typeBilan == '' )
2009-09-24 09:26:55 +00:00
{
2009-10-08 07:51:36 +00:00
if ( $numBilanN > 0 ){ $typeBilan = 'N' ; }
if ( $numBilanN == 0 && $numBilanC > 0 ){ $typeBilan = 'C' ; }
}
$typeBilan == 'N' ;
if ( count ( $bilansInfos ) > 0 )
{
//En fonction du type de bilan s<> lectionn<6E>
//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 ++ ;
}
2009-09-24 09:26:55 +00:00
}
2009-10-08 07:51:36 +00:00
$firephp -> log ( $bilansInfos , 'bilansInfos' );
?>
< h1 >& Eacute ; L & Eacute ; MENTS FINANCIERS - BILANS </ h1 >
< script type = " text/javascript " >
$ ( document ) . ready ( function ()
{
$ ( 'input[type=radio][name=typeBilan]' ) . change ( function (){
document . location . href = $ ( this ) . val ();
});
});
</ script >
< ? php
if ( count ( $ratiosEntrep ) == 0 || ! isset ( $ratiosEntrep )){
?>
< table >
< tr >< td width = " 30 " >& nbsp ; </ td >< td >< b > Aucun bilan disponible pour cette entreprise !</ b ></ td ></ tr >
</ table >
< ? php
} else {
2009-09-24 09:26:55 +00:00
?>
2009-10-08 07:51:36 +00:00
< h2 > Bilan actif - passif </ h2 >
2009-09-24 09:26:55 +00:00
2009-10-08 07:51:36 +00:00
< 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<EFBFBD> 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<EFBFBD> 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<EFBFBD> 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<EFBFBD> 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 >& nbsp ; </ td >
< td ></ td >
< td ></ td >
< td ></ td >
< td ></ td >
< td ></ td >
< td ></ td >
</ tr >
< tr >
< td > Tr<EFBFBD> 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 > <EFBFBD>
< br />< br />
2009-09-24 09:26:55 +00:00
2009-10-08 07:51:36 +00:00
< 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<EFBFBD> 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<EFBFBD> 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 >
2009-09-24 09:26:55 +00:00
< ? php
2009-10-08 07:51:36 +00:00
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 > <EFBFBD>
< br />< br />
< h2 > Soldes Interm & eacute ; 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<EFBFBD> res premi<EFBFBD> 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<EFBFBD> e et stock<EFBFBD> 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 >& plusmn ; </ td >< td > Variation de stock de marchandises et mati<EFBFBD> res premi<EFBFBD> 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<EFBFBD> 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<EFBFBD> ts , taxes & versements assimil<EFBFBD> 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<EFBFBD> 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<EFBFBD> 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<EFBFBD> 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<EFBFBD> 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<EFBFBD> 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<EFBFBD> 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<EFBFBD> ts sur les b<EFBFBD> n<EFBFBD> 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<EFBFBD> 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 > <EFBFBD>
< ? 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 = '' ;
isset ( $_REQUEST [ 'type' ]) ? $typeBilan = $_REQUEST [ 'type' ] : $typeBilan = '' ;
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<69> d\'autofinancement sur 12 mois / Capitaux permanents)' , 'ratio' => 'r265' , 'parent' => 7 , 'position' => '>' ),
12 => array ( 'titre' => 'CONTRIBUTION DE LA VA' , 'stitre' => '(Capacit<69> d\'autofinancement / Valeur ajout<75> e)' , 'ratio' => 'r266' , 'parent' => 7 , 'position' => '>' ),
13 => array ( 'titre' => 'LIQUIDITE' ),
14 => array ( 'titre' => 'LIQUIDITE IMMEDIATE' , 'stitre' => '(Disponibilit<69> / 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<69> et cr<63> 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<66> rents type de bilans
$typBil = array ( 'C' => 'Consolid<69> ' , 'N' => '' , 'S' => 'R<> el Simplifi<66> ' , '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<6E>
//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<6E>
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
if ( count ( $ratiosEntrep ) == 0 || ! isset ( $ratiosEntrep ))
{
?>
< table >
< tr >< td width = " 30 " >& nbsp ; </ td >< td >< b > Aucun bilan disponible pour cette entreprise !</ b ></ td ></ tr >
</ table >
< ? php
}
else
2009-09-24 09:26:55 +00:00
{
2009-10-08 07:51:36 +00:00
?>
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Secteur d ' activit<EFBFBD> :</ td >
< td width = " 340 " class = " StyleInfoData " >
< ? php print $_SESSION [ 'tabInfo' ][ 'entrep' ][ 'nafEn' ]; ?> - <?php print $_SESSION['tabInfo']['entrep']['nafEnLib']; ?>
</ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ 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>Normaux</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<69> s</label><?php }?>
< ? php if ( $numBilanN > 0 && $numBilanC == 0 ){ ?> Normaux<?php }?>
< ? php if ( $numBilanN == 0 && $numBilanC > 0 ){ ?> Consolid<EFBFBD> s<?php }?>
< ? php
}
?>
</ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Mill<EFBFBD> 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 )
{
foreach ( $bilansInfos as $bilanItem )
{
$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
}
}
} else { print '-' ; }
?>
</ select >
</ form >
</ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Dur<EFBFBD> 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 " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Retour <EFBFBD> la page compl<EFBFBD> te </ td >
< td width = " 340 " class = " StyleInfoData " >< a href = " /?page=ratios&siret=<?= $_REQUEST['siret'] ?>&idEntreprise=<?= $_REQUEST['idEntreprise'] ?> " title = " Retour <20> la page compl<70> 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 > <EFBFBD>
< ? php
2009-09-24 09:26:55 +00:00
}
?>
2009-10-08 07:51:36 +00:00
< br />
< ? php
//Affichage du graphique associ<63> au ratio s<> lectionn<6E>
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<EFBFBD> rer la courbe d'<27> volution " ;
} else {
$image = ratios_graph ( '' , $data , $fileName );
?>
< img id = " imgEvol " src = " ./imgcache/<?= $image ;?> " />
< ? php
}
}
//=> FIN BLOC RATIOS
2009-09-24 09:26:55 +00:00
2009-10-08 07:51:36 +00:00
//=> 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<EFBFBD> </ h1 >
< h2 >& Eacute ; valuation </ h2 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 550 " colspan = " 2 " class = " StyleInfoData " > L ' & eacute ; valuation indiScore & copy ; est en partie bas<EFBFBD> e sur les points notables suivants :< br />
< h3 >< u > Conformit & eacute ; l & eacute ; gale :</ u ></ h3 >
< div class = " stats gradiant_pic " >
< ul >
< li >
< i >< ? = $etab [ 'AnalyseConfor' ] ?> </i>
< 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 >
</ 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 & eacute ; :</ 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 & 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 >
</ 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 " >& nbsp ; </ td >
< 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/>
<!-- 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 >
< 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>
</ td >
</ tr >
< ? } else { ?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< 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 ) {
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 " >& nbsp ; </ td ></ tr >
</ table >
< h2 > Conclusion </ h2 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< 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 />
< 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
?>
2009-10-07 08:33:27 +00:00
< p class = " confidentiel " >
2009-10-08 07:51:36 +00:00
* Informations confidentielles , ne pas divulguer .
2009-10-07 08:33:27 +00:00
< 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<EFBFBD> es est rigoureusement interdit sans accord pr<EFBFBD> alable <EFBFBD> crit de Scores & Decisions SAS .
La consultation ou la r<EFBFBD> ception de documents n 'entra<72> ne aucun transfert de droit de propri<72> t<EFBFBD> intellectuelle en faveur de l' utilisateur . Ce dernier s 'engage <20> ne pas rediffuser ou <20> reproduire les donn<6E> es fournies autrement que pour son usage propre. Les donn<6E> es transmises sont trait<69> es en conformit<69> avec les usages en vigueur. L' utilisateur recherche , s<EFBFBD> lectionne et interpr<EFBFBD> te les donn<EFBFBD> es sous sa propre responsabilit<EFBFBD> .
< br />
L 'extranet Scores & Decisions est un service priv<69> distinct des Journaux Officiels, de l' INPI et de l ' INSEE et est <EFBFBD> dit<EFBFBD> par SCORES & DECISIONS SAS , RCS VERSAILLES B 494967938 , licenci<EFBFBD> des sources officielles pr<EFBFBD> cit<EFBFBD> s .
</ p >
2009-09-24 09:26:55 +00:00
</ div >
< ? php