114 lines
2.9 KiB
PHP
114 lines
2.9 KiB
PHP
<?php
|
|
|
|
namespace App\Exports;
|
|
|
|
use App\Models\VwSkppHst;
|
|
use Maatwebsite\Excel\Concerns\FromQuery;
|
|
use Maatwebsite\Excel\Concerns\Exportable;
|
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
|
|
|
class SkppHstExport implements FromQuery, WithMapping, WithHeadings
|
|
{
|
|
use Exportable;
|
|
|
|
public function __construct(int $skppId)
|
|
{
|
|
$this->skpp_id = $skppId;
|
|
return $this;
|
|
}
|
|
|
|
public function query()
|
|
{
|
|
return VwSkppHst::query()->where("tx_skpp_id", $this->skpp_id);
|
|
}
|
|
|
|
public function columnFormats(): array
|
|
{
|
|
return [
|
|
'B' => NumberFormat::FORMAT_TEXT,
|
|
];
|
|
}
|
|
|
|
public function map($skpp_hst): array
|
|
{
|
|
return [
|
|
$skpp_hst->no_skpp,
|
|
"'".$skpp_hst->nip,
|
|
$skpp_hst->nrk,
|
|
$skpp_hst->nama,
|
|
$skpp_hst->nama_golongan,
|
|
$skpp_hst->status_pegawai,
|
|
$skpp_hst->tugas,
|
|
$skpp_hst->dinas,
|
|
$skpp_hst->tgl_akhir,
|
|
$skpp_hst->nama_hak,
|
|
$skpp_hst->nama_keputusan,
|
|
$skpp_hst->no_pen,
|
|
$skpp_hst->tgl_pen,
|
|
$skpp_hst->tgl_tmt,
|
|
$skpp_hst->ga_pok,
|
|
$skpp_hst->t_issum,
|
|
$skpp_hst->t_anak,
|
|
$skpp_hst->t_lain,
|
|
$skpp_hst->t_jab,
|
|
$skpp_hst->t_beras,
|
|
$skpp_hst->tpph,
|
|
$skpp_hst->bulat,
|
|
$skpp_hst->p_beras,
|
|
$skpp_hst->iuran,
|
|
$skpp_hst->ppph,
|
|
$skpp_hst->lain_2,
|
|
$skpp_hst->nama_kantor,
|
|
$skpp_hst->wilayah_kantor,
|
|
$skpp_hst->tgl_cetak,
|
|
$skpp_hst->keterangan,
|
|
$skpp_hst->nama_kantor1,
|
|
$skpp_hst->nama_kantor2,
|
|
$skpp_hst->wilayah,
|
|
$skpp_hst->revisi_remarks,
|
|
date("Y-m-d",strtotime($skpp_hst->created_at)),
|
|
];
|
|
}
|
|
|
|
public function headings(): array
|
|
{
|
|
return [
|
|
"No SKPP",
|
|
"NIP",
|
|
"NRK",
|
|
"Nama",
|
|
"Golongan",
|
|
"Status Pegawai",
|
|
"Tugas",
|
|
"Dinas",
|
|
"Tgl akhir",
|
|
"Hak",
|
|
"Keputusan",
|
|
"No Keputusan",
|
|
"Tgl Keputusan",
|
|
"Tgl TMT",
|
|
"Gaji Pokok",
|
|
"Tunjangan Suami Istri",
|
|
"Tunjangan Anak",
|
|
"Tunjangan Lain",
|
|
"Tunjangan Jabatan",
|
|
"Tunjangan Beras",
|
|
"Tunjangan PPH",
|
|
"Pembulatan",
|
|
"Potongan Beras",
|
|
"Iuran",
|
|
"Potongan PPH",
|
|
"lain - Lain",
|
|
"Kantor",
|
|
"Wilayah",
|
|
"Tgl Cetak",
|
|
"Pindah Tugas Kantor 1",
|
|
"Pindah Tugas Kantor 2",
|
|
"Pindah Tugas Wilayah",
|
|
"Keterangan",
|
|
"revisi_remarks",
|
|
"Tgl Dibuat",
|
|
];
|
|
}
|
|
} |