34 lines
955 B
PHP
Raw Normal View History

2019-11-16 10:21:14 +03:00
<?php
2019-12-31 15:49:09 +03:00
namespace App\Exports\Purchases;
2019-11-16 10:21:14 +03:00
2019-12-31 15:49:09 +03:00
use App\Exports\Purchases\Sheets\Bills as Base;
use App\Exports\Purchases\Sheets\BillItems;
use App\Exports\Purchases\Sheets\BillItemTaxes;
use App\Exports\Purchases\Sheets\BillHistories;
use App\Exports\Purchases\Sheets\BillTotals;
2020-01-20 00:21:37 +03:00
use App\Exports\Purchases\Sheets\BillTransactions;
2019-11-16 10:21:14 +03:00
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
class Bills implements WithMultipleSheets
{
public $ids;
public function __construct($ids = null)
{
$this->ids = $ids;
}
public function sheets(): array
{
return [
'bills' => new Base($this->ids),
'bill_items' => new BillItems($this->ids),
'bill_item_taxes' => new BillItemTaxes($this->ids),
'bill_histories' => new BillHistories($this->ids),
'bill_totals' => new BillTotals($this->ids),
2020-01-20 00:21:37 +03:00
'bill_transactions' => new BillTransactions($this->ids),
2019-11-16 10:21:14 +03:00
];
}
2020-01-20 00:21:37 +03:00
}