Skip to content

Commit

Permalink
magento#2598: Fixed issue with stock name duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Idolov committed Dec 17, 2019
1 parent bd4b566 commit 77c278e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,20 @@ public function execute(int $orderId): array

$select = $connection->select()
->from(
["inv_source" => $inventorySourceTableName],
['source_name' => 'inv_source.name']
['inventory_source' => $inventorySourceTableName],
['source_name' => 'inventory_source.name']
)
->joinInner(
['shipment_source' => $inventoryShipmentSourceTableName],
'shipment_source.source_code = inv_source.source_code',
'shipment_source.source_code = inventory_source.source_code',
[]
)
->joinInner(
['sales_shipment' => $shipmentTableName],
'shipment_source.shipment_id = sales_shipment.entity_id',
[]
)
->group('inventory_source.source_code')
->where('sales_shipment.order_id = ?', $orderId);

return $connection->fetchCol($select);
Expand Down

0 comments on commit 77c278e

Please sign in to comment.