From f44060400757eb9eda7b4883dd6ca02497f38336 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 6 Mar 2020 20:56:11 +0100 Subject: [PATCH] Fixed Location Content Sheet product ordering (fixes #590) --- changelog/56_UNRELEASED_2020-xx-xx.md | 1 + services/StockService.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/56_UNRELEASED_2020-xx-xx.md b/changelog/56_UNRELEASED_2020-xx-xx.md index 47190f10..a4086212 100644 --- a/changelog/56_UNRELEASED_2020-xx-xx.md +++ b/changelog/56_UNRELEASED_2020-xx-xx.md @@ -3,6 +3,7 @@ If you run grocy in a subdirectory, you need to set a new `config.php` setting ( ### Stock fixes - Fixed purchase/consume/inventory problems when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was set to `false` +- Fixed that products on the Location Content Sheet were not ordered by the product name ### Shopping list improvements/fixes - Added an option to hide the month-calendar (in the shopping list settings / top right corner settings menu) (defaults to disabled, so please enable this option if you still want to have the month-calendar on the shopping list) diff --git a/services/StockService.php b/services/StockService.php index ec9a3934..bfde3fc2 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -41,7 +41,7 @@ class StockService extends BaseService public function GetCurrentStockLocationContent() { - $sql = 'SELECT * FROM stock_current_location_content'; + $sql = 'SELECT sclc.* FROM stock_current_location_content sclc JOIN products p ON sclc.product_id = p.id ORDER BY p.name'; return $this->getDatabaseService()->ExecuteDbQuery($sql)->fetchAll(\PDO::FETCH_OBJ); }