extranet/includes/giant/templates/rapport/FinancialSummary.tpl.php
2011-04-08 15:40:51 +00:00

40 lines
1.4 KiB
PHP

<h2><?php echo SelectTrueLabel($this->labelConfig['Section_rapportFinancialSummary'], 'FinancialSummary')?></h2>
<?php $FinancialSummary = getArray($FinancialSummary);?>
<table width="100%" class="FinancialSummaryGiant">
<?php
$champFinancialSummary = array(
SelectTrueLabel($this->labelConfig, 'Revenue'),
SelectTrueLabel($this->labelConfig, 'TotalEquity'),
SelectTrueLabel($this->labelConfig, 'ProfitLoss'),
SelectTrueLabel($this->labelConfig, 'WorkingCapital'),
SelectTrueLabel($this->labelConfig, 'AuthorizedCapital'),
SelectTrueLabel($this->labelConfig, 'IssuedCapital'),
SelectTrueLabel($this->labelConfig, 'PaidUpCapital'));
echo '<tr>';
echo '<td id="titre"></td>';
foreach($FinancialSummary as $valeur) {
echo '<td align="left" id="titre"><b>'.substr($valeur->SummaryDate->_, 0, 4).'</b></td>';
}
echo '</tr>';
foreach ($champFinancialSummary as $champ)
{
if(isset($valeur->$champ))
{
echo '<tr>';
echo '<td id="titre">' . $champ . '</td>';
foreach($FinancialSummary as $valeur)
{
if (isset($valeur->$champ))
{
if (is_numeric($print = $valeur->$champ->_))
echo '<td align="right">' . number_format(SelectUnitForNumber('K', $print * $valeur->Unit), 0, '', ' ') .' K€ <b>'. $valeur->$champ->currency .'</b></td>';
else
echo '<td align="right">' . $print . '</td>';
}
}
echo '</tr>';
}
}
?>
</table>