Modifications suite aux évolutions des bilans

This commit is contained in:
Michael RICOIS 2009-10-14 13:28:14 +00:00
parent da12fe8ccd
commit b908bea6e1

View File

@ -1063,26 +1063,27 @@ $dirs = scoresws_dirigeants($siret, $siren, $idEntreprise);
//=> FIN BLOC LIENS
//=> BLOC SYNTHESE
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
require_once 'cache/cache.php';
require_once 'ratios/ratios.php';
require_once 'scoresws/scoresws.php';
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
$result = scoresws_synthese($siret, $siren, $idEntreprise);
$bilansInfos = $result['bilansInfos'];
$ratiosInfos = $result['ratiosInfos'];
$ratiosEntrep = $result['ratiosEntrep'];
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
$firephp->log($bilansInfos, 'bilansInfos');
list($typeBilan, $numBilan) = countBilans($bilansInfos, $typeBilan);
$numBilanN = $numBilan['N'];
$numBilanC = $numBilan['C'];
$numBilanB = $numBilan['B'];
$numBilanA = $numBilan['A'];
list($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $dataActif, $dataPassif, $dataSIG) = filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, array(), array(), array(), $typeBilan);
$nbrAnnees = count($bilansInfos)-1;
$data = synthese_datagraph($bilansInfos, $ratiosEntrep, $ratio);
$dataGraph = $data['graph'];
$dataEvol = $data['evol'];
@ -1090,34 +1091,27 @@ $dataEvol = $data['evol'];
?>
<h1>SYNTH&Egrave;SE</h1>
<table>
<table width="570" border="0" align="left" bgcolor="#FFFFFF">
<?php
if (count($bilansInfos)>0){
if ( $numBilanN>0 || $numBilanC>0 )
{
?>
<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>Réel normal ou Simplifié</label><?php }?>
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</table>
<?php
if (count($bilansInfos)==0)
if ($numBilanN==0 && $numBilanC==0 && $numBilanB==0 && $numBilanA==0)
{
?>
<table>
@ -1125,10 +1119,17 @@ if (count($bilansInfos)==0)
</table>
<?php
}
elseif($numBilanN==0 && $numBilanC==0 && ($numBilanB>0 || $numBilanA>0) )
{
?>
<table>
<tr><td width="30">&nbsp;</td><td><b>Bilan de banque/assurance non gérés</b></td></tr>
</table>
<?php
}
else
{
?>
<table id="synthese">
<thead>
<tr>
@ -1200,6 +1201,8 @@ if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
list($typeBilan, $numBilan) = countBilans($bilansInfos, $typeBilan);
$numBilanN = $numBilan['N'];
$numBilanC = $numBilan['C'];
$numBilanB = $numBilan['B'];
$numBilanA = $numBilan['A'];
list($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $dataActif, $dataPassif, $dataSIG) = filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $dataActif, $dataPassif, $dataSIG, $typeBilan);
?>
<script type="text/javascript">
@ -1210,38 +1213,20 @@ $(document).ready(function()
});
});
</script>
<?php
if (count($bilansInfos)==0){
?>
<table>
<tr><td width="30">&nbsp;</td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
</table>
<?php
}else{
?>
<h2>Bilan actif - passif</h2>
<h1>&Eacute;L&Eacute;MENTS FINANCIERS - BILANS</h1>
<table>
<?php
if (count($bilansInfos)>0){
if ( $numBilanN>0 || $numBilanC>0 )
{
?>
<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 )
{
$firephp->log($typeBilan, 'typeBilan');
?>
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=N" <?=($typeBilan=='N')? 'checked' : '';?>/><label>Réel normal ou Simplifié</label><?php }?>
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
<?php
}
?>
</td>
</tr>
<?php
@ -1249,6 +1234,29 @@ if (count($bilansInfos)>0){
?>
</table>
<?php
if ($numBilanN==0 && $numBilanC==0 && $numBilanB==0 && $numBilanA==0)
{
?>
<table>
<tr><td width="30">&nbsp;</td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
</table>
<?php
}
elseif($numBilanN==0 && $numBilanC==0 && ($numBilanB>0 || $numBilanA>0) )
{
?>
<table>
<tr><td width="30">&nbsp;</td><td><b>Bilan de banque/assurance non gérés</b></td></tr>
</table>
<?php
}
else
{
?>
<h2>Bilan actif - passif</h2>
<table class="bilans">
<thead>
<tr>
@ -1957,6 +1965,10 @@ isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
isset($_REQUEST['mil']) ? $mil=$_REQUEST['mil'] : $mil='' ;
isset($_REQUEST['ratio']) ? $ratio=$_REQUEST['ratio'] : $ratio='' ;
require_once 'cache/cache.php';
require_once 'ratios/ratios.php';
require_once 'scoresws/scoresws.php';
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
}else{ $fileName = $page.'-'.$siren; }
@ -1973,6 +1985,8 @@ $typBil = array('C'=>'Consolid
list($typeBilan, $numBilan) = countBilans($bilansInfos, $typeBilan);
$numBilanN = $numBilan['N'];
$numBilanC = $numBilan['C'];
$numBilanB = $numBilan['B'];
$numBilanA = $numBilan['A'];;
list($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $dataActif, $dataPassif, $dataSIG) = filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, array(), array(), array(), $typeBilan);
//On détermine le bilan sélectionné
@ -1998,9 +2012,10 @@ else
}
}
}
?>
<h1 class="titre">RATIOS</h1>
?>
<div id="center">
<h1 class="titre">RATIOS</h1>
<?php
$firephp->log($_SESSION, 'SESSION');
if (count($bilansInfos)==0)
@ -2022,23 +2037,23 @@ else
<?php print $_SESSION['tabInfo']['entrep']['nafEn']; ?> - <?php print $_SESSION['tabInfo']['entrep']['nafEnLib']; ?>
</td>
</tr>
<?php
if ( $numBilanN>0 || $numBilanC>0 )
{
?>
<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>Réel normal ou Simplifié</label><?php }?>
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
<?php
}
?>
</td>
</tr>
<?php
}
?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Millésime</td>
@ -2154,9 +2169,87 @@ require_once 'partenaires/classMCoface.php';
require_once 'common/dates.php';
require_once 'scoresws/scoresws.php';
$tabInfo = $_SESSION['tabInfo'];
$etab = scoresws_indiscore($siret, $siren, $idEntreprise);
?>
<h1 class="titre">INDISCORE©</h1>
<table>
<tr>
<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>
</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['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).' '.substr($etab['Siret'],-5)?></td>
</tr>
<? if ($etab['NumRC']*1<>0) { ?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro R.C.</td>
<td width="350" class="StyleInfoData"><?=$etab['NumRC']?></td>
</tr>
<? } ?>
<tr><td colspan="3">&nbsp;</td></tr>
</table>
<h2>Raison sociale & coordonnées</h2>
<table>
<tr>
<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>
</tr>
<?
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<>'') {
?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$titre?></td>
<td width="350" class="StyleInfoData"><?=$lib?></td>
</tr><? } ?>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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']?>&nbsp;<?=$etab['Ville']?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">T&eacute;l&eacute;phone</td>
<td width="350" class="StyleInfoData"><?=$etab['Tel']?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?php
require_once 'surveillance/surveillance.php';
print getSurveillance($page, $siret);
?>
</td>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
</table>
<h2>&Eacute;valuation</h2>
<table>
<tr>
@ -2266,10 +2359,7 @@ if ($etab['NbBilansScore']>0 && $etab['Bilans'][0]['Millesime']>=$millesimeMax)
</tr>
<tr><td colspan="3" align="center"><img src="./img/logo_indiscore.png"/></td></tr>
</table>
<?php
//=> FIN BLOC INDISCORE