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 BillItems 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->item_name = $model->item->name;
return parent::map($model);