extranet/www/pages/liasse.php

180 lines
3.9 KiB
PHP
Raw Normal View History

<?php
2010-04-27 08:09:23 +00:00
if (!page_checkParams()) die('Paramètres incorrects !');
2009-05-20 15:49:08 +00:00
require_once 'partenaires/classMTva.php';
require_once 'partenaires/classMMap.php';
require_once 'common/dates.php';
2009-05-28 16:31:14 +00:00
require_once 'liasse/liasse.php';
FB::log($tabBilan, 'Bilan');
?>
2010-02-17 14:44:28 +00:00
<style type="text/css">
.tabLiasse { font-size:1em;}
</style>
<div id="center">
<h1 class="titre">&Eacute;L&Eacute;MENTS FINANCIERS - BILANS</h1>
2010-02-17 14:44:28 +00:00
<form action="./" method="get">
<table>
2009-06-01 08:27:39 +00:00
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData">
<?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?>
</td>
2009-06-01 08:27:39 +00:00
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
2009-06-01 08:27:39 +00:00
</tr>
<?php
if (count($tabBilans)>0)
2010-02-17 14:44:28 +00:00
{
$tabUnit = array(
0 => array('lib'=>'€', 'val'=>''),
1 => array('lib'=>'K€', 'val'=>'K'),
2 => array('lib'=>'M€', 'val'=>'M'),
);
2010-02-17 14:44:28 +00:00
?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Valeurs exprimées en</td>
<td width="350" class="StyleInfoData">
<select name="unit">
<?php
2010-02-17 14:44:28 +00:00
foreach($tabUnit as $unit)
{
$select = '';
if($unite == $unit['val']) $select = ' selected';
?><option value="<?=$unit['val']?>"<?=$select?>><?=$unit['lib']?></option><?php
2010-02-17 14:44:28 +00:00
}
?>
</select>
</td>
</tr>
<?php
2010-02-17 14:44:28 +00:00
}
?>
2009-06-01 08:27:39 +00:00
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Millesime</td>
<td width="350" class="StyleInfoData">
2011-03-29 16:05:00 +00:00
<?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)
{
2009-10-09 14:27:01 +00:00
$numBil=0;
foreach ($tabBilans as $millesime => $bilan)
{
2009-10-09 14:27:01 +00:00
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++;
}
}
}
?>
2010-02-17 14:44:28 +00:00
</select>&nbsp;
<input type="submit" value="Ok"/>
2009-06-01 08:27:39 +00:00
<?php
} else {
?>
2009-06-01 08:27:39 +00:00
<b>Aucun bilan disponible pour cette entreprise !</b>
<?php
}
?>
2009-06-01 08:27:39 +00:00
</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">&nbsp;</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">&nbsp;</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>
2010-02-17 14:44:28 +00:00
</form>
2009-05-28 16:31:14 +00:00
2010-02-17 14:44:28 +00:00
<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';
2011-02-21 17:09:22 +00:00
require_once 'export/genexport.php';
} // Fin test bilan banque ou assurance et autres
} // Fin if "pas de bilan choisit"
2010-02-17 14:44:28 +00:00
?>
</div>
<table>
2009-05-20 15:49:08 +00:00
<tr>
<td width="30">&nbsp;</td>
2009-05-22 12:26:07 +00:00
<td colspan="2" width="550" class="StyleInfoData">
<?php
2009-05-20 15:49:08 +00:00
require_once 'surveillance/surveillance.php';
echo getSurveillance('bilans', $siret);
2009-05-20 15:49:08 +00:00
?>
</td>
</tr>
2009-05-28 16:31:14 +00:00
</table>
2010-04-12 14:49:55 +00:00
<p class="confidentiel blockh2">
<?php
2010-04-12 14:49:55 +00:00
require_once 'cgu/cgu.php';
echo afficheCgu();
?>
2010-04-12 14:49:55 +00:00
</p>
</div>