From bed79659895af985bc3088def12feab5c966e7cc Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Mon, 27 Sep 2021 17:50:19 +0200 Subject: [PATCH] Fixed undo consume stock transaction location handling (references #1602) --- changelog/64_UNRELEASED_xxxx.xx.xx.md | 1 + services/StockService.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog/64_UNRELEASED_xxxx.xx.xx.md b/changelog/64_UNRELEASED_xxxx.xx.xx.md index 14799511..eb43565c 100644 --- a/changelog/64_UNRELEASED_xxxx.xx.xx.md +++ b/changelog/64_UNRELEASED_xxxx.xx.xx.md @@ -3,6 +3,7 @@ - Fixed that the context menu entries Consume and Transfer on the stock overview page were disabled when the amount in stock was < 1 - Fixed that when there was any chore with a schedule, but without a "next estimated tracking" date/time, the iCal export was broken - Fixed that on consuming a product from not the products default location, the products default location was recorded in the stock journal +- Fixed that on undoing a stock consume transaction from not the products default location, the corresponding amount was always added back to to the products defaullt location - The product and chore edit pages now have bottom-sticky save buttons - A product picture can now be added when creating a product (was currently only possible when editing a product) diff --git a/services/StockService.php b/services/StockService.php index 8b322e19..88e959a7 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -1352,7 +1352,8 @@ class StockService extends BaseService 'stock_id' => $logRow->stock_id, 'price' => $logRow->price, 'opened_date' => $logRow->opened_date, - 'open' => $logRow->opened_date !== null + 'open' => $logRow->opened_date !== null, + 'location_id' => $logRow->location_id ]); $stockRow->save();