From 8133c4810beff599f8db29cfe361f5791ce001a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Thu, 3 Feb 2022 14:18:16 +0100 Subject: [PATCH] Invoice item - fix offset --- src/InvoiceManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InvoiceManager.php b/src/InvoiceManager.php index 464c7b1..cf0dc71 100644 --- a/src/InvoiceManager.php +++ b/src/InvoiceManager.php @@ -52,7 +52,7 @@ public function createInvoice(OrderInterface $order): Invoice $invoiceItem = $this->invoiceRepository->getByOrder($order); if ($invoiceItem !== []) { /** @var Invoice $invoice */ - $invoice = $invoiceItem; + $invoice = $invoiceItem[0]; $invoice->setPrice($order->getPrice()); } else { assert($order instanceof Order);