135 lines
4.2 KiB
PHTML

<div id="center">
<?php if (empty($this->AutrePage)):?>
<h1>RATIOS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30"></td>
<td class="StyleInfoLib" width="200">Numéro identifiant Siren</td>
<td class="StyleInfoData" width="340"><?=$this->SirenTexte($this->siret);?></td>
</tr>
<tr>
<td width="30"></td>
<td class="StyleInfoLib" width="200">Raison Sociale</td>
<td class="StyleInfoData" width="340"><?=$this->raisonSociale;?></td>
</tr>
<tr>
<td width="30"></td>
<td class="StyleInfoLib" width="200">Secteur d'activité </td>
<td class="StyleInfoData" width="340"><?=$this->naf;?></td>
</tr>
<?php if(!isset($this->ratios)):?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" class="StyleInfoLib" width="200">Aucun bilan disponible pour cette entreprise !</td>
<td class="StyleInfoData" width="340"></td>
</tr>
<?php endif;?>
<?php if (isset($this->ratios)):?>
<form method="POST" action="<?php echo $this->url();?>">
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Type de bilans</td>
<td width="340" class="StyleInfoData">
<input <?php echo (($this->typeBilan == 'N')? 'checked="true"': false);?> type="radio" name="typeBilan" value="N"/> <i>Réel normal ou Simplifié</i>
<input <?php echo (($this->typeBilan == 'C')? 'checked="true"': false);?> type="radio" name="typeBilan" value="C"/> <i>Consolidé</i>
</td>
</tr>
<tr>
<td width="30"></td>
<td width="200" class="StyleInfoLib">Millésime</td>
<td width="340" class="StyleInfoData">
<select name="Date">
<?php foreach ($this->ratios as $date => $element):?>
<?php if($this->i > 5) break?>
<?php if ($element[$_POST['typeBilan']]->typeBilan == $_POST['typeBilan']):?>
<option <?php echo (($this->Date == $date)? 'selected': false);?> value="<?php echo $date;?>">
<?php echo $this->dateFunction->dateT('Ymd', 'd/m/Y', $date);?>
<?php if($this->typeBilan == 'C'):?> Consolidé <?php endif;?>
</option>
<?php endif;?>
<?php $this->i++;?>
<?php endforeach;?>
</select>
<input type="submit" value="Ok" />
</td>
</tr>
</form>
<?php endif;?>
</table>
</div>
<?php endif;?>
<div class="paragraph">
<table id="ratios" style="border-collapse:collapse">
<tbody>
<?php foreach ($this->tabResult as $item) { ?>
<?php if (isset($item['ratio'])) { ?>
<tr>
<td>
<a class="tooltip" title="<?=$item['comment']?>">
<?=$item['titre']?><br/><?=$item['stitre']?></a>
</td>
<td class="right"><?=$item['entrep']?></td>
<td class="right"><?=$item['secteur']?></td>
<td class="position">
<a class="rTip"
href=""
rel="<?=$this->url(array(
'controller'=>'finance',
'action'=>'ratiosgraph',
'siret' => $this->siret,
'id' => $this->id,
'ratio' => $item['ratio']
))?>" name="<?=$item['titre']?>">
<?=$item['position']?>
</a>
</td>
</tr>
<?php } else { ?>
<tr class="subhead">
<td class="center italique"><?=$item['titre']?></td>
<td>Entreprise</td>
<td>Secteur</td>
<td>Position</td>
</tr>
<?php } ?>
<?php
/*
} else if ($ratio == $item['ratio']) {
$row .= '<tr class="subhead">'."\n".
'<td class="center italique">'.
$tabRatio[$item['parent']]['titre'].'</td>'."\n".
'<td>Entreprise</td>'."\n".
'<td>Secteur</td>'."\n".
'<td>Position</td>'."\n".
'</tr>'."\n";
$row .= '<tr>'."\n".
'<td><a tooltip="'.
wrapComment($ratiosInfos[$item['ratio']]['commentaires']).
'">'.$item['titre'].'<br/>'.$item['stitre'].'</a></td>'."\n".
'<td class="right">'.
dRatio($bilan, $item['ratio']).'</td>'."\n".
'<td class="right">'.
dSecteur($bilan, $item['ratio']).'</td>'."\n".
'<td class="position">'."\n".
'<a href="#" name="'.$item['titre'].'">'."\n".
dPosition($bilan, $item['ratio'], $item['position'])."\n".
'</a>'."\n".
'</td>'."\n".
'</tr>'."\n";
}
*/
?>
<?php } ?>
</tbody>
</table>
</div>
<?php echo $this->render('cgu.phtml', $this->cgu);?>
</div>