fixed exports

This commit is contained in:
denisdulici
2020-02-21 21:37:48 +03:00
parent 8100983b3a
commit 3fdf2d9915
11 changed files with 71 additions and 11 deletions

View File

@ -20,7 +20,13 @@ class BillTransactions extends Export
public function map($model): array
{
$model->bill_number = $model->bill->bill_number;
$bill = $model->bill;
if (empty($bill)) {
return [];
}
$model->bill_number = $bill->bill_number;
$model->account_name = $model->account->name;
$model->category_name = $model->category->name;
$model->contact_email = $model->contact->email;