2019-11-16 07:21:14 +00:00
|
|
|
<?php
|
|
|
|
|
|
2019-12-31 12:49:09 +00:00
|
|
|
namespace App\Exports\Sales;
|
2019-11-16 07:21:14 +00:00
|
|
|
|
2019-12-31 12:49:09 +00:00
|
|
|
use App\Exports\Sales\Sheets\Invoices as Base;
|
|
|
|
|
use App\Exports\Sales\Sheets\InvoiceItems;
|
|
|
|
|
use App\Exports\Sales\Sheets\InvoiceItemTaxes;
|
|
|
|
|
use App\Exports\Sales\Sheets\InvoiceHistories;
|
|
|
|
|
use App\Exports\Sales\Sheets\InvoiceTotals;
|
2020-01-19 21:21:37 +00:00
|
|
|
use App\Exports\Sales\Sheets\InvoiceTransactions;
|
2021-04-17 22:39:36 +00:00
|
|
|
use Maatwebsite\Excel\Concerns\Exportable;
|
2019-11-16 07:21:14 +00:00
|
|
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
|
|
|
|
|
|
|
|
|
class Invoices implements WithMultipleSheets
|
|
|
|
|
{
|
2021-04-17 22:39:36 +00:00
|
|
|
use Exportable;
|
|
|
|
|
|
2019-11-16 07:21:14 +00:00
|
|
|
public $ids;
|
|
|
|
|
|
|
|
|
|
public function __construct($ids = null)
|
|
|
|
|
{
|
|
|
|
|
$this->ids = $ids;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function sheets(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
2021-05-22 23:27:44 +00:00
|
|
|
new Base($this->ids),
|
|
|
|
|
new InvoiceItems($this->ids),
|
|
|
|
|
new InvoiceItemTaxes($this->ids),
|
|
|
|
|
new InvoiceHistories($this->ids),
|
|
|
|
|
new InvoiceTotals($this->ids),
|
|
|
|
|
new InvoiceTransactions($this->ids),
|
2019-11-16 07:21:14 +00:00
|
|
|
];
|
|
|
|
|
}
|
2020-01-19 21:21:37 +00:00
|
|
|
}
|