We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 735579d commit 8ab5415Copy full SHA for 8ab5415
app/code/Magento/Sales/Model/Order.php
@@ -716,7 +716,7 @@ private function canCreditmemoForZeroTotal($totalRefunded)
716
$hasDueAmount = $this->canInvoice() && ($checkAmtTotalPaid);
717
//case when paid amount is refunded and order has creditmemo created
718
$creditmemos = ($this->getCreditmemosCollection() === false) ?
719
- true : (count($this->getCreditmemosCollection()) > 0);
+ true : ($this->_memoCollectionFactory->create()->setOrderFilter($this)->getTotalCount() > 0);
720
$paidAmtIsRefunded = $this->getTotalRefunded() == $totalPaid && $creditmemos;
721
if (($hasDueAmount || $paidAmtIsRefunded) ||
722
(!$checkAmtTotalPaid &&
0 commit comments