@extends('layouts.dashboard') @section('isi')
@php $bulan = array( [ "id" => "1", "bulan" => "Januari" ], [ "id" => "2", "bulan" => "Februari" ], [ "id" => "3", "bulan" => "Maret" ], [ "id" => "4", "bulan" => "April" ], [ "id" => "5", "bulan" => "Mei" ], [ "id" => "6", "bulan" => "Juni" ], [ "id" => "7", "bulan" => "Juli" ], [ "id" => "8", "bulan" => "Agustus" ], [ "id" => "9", "bulan" => "September" ], [ "id" => "10", "bulan" => "Oktober" ], [ "id" => "11", "bulan" => "November" ], [ "id" => "12", "bulan" => "Desember" ]); $last = date('Y')-10; $now = date('Y'); @endphp
@foreach ($data as $d) @endforeach
No. Nama Bulan Tahun Status Penghasilan Bruto Penghasilan Netto Sebulan Penghasilan Netto Setahun PTKP PKP Setahun PPH 21 Setahun PPH 21 Sebulan
{{ $loop->iteration }} {{ $d->User->name }} @php if ($d->bulan == 1){ $nama_bulan = 'Januari'; } else if($d->bulan == 2) { $nama_bulan = 'Februari'; } else if($d->bulan == 3) { $nama_bulan = 'Maret'; } else if($d->bulan == 4) { $nama_bulan = 'April'; } else if($d->bulan == 5) { $nama_bulan = 'Mei'; } else if($d->bulan == 6) { $nama_bulan = 'Juni'; } else if($d->bulan == 7) { $nama_bulan = 'Juli'; } else if($d->bulan == 8) { $nama_bulan = 'Agustus'; } else if($d->bulan == 9) { $nama_bulan = 'September'; } else if($d->bulan == 10) { $nama_bulan = 'Oktober'; } else if($d->bulan == 11) { $nama_bulan = 'November'; } else if($d->bulan == 12) { $nama_bulan = 'Desember'; } else { $nama_bulan = '-'; } @endphp {{ $nama_bulan }} {{ $d->tahun }} {{ $d->ptkp->name }} @php if ($d->gaji > 500000) { $biaya_jabatan = 500000; } else { $biaya_jabatan = $gaji * (5/100); } $jumlah_hadir = $d->JumlahHadir($d->user_id, $d->bulan, $d->tahun, 'Masuk') + $d->JumlahHadir($d->user_id, $d->bulan, $d->tahun, 'Izin Pulang Cepat') + $d->JumlahHadir($d->user_id, $d->bulan, $d->tahun, 'Izin Telat'); $bruto = ($d->User->Golongan->Tunjangan->first()->tunjangan_makan * $jumlah_hadir) + ($d->User->Golongan->Tunjangan->first()->tunjangan_transport * $jumlah_hadir) + $d->gaji + $d->lembur; $netto = $bruto - $biaya_jabatan - ($d->setoran_bpjs_kes - $d->tunjangan_bpjs_kes); $nettoYear = $netto * 12; $cekPkp = $nettoYear - $d->ptkp->ptkp_2016; @endphp {{ number_format($bruto) }} {{ number_format($netto) }} {{ number_format($nettoYear) }} {{ number_format($d->ptkp->ptkp_2016) }} @php if ($cekPkp > 0) { $pkpSetahun = $cekPkp; } else { $pkpSetahun = 0; } @endphp {{ number_format($pkpSetahun) }} @php if ($pkpSetahun <= 50000000) { $tax = 5; } else if ($pkpSetahun > 50000000 && $pkpSetahun <= 250000000) { $tax = 15; } else if ($pkpSetahun > 250000000 && $pkpSetahun <= 500000000) { $tax = 25; } else { $tax = 50; } @endphp {{ number_format($pkpSetahun * ($tax/100)) }} {{ number_format(($pkpSetahun * ($tax/100)) / 12) }}
{{ $data->links() }}

@endsection