From 9dd0ed264c0e108cb4ab6623bbf8983dba7b788b Mon Sep 17 00:00:00 2001 From: Kurt Riddlesperger Date: Wed, 26 Aug 2020 18:22:40 -0500 Subject: [PATCH] Include location and shopping_location_id when opening products --- services/StockService.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/StockService.php b/services/StockService.php index ca2e7ca6..4b390483 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -789,6 +789,8 @@ class StockService extends BaseService 'best_before_date' => $stockEntry->best_before_date, 'purchased_date' => $stockEntry->purchased_date, 'stock_id' => $stockEntry->stock_id, + 'location_id' => $stockEntry->location_id, + 'shopping_location_id' => $stockEntry->shopping_location_id, 'transaction_type' => self::TRANSACTION_TYPE_PRODUCT_OPENED, 'price' => $stockEntry->price, 'opened_date' => date('Y-m-d'), @@ -813,6 +815,8 @@ class StockService extends BaseService 'amount' => $restStockAmount, 'best_before_date' => $stockEntry->best_before_date, 'purchased_date' => $stockEntry->purchased_date, + 'location_id' => $stockEntry->location_id, + 'shopping_location_id' => $stockEntry->shopping_location_id, 'stock_id' => $stockEntry->stock_id, 'price' => $stockEntry->price )); @@ -824,6 +828,8 @@ class StockService extends BaseService 'best_before_date' => $stockEntry->best_before_date, 'purchased_date' => $stockEntry->purchased_date, 'stock_id' => $stockEntry->stock_id, + 'location_id' => $stockEntry->location_id, + 'shopping_location_id' => $stockEntry->shopping_location_id, 'transaction_type' => self::TRANSACTION_TYPE_PRODUCT_OPENED, 'price' => $stockEntry->price, 'opened_date' => date('Y-m-d'),