From f5eff8ab4901bb8bd3d47eb5b874a4c7a2e0daaa Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sun, 21 Feb 2021 18:18:34 +0100 Subject: [PATCH] Include due_type = "Expiration date" products in /stock/volatile API endpoint (fixes #1372) --- changelog/62_UNRELEASED_xxxx-xx-xx.md | 1 + services/StockService.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/62_UNRELEASED_xxxx-xx-xx.md b/changelog/62_UNRELEASED_xxxx-xx-xx.md index 3824ab34..63e6e97a 100644 --- a/changelog/62_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/62_UNRELEASED_xxxx-xx-xx.md @@ -6,3 +6,4 @@ - Fixed that the current stock total value (header of the stock overview page) didn't include decimal amounts (thanks @Ape) - Some night mode style improvements (thanks @BlizzWave and @KTibow) - Recipe printing improvements (thanks @Ape) +- Fixed that due soon products with `due_type` = "Expiration date" were missing in `due_products` of the `/stock/volatile` endpoint diff --git a/services/StockService.php b/services/StockService.php index 6cad4592..e26c6d7f 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -520,7 +520,6 @@ class StockService extends BaseService { $currentStock = $this->GetCurrentStock(false); $currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d 23:59:59', strtotime("+$days days")), '<'); - $currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'due_type', 1); if ($excludeOverdue) {