Perubahan NIP petik kolom NIP, NPWP, dan Nomor Rekening semua export excel
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Exports\Concerns\EnrichesJabatanData;
|
||||
use App\Exports\Concerns\ForcesTextColumns;
|
||||
use App\Models\Rekapitulasi\P1;
|
||||
use Carbon\Carbon;
|
||||
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\WithMultipleSheets;
|
||||
@@ -52,9 +54,19 @@ class P1Export implements WithMultipleSheets
|
||||
}
|
||||
}
|
||||
|
||||
class P1MonthlySheet implements FromCollection, ShouldAutoSize, WithColumnFormatting, WithHeadings, WithMapping, WithStyles, WithTitle
|
||||
class P1MonthlySheet implements FromCollection, ShouldAutoSize, WithColumnFormatting, WithCustomValueBinder, WithHeadings, WithMapping, WithStyles, WithTitle
|
||||
{
|
||||
use EnrichesJabatanData;
|
||||
use EnrichesJabatanData, ForcesTextColumns;
|
||||
|
||||
protected function nipColumns(): array
|
||||
{
|
||||
return ['C'];
|
||||
}
|
||||
|
||||
protected function alwaysTextColumns(): array
|
||||
{
|
||||
return ['P', 'Q'];
|
||||
}
|
||||
|
||||
protected $jenisPegawai;
|
||||
|
||||
@@ -130,7 +142,7 @@ class P1MonthlySheet implements FromCollection, ShouldAutoSize, WithColumnFormat
|
||||
|
||||
return (object) [
|
||||
'no' => 0, // Temporary, will be set after sorting
|
||||
'nip' => "'".$pegawai->nip,
|
||||
'nip' => $pegawai->nip,
|
||||
'nama_lengkap' => $pegawai->nama,
|
||||
'pangkat' => $pegawai->pangkat,
|
||||
'golongan' => $pegawai->golongan,
|
||||
@@ -145,8 +157,8 @@ class P1MonthlySheet implements FromCollection, ShouldAutoSize, WithColumnFormat
|
||||
'harga_p1' => $pegawai->gaji_yang_dibayarkan,
|
||||
'pajak_p1' => $pegawai->pph21,
|
||||
'harga_p1_setelah_pajak' => $pegawai->gaji_bersih,
|
||||
'npwp' => $pegawai->npwp ? "'".str_replace(['-', '.'], '', $pegawai->npwp) : '',
|
||||
'nomor_rekening' => $pegawai->nomor_rekening ? "'".$pegawai->nomor_rekening : '',
|
||||
'npwp' => $pegawai->npwp ? str_replace(['-', '.'], '', $pegawai->npwp) : '',
|
||||
'nomor_rekening' => $pegawai->nomor_rekening ?: '',
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user