
<?php \Laravel\Section::start('content'); ?>

<?php echo view('customerarea.menu')->with(get_defined_vars())->render(); ?>

<div class="wrapper wrapperCompte">
	<h1>Vous pouvez consulter toutes vos factures !</h1>
			
	<?php if(count($factures)>=1): ?>
	<table class="table table-striped table-hover">
		<thead>
			<tr>
				<th>Date</th>
				<th>Nom</th>
				<th style="text-align:right;">Prix HT</th>
				<th style="text-align:right;">Prix TTC</th>
				<th>&nbsp;</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach($factures as $f): ?>
			<tr>
				<td width="15%"><span class="text-info"><?php echo  DateFunctions::format_date($f->date) ; ?></span></td>
				<td><a href="<?php echo  URL::to_route('facturescustomerpdf', array($f->id)) ; ?>" target="_blank"><?php echo  $f->label ; ?></a></td>
				<td width="15%" style="text-align:right;"><?php echo  number_format($f->total_ht(), 2, ',', ' ') ; ?> &euro;</td>
				<td width="15%" style="text-align:right;"><?php echo  number_format($f->total_ttc(), 2, ',', ' ') ; ?> &euro;</td>
				<td width="20%" style="text-align:right;"><a href="<?php echo  URL::to_route('facturescustomerpdf', array($f->id)) ; ?>" target="_blank" class="btn btn-danger"><i class="icon-print"></i> Imprimer</a></td>
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<?php else: ?>
		<center>
			<p>
				Aucune facture disponible pour le moment.<br /><br />
				<a href="<?php echo  URL::to_action('customerarea@index'); ; ?>" class="btn btn-large btn-danger"><i class="icon-chevron-left"></i>&nbsp;&nbsp;Retour à mon espace client</a>
			</p>
		</center>
	<?php endif; ?>

</div>
<div class="clear"></div>

<?php \Laravel\Section::stop(); ?>

<?php echo view('template')->with(get_defined_vars())->render(); ?>