Skip to content

Commit

Permalink
Merge pull request magento#987 from magento-engcom/MSI-640
Browse files Browse the repository at this point in the history
Source Deduction improvements
  • Loading branch information
maghamed authored Apr 20, 2018
2 parents 3d8a0b3 + 66a664d commit 83fca9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/code/Magento/InventoryShipping/Observer/GetItemsToDeduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function execute(Item $shipmentItem): array
if ($orderItem->isDummy(true)) {
return [];
}
$itemsToShip[] = $this->itemToDeduct->create($this->processComplexItem($shipmentItem));
$itemsToShip[] = $this->processComplexItem($shipmentItem);
} else {
$itemSku = $shipmentItem->getSku() ?: $this->getSkusByProductIds->execute(
[$shipmentItem->getProductId()]
Expand Down Expand Up @@ -98,10 +98,10 @@ private function processComplexItem(Item $shipmentItem): array
$itemSku = $item->getSku() ?: $this->getSkusByProductIds->execute(
[$item->getProductId()]
)[$item->getProductId()];
$itemsToShip = [
$itemsToShip = $this->itemToDeduct->create([
'sku' => $itemSku,
'qty' => $qty
];
]);
continue;
}
} else {
Expand All @@ -110,10 +110,10 @@ private function processComplexItem(Item $shipmentItem): array
[$shipmentItem->getProductId()]
)[$shipmentItem->getProductId()];
$qty = $this->castQty($orderItem, $shipmentItem->getQty());
$itemsToShip =[
$itemsToShip = $this->itemToDeduct->create([
'sku' => $itemSku,
'qty' => $qty
];
]);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
<link name="qtyAvailable">${$.parentName}.qtyAvailable:value</link>
<link name="toggleDisable">ns = ${ $.ns }, index = sourceCode:value</link>
</imports>
<disabled>true</disabled>
</settings>
</field>
</container>
Expand Down

0 comments on commit 83fca9c

Please sign in to comment.