akaunting/app/Exports/Sales/Invoices.php

37 lines
919 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\Sales;
2019-11-16 10:21:14 +03:00
2019-12-31 15:49:09 +03: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-20 00:21:37 +03:00
use App\Exports\Sales\Sheets\InvoiceTransactions;
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 Invoices 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 InvoiceItems($this->ids),
new InvoiceItemTaxes($this->ids),
new InvoiceHistories($this->ids),
new InvoiceTotals($this->ids),
new InvoiceTransactions($this->ids),
2019-11-16 10:21:14 +03:00
];
}
2020-01-20 00:21:37 +03:00
}