From 56b48ee3b76e641a48ee7aa5c3c1cb68009d9dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 23 Aug 2021 14:05:17 +0200 Subject: [PATCH] Skip rendering statements table if `invoices` is null --- app/Services/PdfMaker/Design.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index 7a56b2696bc0..9b4ca31d1da9 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -328,6 +328,10 @@ class Design extends BaseDesign { $tbody = []; + if (is_null($this->invoices)) { + return []; + } + foreach ($this->invoices as $invoice) { $element = ['element' => 'tr', 'elements' => []];