From 8e26bd2c310681d3a8b763c3d9ae285cfe68f95a Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 3 Jan 2020 13:55:14 +0100 Subject: [PATCH] Allow partial units during inventory (fixes #459) --- changelog/55_UNRELEASED_2019-xx-xx.md | 3 +++ services/StockService.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog/55_UNRELEASED_2019-xx-xx.md b/changelog/55_UNRELEASED_2019-xx-xx.md index a52c6ca0..7ba8f5c6 100644 --- a/changelog/55_UNRELEASED_2019-xx-xx.md +++ b/changelog/55_UNRELEASED_2019-xx-xx.md @@ -4,6 +4,9 @@ - From there you can also edit the stock entries - A huge THANK YOU goes to @kriddles for the work on this feature +### Stock fixes +- Fixed that entering partial amounts was not possible on the inventory page (only applies if the product option "Allow partial units in stock" is enabled) + ### Shopping list fixes - Fixed that when `FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS` was set to `false`, the shopping list appeared empty after some actions diff --git a/services/StockService.php b/services/StockService.php index 2e42dd20..efde1419 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -604,7 +604,7 @@ class StockService extends BaseService return $returnValue; } - public function InventoryProduct(int $productId, int $newAmount, $bestBeforeDate, $locationId = null, $price = null) + public function InventoryProduct(int $productId, float $newAmount, $bestBeforeDate, $locationId = null, $price = null) { if (!$this->ProductExists($productId)) {