mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Include archive/deleted clients/invoices in site search
This commit is contained in:
parent
7e0ba0da09
commit
b38cecabf1
@ -152,16 +152,16 @@ class AccountRepository
|
||||
if ($user->hasPermission('view_all')) {
|
||||
$clients = Client::scope()
|
||||
->with('contacts', 'invoices')
|
||||
->withArchived()
|
||||
->withTrashed()
|
||||
->with(['contacts', 'invoices' => function ($query) use ($user) {
|
||||
$query->withArchived();
|
||||
$query->withTrashed();
|
||||
}])->get();
|
||||
} else {
|
||||
$clients = Client::scope()
|
||||
->where('user_id', '=', $user->id)
|
||||
->withArchived()
|
||||
->withTrashed()
|
||||
->with(['contacts', 'invoices' => function ($query) use ($user) {
|
||||
$query->withArchived()
|
||||
$query->withTrashed()
|
||||
->where('user_id', '=', $user->id);
|
||||
}])->get();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user