diff --git a/changelog/58_UNRELEASED_2020-xx-xx.md b/changelog/58_UNRELEASED_2020-xx-xx.md index ef04ffad..03d6705a 100644 --- a/changelog/58_UNRELEASED_2020-xx-xx.md +++ b/changelog/58_UNRELEASED_2020-xx-xx.md @@ -11,6 +11,7 @@ - Fixed the conversion factor hint to display also decimal places on the purchase page (only displayed when the product has a different purchase/stock quantity unit) - Fixed that the stock entries page was broken when there were product userfields defined with enabled "Show as column in tables" - Fixed that best before dates were displayed on the stock overview and stock entries page even with disabled `GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING` +- Fixed that when editing a stock entry and setting a decimal amount, the decimal part was ignored (only possible when the product option "Allow partial units in stock" is enabled) ### Shopping list fixes - Fixed that the "shopping list to stock workflow"-dialog was not visible in compact view diff --git a/services/StockService.php b/services/StockService.php index 2b794bf2..d19e578b 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -598,7 +598,7 @@ class StockService extends BaseService return $this->getDatabase()->lastInsertId(); } - public function EditStockEntry(int $stockRowId, int $amount, $bestBeforeDate, $locationId, $shoppingLocationId, $price, $open, $purchasedDate) + public function EditStockEntry(int $stockRowId, float $amount, $bestBeforeDate, $locationId, $shoppingLocationId, $price, $open, $purchasedDate) { $stockRow = $this->getDatabase()->stock()->where('id = :1', $stockRowId)->fetch();