Skip to content

Commit 1d341ef

Browse files
author
Anton Evers
authored
use InvoiceInterface instead of Invoice model to check if an invoice is set on the credit memo
1 parent 72533ad commit 1d341ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public function canRefund()
389389
*/
390390
public function getInvoice()
391391
{
392-
if (!$this->getData('invoice') instanceof \Magento\Sales\Model\Order\Invoice && $this->getInvoiceId()) {
392+
if (!$this->getData('invoice') instanceof \Magento\Sales\Api\Data\InvoiceInterface && $this->getInvoiceId()) {
393393
$this->setInvoice($this->invoiceFactory->create()->load($this->getInvoiceId()));
394394
}
395395
return $this->getData('invoice');

0 commit comments

Comments
 (0)