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\Services\DawaiService;
|
||||
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 P1SelisihExport implements WithMultipleSheets
|
||||
}
|
||||
}
|
||||
|
||||
class P1SelisihMonthlySheet implements FromCollection, ShouldAutoSize, WithColumnFormatting, WithHeadings, WithMapping, WithStyles, WithTitle
|
||||
class P1SelisihMonthlySheet 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 ['Q', 'R'];
|
||||
}
|
||||
|
||||
protected $jenisPegawai;
|
||||
|
||||
@@ -141,7 +153,7 @@ class P1SelisihMonthlySheet implements FromCollection, ShouldAutoSize, WithColum
|
||||
|
||||
return (object) [
|
||||
'no' => 0, // Temporary, will be set after sorting
|
||||
'nip' => $item['nip'], // Keep original NIP with quotes
|
||||
'nip' => $cleanNip,
|
||||
'nama_lengkap' => $item['nama_lengkap'],
|
||||
'pangkat' => $pangkat,
|
||||
'golongan' => $golongan,
|
||||
@@ -156,8 +168,8 @@ class P1SelisihMonthlySheet implements FromCollection, ShouldAutoSize, WithColum
|
||||
'selisih_pajak' => ($item['selisih_harga_p1'] ?? 0) - ($item['selisih_harga_p1_setelah_pajak'] ?? 0),
|
||||
'selisih_netto' => $item['selisih_harga_p1_setelah_pajak'] ?? 0,
|
||||
'keterangan' => $this->jenisSelisihLabel($item),
|
||||
'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