mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Also show quantity unit on dashboard next to amount
This commit is contained in:
parent
14faf57a9e
commit
049a9cee06
@ -42,6 +42,7 @@ $app->get('/', function(Request $request, Response $response) use($db)
|
||||
'title' => 'Dashboard',
|
||||
'contentPage' => 'dashboard.php',
|
||||
'products' => $db->products(),
|
||||
'quantityunits' => $db->quantity_units(),
|
||||
'currentStock' => GrocyLogicStock::GetCurrentStock(),
|
||||
'missingProducts' => GrocyLogicStock::GetMissingProducts()
|
||||
]);
|
||||
|
@ -30,7 +30,7 @@
|
||||
<?php echo GrocyPhpHelper::FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $currentStockEntry->amount; ?>
|
||||
<?php echo $currentStockEntry->amount . ' ' . GrocyPhpHelper::FindObjectInArrayByPropertyValue($quantityunits, 'id', GrocyPhpHelper::FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $currentStockEntry->best_before_date; ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user