2019-11-16 10:21:14 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Exports\Banking;
|
|
|
|
|
2020-01-20 02:05:40 +03:00
|
|
|
use App\Abstracts\Export;
|
2019-11-16 10:21:14 +03:00
|
|
|
use App\Models\Banking\Transaction as Model;
|
|
|
|
|
2020-01-20 02:05:40 +03:00
|
|
|
class Transactions extends Export
|
2019-11-16 10:21:14 +03:00
|
|
|
{
|
|
|
|
public function collection()
|
|
|
|
{
|
|
|
|
return Model::usingSearchString(request('search'))->get();
|
|
|
|
}
|
|
|
|
|
2020-01-20 02:05:40 +03:00
|
|
|
public function fields(): array
|
2019-11-16 10:21:14 +03:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
'type',
|
|
|
|
'paid_at',
|
|
|
|
'amount',
|
|
|
|
'currency_code',
|
|
|
|
'currency_rate',
|
2020-01-20 00:21:37 +03:00
|
|
|
'account_id',
|
2019-11-16 10:21:14 +03:00
|
|
|
'document_id',
|
|
|
|
'contact_id',
|
2020-01-20 00:21:37 +03:00
|
|
|
'category_id',
|
|
|
|
'description',
|
2019-11-16 10:21:14 +03:00
|
|
|
'payment_method',
|
2020-01-20 00:21:37 +03:00
|
|
|
'reference',
|
2019-11-16 10:21:14 +03:00
|
|
|
'reconciled',
|
|
|
|
];
|
|
|
|
}
|
2020-01-20 00:21:37 +03:00
|
|
|
}
|