Skip to content

Commit 4cc93a0

Browse files
committed
ACP2E-2756: [Cloud] Order Status changed to complete when partially refund of a partially shipped order
- fixed bug: order was being set to closed status
1 parent 31dc9a8 commit 4cc93a0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,7 @@ private function checkItemShipping(): bool
888888
{
889889
foreach ($this->getAllItems() as $item) {
890890
if (!$item->getParentItem()) {
891-
$qtyToShip = !$item->getParentItem() || $item->getParentItem()->getProductType() !== Type::TYPE_BUNDLE ?
892-
$item->getQtyToShip() : $item->getSimpleQtyToShip();
891+
$qtyToShip = $item->getQtyToShip();
893892

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

app/code/Magento/Sales/Model/ResourceModel/Order/Handler/State.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function check(Order $order)
2727
->setStatus($order->getConfig()->getStateDefaultStatus(Order::STATE_PROCESSING));
2828
$currentState = Order::STATE_PROCESSING;
2929
}
30-
if ($order->isCanceled() && $order->canUnhold() && $order->canInvoice()) {
30+
if ($order->isCanceled() || $order->canUnhold() || $order->canInvoice()) {
3131
return $this;
3232
}
3333

0 commit comments

Comments
 (0)