From 444b3f2375e025c8a75f57d3b413fb8683ed4b36 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 22 Jun 2022 14:26:10 +1000 Subject: [PATCH] Improve queries for client statements --- app/Services/Client/Statement.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Services/Client/Statement.php b/app/Services/Client/Statement.php index b96e4b51ff12..93f9b783768a 100644 --- a/app/Services/Client/Statement.php +++ b/app/Services/Client/Statement.php @@ -220,6 +220,7 @@ class Statement protected function getInvoices(): \Illuminate\Support\LazyCollection { return Invoice::withTrashed() + ->with('payments.type') ->where('is_deleted', false) ->where('company_id', $this->client->company_id) ->where('client_id', $this->client->id)