57 lines
1.9 KiB
PHP
57 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Exports;
|
|
|
|
use Illuminate\Contracts\View\View;
|
|
use Maatwebsite\Excel\Concerns\FromView;
|
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
|
use Maatwebsite\Excel\Concerns\WithTitle;
|
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
|
|
|
class LelonganFullExport implements FromView, ShouldAutoSize, WithTitle, WithColumnFormatting
|
|
{
|
|
protected $cawangan_detail;
|
|
protected $query;
|
|
protected $lelongan_full_data;
|
|
|
|
public function __construct($cawangan_detail, $query, $lelongan_full_data)
|
|
{
|
|
$this->cawangan_detail = $cawangan_detail;
|
|
$this->query = $query;
|
|
$this->lelongan_full_data = $lelongan_full_data;
|
|
}
|
|
|
|
public function view(): View
|
|
{
|
|
return view('exports.lelongan.full', [
|
|
'cawangan_detail' => $this->cawangan_detail,
|
|
'query' => $this->query,
|
|
'lelongan_data' => $this->lelongan_full_data,
|
|
]);
|
|
}
|
|
|
|
public function title(): string
|
|
{
|
|
return 'SENARAI LELONGAN PENUH';
|
|
}
|
|
|
|
public function columnFormats(): array
|
|
{
|
|
return [
|
|
'E' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Berat
|
|
'F' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Nilai Marhun
|
|
'G' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Pinjaman
|
|
'H' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Keuntungan
|
|
'I' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // caj lelong
|
|
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
|
'K' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
|
'L' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
|
'M' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
|
'N' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
|
'O' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
|
|
|
];
|
|
}
|
|
}
|