export: bilans, issue #0000011

This commit is contained in:
Sebastien BEAUGRAND 2010-04-06 13:03:59 +00:00
parent f3af619365
commit a8f4ceea0e
2 changed files with 34 additions and 9 deletions

View File

@ -446,7 +446,7 @@ else
</thead> </thead>
<tbody> <tbody>
<tr class="subhead"> <tr class="subhead">
<td class="center" colspan="2">CHIFFRE D'AFFAIRES HORS TAXE</td> <td class="center" colspan="2">CHIFFRE D&apos;AFFAIRES HORS TAXE</td>
<?php <?php
for($i=1; $i<=$nb_bilans; $i++) for($i=1; $i<=$nb_bilans; $i++)
{ {
@ -506,7 +506,7 @@ else
<td class="right"><?php print dPercent(0,'r112','r101'); ?></td> <td class="right"><?php print dPercent(0,'r112','r101'); ?></td>
</tr> </tr>
<tr class="subhead"> <tr class="subhead">
<td class="center" colspan="2">PRODUCTION DE L'EXERCICE</td> <td class="center" colspan="2">PRODUCTION DE L&apos;EXERCICE</td>
<?php <?php
for($i=1; $i<=$nb_bilans; $i++) for($i=1; $i<=$nb_bilans; $i++)
{ {
@ -590,7 +590,7 @@ else
<td class="right"><?php print dPercent(0,'r133','r101'); ?></td> <td class="right"><?php print dPercent(0,'r133','r101'); ?></td>
</tr> </tr>
<tr> <tr>
<td>+</td><td>Subventions d'exploitation</td> <td>+</td><td>Subventions d&apos;exploitation</td>
<?php <?php
for($i=1; $i<=$nb_bilans; $i++) for($i=1; $i<=$nb_bilans; $i++)
{ {
@ -602,7 +602,7 @@ else
<td class="right"><?php print dPercent(0,'r131','r101'); ?></td> <td class="right"><?php print dPercent(0,'r131','r101'); ?></td>
</tr> </tr>
<tr class="subhead"> <tr class="subhead">
<td class="center" colspan="2">EXCÉDENT BRUT D'EXPLOITATION (EBE)</td> <td class="center" colspan="2">EXCÉDENT BRUT D&apos;EXPLOITATION (EBE)</td>
<?php <?php
for($i=1; $i<=$nb_bilans; $i++) for($i=1; $i<=$nb_bilans; $i++)
{ {
@ -614,7 +614,7 @@ else
<td class="right"><?php print dPercent(0,'r140','r101'); ?></td> <td class="right"><?php print dPercent(0,'r140','r101'); ?></td>
</tr> </tr>
<tr> <tr>
<td>+</td><td>Autres produits d'exploitation</td> <td>+</td><td>Autres produits d&apos;exploitation</td>
<?php <?php
for($i=1; $i<=$nb_bilans; $i++) for($i=1; $i<=$nb_bilans; $i++)
{ {
@ -626,7 +626,7 @@ else
<td class="right"><?php print dPercent(0,'r141','r101'); ?></td> <td class="right"><?php print dPercent(0,'r141','r101'); ?></td>
</tr> </tr>
<tr> <tr>
<td>-</td><td>Autres charges d'exploitation</td> <td>-</td><td>Autres charges d&apos;exploitation</td>
<?php <?php
for($i=1; $i<=$nb_bilans; $i++) for($i=1; $i<=$nb_bilans; $i++)
{ {
@ -674,7 +674,7 @@ else
<td class="right"><?php print dPercent(0,'r145','r101'); ?></td> <td class="right"><?php print dPercent(0,'r145','r101'); ?></td>
</tr> </tr>
<tr class="subhead"> <tr class="subhead">
<td class="center" colspan="2">RÉSULTAT D'EXPLOITATION</td> <td class="center" colspan="2">RÉSULTAT D&apos;EXPLOITATION</td>
<?php <?php
for($i=1; $i<=$nb_bilans; $i++) for($i=1; $i<=$nb_bilans; $i++)
{ {
@ -800,5 +800,29 @@ else
</table>  </table> 
<?php <?php
} }
// --------------------------------------------------------------------------- //
// Export
// --------------------------------------------------------------------------- //
require_once 'export.php';
if (isset($siret) == true) {
$fileName = $page.'-'.$siret;
} else {
$fileName = $page.'-'.$idEntreprise;
}
$parseTab = new tabExport;
$parseTab->tab = array($result);
$parseTab->type = array();
$array2csv = new ExportCSV;
$array2csv->records = $parseTab->convertTable();
$array2csv->writeCSV($fileName);
$array2xml = new ExportXML;
$array2xml->rootName = $page;
$array2xml->defaultTagName = substr($page, 0, -1);
$array2xml->records = $result;
$array2xml->writeXML($fileName);
?> ?>
</div> </div>

View File

@ -45,7 +45,8 @@ if ($page == 'identite' ||
$page == 'evenements' || $page == 'evenements' ||
$page == 'dirigeants' || $page == 'dirigeants' ||
$page == 'annonces' || $page == 'annonces' ||
$page == 'synthese') { $page == 'synthese' ||
$page == 'bilans') {
print '<a href="./exportcsv.php?'.$_SERVER['QUERY_STRING']. print '<a href="./exportcsv.php?'.$_SERVER['QUERY_STRING'].
'" target="_blank" title="CSV">'. '" target="_blank" title="CSV">'.
'<img src="./img/exporticones/csv.png" alt="CSV" /></a>&nbsp;'; '<img src="./img/exporticones/csv.png" alt="CSV" /></a>&nbsp;';