From 5837d544eae91cddb8c0d82234505a2a47eeb26d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 21 Sep 2021 22:40:00 +1000 Subject: [PATCH] return early if no payments --- app/Services/PdfMaker/Design.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index 8625585f0c31..069aaf6809be 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -428,7 +428,7 @@ class Design extends BaseDesign public function statementPaymentTableTotals(): array { - if (is_null($this->payments) && $this->type !== self::STATEMENT) { + if (!$this->payments->first() || $this->type !== self::STATEMENT) { return []; }