mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 17:44:34 -04:00
Make client_id query filter a global filter option
This commit is contained in:
parent
857e56fef7
commit
ddf6e94c43
@ -67,18 +67,6 @@ class InvoiceFilters extends QueryFilters
|
|||||||
return $this->builder;
|
return $this->builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function client_id(string $client_id = '') :Builder
|
|
||||||
{
|
|
||||||
if (strlen($client_id) == 0) {
|
|
||||||
return $this->builder;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->builder->where('client_id', $this->decodePrimaryKey($client_id));
|
|
||||||
|
|
||||||
return $this->builder;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function number(string $number) :Builder
|
public function number(string $number) :Builder
|
||||||
{
|
{
|
||||||
return $this->builder->where('number', $number);
|
return $this->builder->where('number', $number);
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
namespace App\Filters;
|
namespace App\Filters;
|
||||||
|
|
||||||
//use Illuminate\Database\Query\Builder;
|
//use Illuminate\Database\Query\Builder;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
@ -20,6 +21,8 @@ use Illuminate\Http\Request;
|
|||||||
*/
|
*/
|
||||||
abstract class QueryFilters
|
abstract class QueryFilters
|
||||||
{
|
{
|
||||||
|
use MakesHash;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* active status.
|
* active status.
|
||||||
*/
|
*/
|
||||||
@ -177,6 +180,18 @@ abstract class QueryFilters
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function client_id(string $client_id = '') :Builder
|
||||||
|
{
|
||||||
|
if (strlen($client_id) == 0) {
|
||||||
|
return $this->builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->builder->where('client_id', $this->decodePrimaryKey($client_id));
|
||||||
|
|
||||||
|
return $this->builder;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function filter_deleted_clients($value)
|
public function filter_deleted_clients($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user