mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for client portal constraint
This commit is contained in:
parent
f9fae690a0
commit
499d9f6b86
@ -32,7 +32,6 @@ class CheckClientExistence
|
||||
->where('email', auth('contact')->user()->email)
|
||||
->whereNotNull('email')
|
||||
->where('email', '<>', '')
|
||||
->where('account_id', auth('contact')->user()->client->company->account->id)
|
||||
->whereNull('deleted_at')
|
||||
->distinct('company_id')
|
||||
->distinct('email')
|
||||
@ -40,6 +39,9 @@ class CheckClientExistence
|
||||
->whereHas('client', function ($query) {
|
||||
return $query->whereNull('deleted_at');
|
||||
})
|
||||
->whereHas('client.company', function ($query){
|
||||
return $query->where('account_id', auth('contact')->user()->client->company->account->id);
|
||||
})
|
||||
->get();
|
||||
|
||||
if (count($multiple_contacts) == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user