33 lines
893 B
PHP
33 lines
893 B
PHP
<?php
|
|
|
|
namespace App\Exports;
|
|
|
|
use App\Exports\Sheets\LoveIncome;
|
|
use App\Exports\Sheets\SaasIncomeV2;
|
|
use Maatwebsite\Excel\Concerns\FromCollection;
|
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
|
|
|
class StatementExportV3 implements WithMultipleSheets
|
|
{
|
|
protected $start_date, $end_date;
|
|
public function __construct($start_date)
|
|
{
|
|
$this->start_date = date('Y-m-d', strtotime($start_date));
|
|
$this->end_date = date("Y-m-d", strtotime('next month', strtotime($start_date)));
|
|
}
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function sheets(): array
|
|
{
|
|
// TODO: Implement sheets() method.
|
|
$sheets = [
|
|
//Saas收入明细
|
|
new SaasIncomeV2($this->start_date, $this->end_date),
|
|
//福恋产品收入明细
|
|
new LoveIncome($this->start_date,$this->end_date),
|
|
];
|
|
return $sheets;
|
|
}
|
|
}
|