Skip to content

Commit fe34767

Browse files
MAGETWO-96545: Wrong calculation of invoiced items in shipment document in order with bundle product after partial invoice
- Partial invoice feature has been removed for bundled products when it should be shipped together;
1 parent 22b4e3f commit fe34767

File tree

2 files changed

+2
-19
lines changed
  • app/code/Magento/Bundle

2 files changed

+2
-19
lines changed

app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -271,22 +271,4 @@ public function canShowPriceInfo($item)
271271
}
272272
return false;
273273
}
274-
275-
/**
276-
* Check if this iten should be shipped together
277-
*
278-
* @param object $item
279-
* @return bool
280-
*/
281-
public function isShipTogether($item)
282-
{
283-
$orderItem = $item->getOrderItem();
284-
if ($orderItem->getProductType() == \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
285-
$shipTogether = !$orderItem->isShipSeparately();
286-
} else {
287-
$shipTogether = !$orderItem->getParentItem()->isShipSeparately();
288-
}
289-
290-
return $shipTogether;
291-
}
292274
}

app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
<?php foreach ($items as $_item): ?>
3131
<?php
32-
$shipTogether = $block->isShipTogether($_item);
32+
$shipTogether = ($_item->getOrderItem()->getProductType() == \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) ?
33+
!$_item->getOrderItem()->isShipSeparately() : !$_item->getOrderItem()->getParentItem()->isShipSeparately()
3334
?>
3435
<?php $block->setPriceDataObject($_item) ?>
3536
<?php if ($_item->getOrderItem()->getParentItem()): ?>

0 commit comments

Comments
 (0)