@extends('layouts.main') @section('css') @endsection @section('content')
Unit Pembayaran: {{ $units->first()?->nama ?? 'Tidak Ditemukan' }}

Periode: {{ $periodeInfo?->nama ?? 'Tidak Ditemukan' }} ({{ $semesterLabel }})

@if (request()->jenis_pegawai)

Jenis Pegawai: {{ ucfirst(request()->jenis_pegawai) }}

@endif
@foreach ($p2 as $kategori => $penggunaan) @continue(collect($penggunaan)->flatten()->sum() === 0) @php $katSlug = \Illuminate\Support\Str::slug($kategori); @endphp

@if (gettype($penggunaan) === 'array' && str_contains($kategori, 'tri_dharma'))
@foreach ($penggunaan as $subkategori => $detail) @continue(collect($detail)->flatten()->sum() === 0) @php $subkatSlug = \Illuminate\Support\Str::slug($kategori . '-' . $subkategori . '-' . $loop->index); @endphp

@if (gettype($detail) === 'array')
@foreach ($detail as $subsubkategori => $subdetail) @endforeach
No Jenjang P2
{{ $loop->iteration }} {{ ucwords(str_replace('_', ' ', $subsubkategori)) }} {{ number_format(collect($subdetail)->flatten()->sum(), 2, ',', '.') }}
@endif
@endforeach
@elseif(gettype($penggunaan) === 'array')
@foreach ($penggunaan as $subkategori => $detail) @endforeach
No Nama P2
{{ $loop->iteration }} {{ ucwords(str_replace('_', ' ', $subkategori)) }} {{ number_format(collect($detail)->flatten()->sum(), 2, ',', '.') }}
@endif
@endforeach

No Nama Kategori Jumlah SKP Total
1 SKP {{ $jumlahSKP }} {{ number_format($pegawais->sum('p2.detail.skp_homebase') + $pegawais->sum('p2.detail.skp_luar_homebase'), 2, ',', '.') }}
Total {{ number_format($pegawais->sum('p2.detail.skp_homebase') + $pegawais->sum('p2.detail.skp_luar_homebase'), 2, ',', '.') }}

@php $triDharmaHomebaseNo = 0; @endphp @if($pegawais->sum('p2.tri_dharma_homebase_detail.akademik') > 0) @php $triDharmaHomebaseNo++; @endphp @endif @if($pegawais->sum('p2.tri_dharma_homebase_detail.profesi') > 0) @php $triDharmaHomebaseNo++; @endphp @endif @if($pegawais->sum('p2.tri_dharma_homebase_detail.d3') > 0) @php $triDharmaHomebaseNo++; @endphp @endif @if($pegawais->sum('p2.tri_dharma_homebase_detail.s1') > 0) @php $triDharmaHomebaseNo++; @endphp @endif @if($pegawais->sum('p2.tri_dharma_homebase_detail.s2') > 0) @php $triDharmaHomebaseNo++; @endphp @endif @if($pegawais->sum('p2.tri_dharma_homebase_detail.s3') > 0) @php $triDharmaHomebaseNo++; @endphp @endif @if($pegawais->sum('p2.tri_dharma_homebase_detail.lainnya') > 0) @php $triDharmaHomebaseNo++; @endphp @endif
No Nama Kategori Total
{{ $triDharmaHomebaseNo }} Akademik {{ number_format($pegawais->sum('p2.tri_dharma_homebase_detail.akademik'), 2, ',', '.') }}
{{ $triDharmaHomebaseNo }} Profesi {{ number_format($pegawais->sum('p2.tri_dharma_homebase_detail.profesi'), 2, ',', '.') }}
{{ $triDharmaHomebaseNo }} D3 {{ number_format($pegawais->sum('p2.tri_dharma_homebase_detail.d3'), 2, ',', '.') }}
{{ $triDharmaHomebaseNo }} S1 {{ number_format($pegawais->sum('p2.tri_dharma_homebase_detail.s1'), 2, ',', '.') }}
{{ $triDharmaHomebaseNo }} S2 {{ number_format($pegawais->sum('p2.tri_dharma_homebase_detail.s2'), 2, ',', '.') }}
{{ $triDharmaHomebaseNo }} S3 {{ number_format($pegawais->sum('p2.tri_dharma_homebase_detail.s3'), 2, ',', '.') }}
{{ $triDharmaHomebaseNo }} Lainnya {{ number_format($pegawais->sum('p2.tri_dharma_homebase_detail.lainnya'), 2, ',', '.') }}
Total {{ number_format($pegawais->sum('p2.detail.tri_dharma_homebase'), 2, ',', '.') }}

@foreach ($pegawais as $pegawai) @endforeach
No NIP Nama Unit Kerja SKP Presensi Homebase Luar Homebase Dibayarkan oleh {{ $units->first()?->nama ?? 'Unit Pembayaran' }} Total Pendapatan P2
Tri Dharma Penunjang Total Tri Dharma Penunjang Total
{{ $loop->iteration }} {{ $pegawai->nip }} {{ $pegawai->nama }} {{ $pegawai->unit_kerja_nama }} {{ number_format($pegawai->p2['detail']['skp_homebase'] + $pegawai->p2['detail']['skp_luar_homebase'], 2, ',', '.') }} {{ number_format($pegawai->p2['detail']['presensi_homebase'] + $pegawai->p2['detail']['presensi_luar_homebase'], 2, ',', '.') }} {{ number_format($pegawai->p2['detail']['tri_dharma_homebase'], 2, ',', '.') }} {{ number_format($pegawai->p2['detail']['penunjang_homebase'], 2, ',', '.') }} {{ number_format($pegawai->p2['total']['homebase'], 2, ',', '.') }} {{ number_format($pegawai->p2['detail']['tri_dharma_luar_homebase'], 2, ',', '.') }} {{ number_format($pegawai->p2['detail']['penunjang_luar_homebase'], 2, ',', '.') }} {{ number_format($pegawai->p2['total']['luar_homebase'], 2, ',', '.') }} {{ number_format($pegawai->p2['total']['unit'], 2, ',', '.') }} {{ number_format($pegawai->p2['total']['homebase'] + $pegawai->p2['total']['luar_homebase'], 2, ',', '.') }}
Total {{ number_format($pegawais->sum('p2.detail.skp_homebase') + $pegawais->sum('p2.detail.skp_luar_homebase'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.detail.presensi_homebase') + $pegawais->sum('p2.detail.presensi_luar_homebase'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.detail.tri_dharma_homebase'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.detail.penunjang_homebase'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.total.homebase'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.detail.tri_dharma_luar_homebase'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.detail.penunjang_luar_homebase'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.total.luar_homebase'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.total.unit'), 2, ',', '.') }} {{ number_format($pegawais->sum('p2.total.homebase') + $pegawais->sum('p2.total.luar_homebase'), 2, ',', '.') }}
@endsection @section('js') @endsection