30 lines
853 B
PHP
30 lines
853 B
PHP
<table class="table table-striped table-condensed table-hover" id="list-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Category</th>
|
|
<th>Supplier</th>
|
|
<th>Count</th>
|
|
<th>Revenue</th>
|
|
<th>Cost</th>
|
|
<th>%</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($o as $cat => $details) : ?>
|
|
<tr><td><?php echo $cat; ?></td><td colspan="5"> </td></tr>
|
|
|
|
<tr>
|
|
<?php foreach ($details as $supplier => $summary) : ?>
|
|
<td> </td>
|
|
<td><?php echo $supplier; ?></td>
|
|
<td><?php echo $summary['count']; ?></td>
|
|
<td><?php echo Currency::display($summary['revenue']); ?></td>
|
|
<td><?php echo Currency::display($summary['cost']); ?></td>
|
|
<td><?php echo $summary['cost'] ? Currency::display($summary['revenue']/$summary['cost'],2) : '-'; ?></td>
|
|
</tr>
|
|
<?php endforeach ?> <!-- /details -->
|
|
<?php endforeach ?>
|
|
</tbody>
|
|
</table>
|