From 049a9cee064195485b1d61f764e61d1bb76e690b Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 22 Apr 2017 11:38:43 +0200 Subject: [PATCH] Also show quantity unit on dashboard next to amount --- index.php | 1 + views/dashboard.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index b9749eb9..c55f6e81 100644 --- a/index.php +++ b/index.php @@ -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() ]); diff --git a/views/dashboard.php b/views/dashboard.php index af4831a3..ea26196f 100644 --- a/views/dashboard.php +++ b/views/dashboard.php @@ -30,7 +30,7 @@ product_id)->name; ?> - amount; ?> + amount . ' ' . GrocyPhpHelper::FindObjectInArrayByPropertyValue($quantityunits, 'id', GrocyPhpHelper::FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name; ?> best_before_date; ?>