Skip to content

Commit

Permalink
use InvoiceInterface instead of Invoice model to check if an invoice …
Browse files Browse the repository at this point in the history
…is set on the credit memo
  • Loading branch information
Anton Evers authored Nov 14, 2017
1 parent 72533ad commit 1d341ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Sales/Model/Order/Creditmemo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 1d341ef

Please sign in to comment.