Fix countries for documents #1p66u4u

This commit is contained in:
Cüneyt Şentürk
2021-11-08 02:40:40 +03:00
parent 4f1146dc33
commit d9d0e09e3a
15 changed files with 112 additions and 5 deletions

View File

@ -12,6 +12,13 @@ class Customers extends Export
return Model::customer()->collectForExport($this->ids);
}
public function map($model): array
{
$model->country = ($model->country) ? trans('countries.' . $model->country) : null;
return parent::map($model);
}
public function fields(): array
{
return [
@ -20,6 +27,10 @@ class Customers extends Export
'tax_number',
'phone',
'address',
'country',
'state',
'zip_code',
'city',
'website',
'currency_code',
'reference',