Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 2m15s
Laravel Larastan / larastan (pull_request) Failing after 3m44s
49 lines
1.0 KiB
PHP
49 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Exports;
|
|
|
|
use Maatwebsite\Excel\Concerns\FromCollection;
|
|
use Maatwebsite\Excel\Concerns\FromArray;
|
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
|
|
|
class InvoicePendingReasonExport implements FromArray, WithHeadings, WithMapping
|
|
{
|
|
/**
|
|
* @return \Illuminate\Support\Collection
|
|
*/
|
|
protected array $data;
|
|
|
|
public function __construct(array $data)
|
|
{
|
|
$this->data = $data;
|
|
}
|
|
|
|
public function array(): array
|
|
{
|
|
return $this->data;
|
|
}
|
|
|
|
public function headings(): array
|
|
{
|
|
return [
|
|
'Plant Code',
|
|
'Document Number',
|
|
'Remark',
|
|
'Customer Trade Name',
|
|
'Location',
|
|
];
|
|
}
|
|
|
|
public function map($row): array
|
|
{
|
|
return [
|
|
$row['plant_id'] ?? '',
|
|
$row['document_number'] ?? '',
|
|
$row['remark'] ?? '',
|
|
$row['customer_trade_name'] ?? '',
|
|
$row['location'] ?? '',
|
|
];
|
|
}
|
|
}
|