From 1d341efa8875779b266c00bee84c9d88f2037c59 Mon Sep 17 00:00:00 2001 From: Anton Evers Date: Tue, 14 Nov 2017 09:22:10 +0100 Subject: [PATCH] use InvoiceInterface instead of Invoice model to check if an invoice is set on the credit memo --- app/code/Magento/Sales/Model/Order/Creditmemo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Creditmemo.php index 3cf4d01727338..64b903fe5b5c1 100644 --- a/app/code/Magento/Sales/Model/Order/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php @@ -389,7 +389,7 @@ public function canRefund() */ public function getInvoice() { - if (!$this->getData('invoice') instanceof \Magento\Sales\Model\Order\Invoice && $this->getInvoiceId()) { + if (!$this->getData('invoice') instanceof \Magento\Sales\Api\Data\InvoiceInterface && $this->getInvoiceId()) { $this->setInvoice($this->invoiceFactory->create()->load($this->getInvoiceId())); } return $this->getData('invoice');