1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Improve client filters

This commit is contained in:
David Bomba 2020-07-02 21:34:08 +10:00
parent 7f90d8d45b
commit 1cb7155812

View File

@ -51,7 +51,16 @@ class ClientFilters extends QueryFilters
public function email(string $email):Builder
{
return $this->builder->where('email', $email);
return
$this->builder->whereHas('contacts', function ($query) use ($email) {
$query->where('email', $email);
});
//return $this->builder->where('email', $email);
}
public function id_number(string $id_number):Builder