1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #8232 from turbo124/v5-develop

Minor cleanup for filters
This commit is contained in:
David Bomba 2023-01-31 19:24:42 +11:00 committed by GitHub
commit 58e53aa961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1 additions and 23 deletions

View File

@ -11,11 +11,7 @@
namespace App\Filters;
use App\Models\BankTransactionRule;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Gate;
/**
* BankTransactionRuleilters.
@ -73,19 +69,6 @@ class BankTransactionRuleFilters extends QueryFilters
return $this->builder->orderBy($sort_col[0], $sort_col[1]);
}
/**
* Returns the base query.
*
* @param int company_id
* @param User $user
* @return Builder
* @deprecated
*/
public function baseQuery(int $company_id, User $user): Builder
{
}
/**
* Filters the query by the users company ID.
*

View File

@ -11,11 +11,7 @@
namespace App\Filters;
use App\Models\Client;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Gate;
/**
* ClientFilters.

View File

@ -11,7 +11,6 @@
namespace App\Filters;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
/**

View File

@ -62,7 +62,6 @@ class DesignFilters extends QueryFilters
*/
public function entityFilter(): Builder
{
//return $this->builder->whereCompanyId(auth()->user()->company()->id);
return $this->builder->where('company_id', auth()->user()->company()->id)->orWhere('company_id', null)->orderBy('id','asc');
}
}

View File

@ -39,6 +39,7 @@ class DocumentFilters extends QueryFilters
* Overriding method as client_id does
* not exist on this model, just pass
* back the builder
*
* @param string $client_id The client hashed id.
*
* @return Builder