Include due_type = "Expiration date" products in /stock/volatile API endpoint (fixes #1372)

This commit is contained in:
Bernd Bestel
2021-02-21 18:18:34 +01:00
parent 36f5fb23e9
commit f5eff8ab49
2 changed files with 1 additions and 1 deletions

View File

@@ -6,3 +6,4 @@
- Fixed that the current stock total value (header of the stock overview page) didn't include decimal amounts (thanks @Ape) - 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) - Some night mode style improvements (thanks @BlizzWave and @KTibow)
- Recipe printing improvements (thanks @Ape) - 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

View File

@@ -520,7 +520,6 @@ class StockService extends BaseService
{ {
$currentStock = $this->GetCurrentStock(false); $currentStock = $this->GetCurrentStock(false);
$currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d 23:59:59', strtotime("+$days days")), '<'); $currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d 23:59:59', strtotime("+$days days")), '<');
$currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'due_type', 1);
if ($excludeOverdue) if ($excludeOverdue)
{ {