missing sample import files

This commit is contained in:
denisdulici
2020-01-20 00:21:37 +03:00
parent 9574f154a7
commit de1a090ff6
28 changed files with 97 additions and 56 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Exports\Sales;
use App\Models\Banking\Transaction as Model;
use Jenssegers\Date\Date;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Concerns\WithHeadings;
@@ -32,14 +33,17 @@ class Revenues implements FromCollection, ShouldAutoSize, WithHeadings, WithMapp
public function map($model): array
{
return [
$model->account_id,
$model->paid_at,
Date::parse($model->paid_at)->format('Y-m-d'),
$model->amount,
$model->currency_code,
$model->currency_rate,
$model->account_id,
$model->document_id,
$model->contact_id,
$model->category_id,
$model->description,
$model->payment_method,
$model->reference,
$model->reconciled,
];
}
@@ -47,14 +51,17 @@ class Revenues implements FromCollection, ShouldAutoSize, WithHeadings, WithMapp
public function headings(): array
{
return [
'account_id',
'paid_at',
'amount',
'currency_code',
'currency_rate',
'account_id',
'document_id',
'contact_id',
'category_id',
'description',
'payment_method',
'reference',
'reconciled',
];
}
@@ -63,4 +70,4 @@ class Revenues implements FromCollection, ShouldAutoSize, WithHeadings, WithMapp
{
return 'revenues';
}
}
}