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;
|
2021-04-18 01:39:36 +03:00
|
|
|
use Maatwebsite\Excel\Concerns\Exportable;
|
2019-11-16 10:21:14 +03:00
|
|
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
|
|
|
|
|
|
|
class Bills implements WithMultipleSheets
|
|
|
|
{
|
2021-04-18 01:39:36 +03:00
|
|
|
use Exportable;
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
public $ids;
|
|
|
|
|
|
|
|
public function __construct($ids = null)
|
|
|
|
{
|
|
|
|
$this->ids = $ids;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function sheets(): array
|
|
|
|
{
|
|
|
|
return [
|
2021-05-23 02:27:44 +03:00
|
|
|
new Base($this->ids),
|
|
|
|
new BillItems($this->ids),
|
|
|
|
new BillItemTaxes($this->ids),
|
|
|
|
new BillHistories($this->ids),
|
|
|
|
new BillTotals($this->ids),
|
|
|
|
new BillTransactions($this->ids),
|
2019-11-16 10:21:14 +03:00
|
|
|
];
|
|
|
|
}
|
2020-01-20 00:21:37 +03:00
|
|
|
}
|