Skip to content

Commit c0a0773

Browse files
committed
ACP2E-3947: Order status stuck on Processing
1 parent 7accebf commit c0a0773

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/code/Magento/Sales/Model/Order.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,16 @@ public function canShip()
887887
private function checkItemShipping(): bool
888888
{
889889
foreach ($this->getAllItems() as $item) {
890-
$qtyToShip = !$item->getParentItem() || $item->getParentItem()->getProductType() !== Type::TYPE_BUNDLE ?
891-
$item->getQtyToShip() : $item->getSimpleQtyToShip();
890+
if (!$item->getParentItem() || $item->getParentItem()->getProductType() !== Type::TYPE_BUNDLE) {
891+
$qtyToShip = $item->getQtyToShip();
892+
} else {
893+
if ($item->getParentItem()->getProductType() === Type::TYPE_BUNDLE &&
894+
$item->getParentItem()->getProduct()->getShipmentType() == Type\AbstractType::SHIPMENT_TOGETHER) {
895+
$qtyToShip = $item->getParentItem()->getQtyToShip();
896+
} else {
897+
$qtyToShip = $item->getSimpleQtyToShip();
898+
}
899+
}
892900

893901
if ($qtyToShip > 0 && !$item->getIsVirtual() && !$item->getLockedDoShip()) {
894902
return true;

0 commit comments

Comments
 (0)