mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-31 15:42:03 -04:00
Include archived in search
This commit is contained in:
parent
98a1ac82f6
commit
b08d9d1298
@ -151,12 +151,17 @@ class AccountRepository
|
||||
if ($user->hasPermission('view_all')) {
|
||||
$clients = Client::scope()
|
||||
->with('contacts', 'invoices')
|
||||
->get();
|
||||
->withArchived()
|
||||
->with(['contacts', 'invoices' => function ($query) use ($user) {
|
||||
$query->withArchived();
|
||||
}])->get();
|
||||
} else {
|
||||
$clients = Client::scope()
|
||||
->where('user_id', '=', $user->id)
|
||||
->withArchived()
|
||||
->with(['contacts', 'invoices' => function ($query) use ($user) {
|
||||
$query->where('user_id', '=', $user->id);
|
||||
$query->withArchived()
|
||||
->where('user_id', '=', $user->id);
|
||||
}])->get();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user