Improve queries for client statements
This commit is contained in:
parent
7515d0e689
commit
444b3f2375
1 changed files with 1 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue