mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
Bank Transaction Filters
This commit is contained in:
parent
52a01cb924
commit
e73df693aa
@ -12,6 +12,7 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Factory\BankTransactionFactory;
|
use App\Factory\BankTransactionFactory;
|
||||||
|
use App\Filters\BankTransactionFilters;
|
||||||
use App\Helpers\Bank\Yodlee\Yodlee;
|
use App\Helpers\Bank\Yodlee\Yodlee;
|
||||||
use App\Http\Requests\BankTransaction\AdminBankTransactionRequest;
|
use App\Http\Requests\BankTransaction\AdminBankTransactionRequest;
|
||||||
use App\Http\Requests\BankTransaction\CreateBankTransactionRequest;
|
use App\Http\Requests\BankTransaction\CreateBankTransactionRequest;
|
||||||
@ -92,13 +93,13 @@ class BankTransactionController extends BaseController
|
|||||||
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
||||||
* ),
|
* ),
|
||||||
* )
|
* )
|
||||||
* @param Request $request
|
* @param BankTransactionFilters $filter
|
||||||
* @return Response|mixed
|
* @return Response|mixed
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(BankTransactionFilters $filters)
|
||||||
{
|
{
|
||||||
|
|
||||||
$bank_transactions = BankTransaction::query()->company();
|
$bank_transactions = BankTransaction::filter($filters);
|
||||||
|
|
||||||
return $this->listResponse($bank_transactions);
|
return $this->listResponse($bank_transactions);
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Models\Filterable;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
@ -19,7 +20,8 @@ class BankTransaction extends BaseModel
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
|
use Filterable;
|
||||||
|
|
||||||
const STATUS_UNMATCHED = 1;
|
const STATUS_UNMATCHED = 1;
|
||||||
|
|
||||||
const STATUS_MATCHED = 2;
|
const STATUS_MATCHED = 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user