2021-10-03 08:58:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Exports;
|
|
|
|
|
|
|
|
use Maatwebsite\Excel\Concerns\FromArray;
|
|
|
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
|
|
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
|
|
|
|
2021-10-04 11:01:26 +00:00
|
|
|
class RefundAmountExport implements FromArray, WithColumnFormatting, ShouldAutoSize
|
2021-10-03 08:58:41 +00:00
|
|
|
{
|
|
|
|
protected $data;
|
|
|
|
|
|
|
|
public function __construct(array $data)
|
|
|
|
{
|
|
|
|
$this->data = $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function array(): array
|
|
|
|
{
|
|
|
|
return $this->data;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function columnFormats(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'C' => NumberFormat::FORMAT_TEXT,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|