diff --git a/vendor/magento/module-inventory-source-selection-api/Model/Algorithms/Result/GetDefaultSortedSourcesResult.php b/vendor/magento/module-inventory-source-selection-api/Model/Algorithms/Result/GetDefaultSortedSourcesResult.php index c7f69e05512d..230f3ac40eac 100644 --- a/vendor/magento/module-inventory-source-selection-api/Model/Algorithms/Result/GetDefaultSortedSourcesResult.php +++ b/vendor/magento/module-inventory-source-selection-api/Model/Algorithms/Result/GetDefaultSortedSourcesResult.php @@ -96,7 +96,7 @@ public function execute( $itemsTdDeliver = []; foreach ($inventoryRequest->getItems() as $item) { $normalizedSku = $this->normalizeSku($item->getSku()); - $itemsTdDeliver[$normalizedSku] = $item->getQty(); + $itemsTdDeliver[$normalizedSku] = ($itemsTdDeliver[$normalizedSku] ?? 0) + $item->getQty(); } $sortedSourceCodes = [];