Improve queries for client statements

This commit is contained in:
David Bomba 2022-06-22 14:26:10 +10:00
parent 7515d0e689
commit 444b3f2375

View File

@ -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)