Perubahan NIP petik kolom NIP, NPWP, dan Nomor Rekening semua export excel
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Exports\Concerns\EnrichesJabatanData;
|
||||
use App\Exports\Concerns\ForcesTextColumns;
|
||||
use App\Services\DawaiService;
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Maatwebsite\Excel\Concerns\WithStyles;
|
||||
@@ -14,9 +16,19 @@ use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||
|
||||
class R13SelisihExport implements FromCollection, ShouldAutoSize, WithColumnFormatting, WithHeadings, WithMapping, WithStyles
|
||||
class R13SelisihExport implements FromCollection, ShouldAutoSize, WithColumnFormatting, WithCustomValueBinder, WithHeadings, WithMapping, WithStyles
|
||||
{
|
||||
use EnrichesJabatanData;
|
||||
use EnrichesJabatanData, ForcesTextColumns;
|
||||
|
||||
protected function nipColumns(): array
|
||||
{
|
||||
return ['C'];
|
||||
}
|
||||
|
||||
protected function alwaysTextColumns(): array
|
||||
{
|
||||
return ['P', 'Q'];
|
||||
}
|
||||
|
||||
protected $jenisPegawai;
|
||||
|
||||
@@ -54,7 +66,7 @@ class R13SelisihExport implements FromCollection, ShouldAutoSize, WithColumnForm
|
||||
|
||||
return (object) [
|
||||
'no' => 0, // Temporary, will be set after sorting
|
||||
'nip' => $item['nip'] ? "'".trim($item['nip'], "'") : '',
|
||||
'nip' => $item['nip'] ? trim($item['nip'], "'") : '',
|
||||
'nama' => $item['nama'] ?? $item['nama_lengkap'] ?? '',
|
||||
'pangkat' => $pangkat,
|
||||
'golongan' => $golongan,
|
||||
@@ -69,8 +81,8 @@ class R13SelisihExport implements FromCollection, ShouldAutoSize, WithColumnForm
|
||||
'selisih_pajak' => $selisihBruto - $selisihNetto,
|
||||
'selisih_netto' => $selisihNetto,
|
||||
'keterangan' => $this->keteranganLabel($selisihBruto, $selisihNetto),
|
||||
'npwp' => $pegawai && $pegawai->npwp ? "'".str_replace(['-', '.'], '', $pegawai->npwp) : '',
|
||||
'nomor_rekening' => $pegawai && $pegawai->nomor_rekening ? "'".$pegawai->nomor_rekening : '',
|
||||
'npwp' => $pegawai && $pegawai->npwp ? str_replace(['-', '.'], '', $pegawai->npwp) : '',
|
||||
'nomor_rekening' => $pegawai && $pegawai->nomor_rekening ? $pegawai->nomor_rekening : '',
|
||||
'nama_unit' => $item['nama_unit'] ?? '',
|
||||
];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user