Skip to content

Commit ff42194

Browse files
ENGCOM-3594: remove condition from invoice cancel #19462
- Merge Pull Request #19462 from omaxmo/magento2:2.3-develop - Merged commits: 1. e3a8af6
2 parents 733f2fc + e3a8af6 commit ff42194

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,6 @@ public function cancel()
445445
$order->setBaseDiscountInvoiced($order->getBaseDiscountInvoiced() - $this->getBaseDiscountAmount());
446446
$order->setBaseTotalInvoicedCost($order->getBaseTotalInvoicedCost() - $this->getBaseCost());
447447

448-
if ($this->getState() == self::STATE_PAID) {
449-
$order->setTotalPaid($order->getTotalPaid() - $this->getGrandTotal());
450-
$order->setBaseTotalPaid($order->getBaseTotalPaid() - $this->getBaseGrandTotal());
451-
}
452448
$this->setState(self::STATE_CANCELED);
453449
$order->setState(\Magento\Sales\Model\Order::STATE_PROCESSING)
454450
->setStatus($order->getConfig()->getStateDefaultStatus(\Magento\Sales\Model\Order::STATE_PROCESSING));

0 commit comments

Comments
 (0)