From 43747123466c89adb4268fb1b7d31c389eeff003 Mon Sep 17 00:00:00 2001 From: Rosemary Orchard <16113535+RosemaryOrchard@users.noreply.github.com> Date: Mon, 18 Apr 2022 11:05:28 +0100 Subject: [PATCH] Only move it if it's moving --- services/StockService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/StockService.php b/services/StockService.php index c281569a..84728376 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -1059,7 +1059,7 @@ class StockService extends BaseService } if ($product->move_on_open) { $locationIdTo = $product->default_consume_location_id; - if ($locationIdTo) { + if ($locationIdTo && $locationIdTo !== $stockEntry->location_id) { $this->TransferProduct($stockEntry->product_id, $amount, $stockEntry->location_id, $locationIdTo, $stockEntry->stock_id, $transactionId); } }