Skip to content

Commit a47f0a1

Browse files
committed
ACP2E-2756: [Cloud] Order Status changed to complete when partially refund of a partially shipped order
- fixed bug: order was being completed after invoiced
1 parent 4cc93a0 commit a47f0a1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -887,12 +887,11 @@ public function canShip()
887887
private function checkItemShipping(): bool
888888
{
889889
foreach ($this->getAllItems() as $item) {
890-
if (!$item->getParentItem()) {
891-
$qtyToShip = $item->getQtyToShip();
890+
$qtyToShip = !$item->getParentItem() || $item->getParentItem()->getProductType() !== Type::TYPE_BUNDLE ?
891+
$item->getQtyToShip() : $item->getSimpleQtyToShip();
892892

893-
if ($qtyToShip > 0 && !$item->getIsVirtual() && !$item->getLockedDoShip()) {
894-
return true;
895-
}
893+
if ($qtyToShip > 0 && !$item->getIsVirtual() && !$item->getLockedDoShip()) {
894+
return true;
896895
}
897896
}
898897

0 commit comments

Comments
 (0)