180 lines
3.9 KiB
PHP
180 lines
3.9 KiB
PHP
<?php
|
|
if (!page_checkParams()) die('Paramètres incorrects !');
|
|
|
|
require_once 'partenaires/classMTva.php';
|
|
require_once 'partenaires/classMMap.php';
|
|
require_once 'common/dates.php';
|
|
|
|
require_once 'liasse/liasse.php';
|
|
FB::log($tabBilan, 'Bilan');
|
|
?>
|
|
<style type="text/css">
|
|
.tabLiasse { font-size:1em;}
|
|
</style>
|
|
<div id="center">
|
|
<h1 class="titre">ÉLÉMENTS FINANCIERS - BILANS</h1>
|
|
<form action="./" method="get">
|
|
<table>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
|
<td width="350" class="StyleInfoData">
|
|
<?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
|
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
|
|
</tr>
|
|
<?php
|
|
if (count($tabBilans)>0)
|
|
{
|
|
$tabUnit = array(
|
|
0 => array('lib'=>'€', 'val'=>''),
|
|
1 => array('lib'=>'K€', 'val'=>'K'),
|
|
2 => array('lib'=>'M€', 'val'=>'M'),
|
|
);
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Valeurs exprimées en</td>
|
|
<td width="350" class="StyleInfoData">
|
|
<select name="unit">
|
|
<?php
|
|
foreach($tabUnit as $unit)
|
|
{
|
|
$select = '';
|
|
if($unite == $unit['val']) $select = ' selected';
|
|
?><option value="<?=$unit['val']?>"<?=$select?>><?=$unit['lib']?></option><?php
|
|
}
|
|
?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" class="StyleInfoLib">Millesime</td>
|
|
<td width="350" class="StyleInfoData">
|
|
<?php
|
|
if (count($tabBilans)>0)
|
|
{
|
|
?>
|
|
<input type="hidden" name="page" value="liasse"/>
|
|
<input type="hidden" name="siret" value="<?=$siren?>"/>
|
|
<select name="mil">
|
|
<?php
|
|
//Tri de l'affichage des bilans en fonction de leurs types
|
|
foreach($typBil as $keyType => $type)
|
|
{
|
|
$numBil=0;
|
|
foreach ($tabBilans as $millesime => $bilan)
|
|
{
|
|
if($numBil>=5){ break; }
|
|
if( $millesime[0] == $keyType )
|
|
{
|
|
echo '<option value="'.$millesime.','.$bilan['ref'].'"';
|
|
if ($mil[0]==$millesime) echo ' selected';
|
|
$str=' '. $typBil[substr($millesime,0,1)];
|
|
echo '>'. substr($millesime,-10) . $str .'</option>';
|
|
$numBil++;
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</select>
|
|
<input type="submit" value="Ok"/>
|
|
<?php
|
|
} else {
|
|
?>
|
|
<b>Aucun bilan disponible pour cette entreprise !</b>
|
|
<?php
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
//Exportation excel
|
|
if( isset($_REQUEST['mil'])
|
|
&& in_array($_SESSION['tabInfo']['idClient'], array(1, 86))
|
|
&& (!in_array($tabBilan['CONSOLIDE'], array('B', 'A'))) )
|
|
{
|
|
switch($tabBilan['CONSOLIDE']){
|
|
case 'C':
|
|
case 'N':
|
|
$q = 'export/liasse_2050';
|
|
break;
|
|
case 'S':
|
|
$q = 'export/liasse_2033';
|
|
break;
|
|
}
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td colspan="2">
|
|
<a href="./?<?=$_SERVER['QUERY_STRING']?>&q=<?=$q?>" id="xls">
|
|
Exporter en fichier Excel.
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
|
|
//Envoi d'un bilan de la part du client
|
|
if ( $_SESSION['tabInfo']['idClient']==1 ){
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td colspan="2">
|
|
<a id="bilanClient" href="./?page=bilanclient&siren=<?=$siren?>"
|
|
title="Envoi du bilan">
|
|
Vous possèdez un bilan plus récent</a>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|
|
</form>
|
|
|
|
<div class="blockh2">
|
|
<?php
|
|
/** Si un bilan est sélectionné dans la liste, on affiche le bilan **/
|
|
if(isset($_REQUEST['mil']) == true) {
|
|
$mil = $_REQUEST['mil'];
|
|
if ($mil[0] == 'A') {
|
|
include 'liasse/bilan_assurance.php';
|
|
} else if ($mil[0] == 'B') {
|
|
include 'liasse/bilan_banque.php';
|
|
} else {
|
|
include 'liasse/bilan_normal.php';
|
|
require_once 'export/genexport.php';
|
|
} // Fin test bilan banque ou assurance et autres
|
|
} // Fin if "pas de bilan choisit"
|
|
?>
|
|
</div>
|
|
<table>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td colspan="2" width="550" class="StyleInfoData">
|
|
<?php
|
|
require_once 'surveillance/surveillance.php';
|
|
echo getSurveillance('bilans', $siret);
|
|
?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class="confidentiel blockh2">
|
|
<?php
|
|
require_once 'cgu/cgu.php';
|
|
echo afficheCgu();
|
|
?>
|
|
</p>
|
|
|
|
</div>
|