2017-04-15 23:16:20 +02:00
|
|
|
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
|
|
|
<h1 class="page-header">Dashboard</h1>
|
|
|
|
|
|
|
|
<h3>Current stock</h3>
|
|
|
|
<div class="table-responsive">
|
2017-04-16 23:11:03 +02:00
|
|
|
<table id="current-stock-table" class="table table-striped">
|
2017-04-15 23:16:20 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Product</th>
|
|
|
|
<th>Amount</th>
|
|
|
|
<th>Next best before date</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach ($currentStock as $currentStockEntry) : ?>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2017-04-16 23:11:03 +02:00
|
|
|
<?php echo GrocyPhpHelper::FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name; ?>
|
2017-04-15 23:16:20 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php echo $currentStockEntry->amount; ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
2017-04-16 23:11:03 +02:00
|
|
|
<?php echo $currentStockEntry->best_before_date; ?> <time class="timeago timeago-contextual" datetime="<?php echo $currentStockEntry->best_before_date; ?>"></time>
|
2017-04-15 23:16:20 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|