{{-- Header Dokumen RAP --}}
RENCANA ANGGARAN PELAKSANAAN (RAP)
UNIT BANGUNAN
( UPAH KERJA )
{{-- Metadata Table --}}
: {{ strtoupper($project->nama_proyek) }}
: ANUGRAH SENTUHAN EMAS
: {{ strtoupper($project->lokasi ?: 'DESA PURNA KARYA') }}
: {{ strtoupper($project->type_rumah ?: '36/72') }}
{{-- Main RAP Table (6 Kolom Presisi Acuan Klien) --}} @php $catLetterIdx = 0; @endphp @forelse($details as $catName => $items) @php $catLetter = chr(65 + ($catLetterIdx % 26)); $catLetterIdx++; $cleanCatName = preg_replace('/^[A-Z]\.\s*/i', '', $catName); @endphp @php $itemNo = 1; @endphp @foreach($items as $d) @php $harsatVal = $d->harga_satuan_upah ?: $d->harga_satuan; $totalVal = $d->total_harga_upah ?: $d->total_harga; $volDisplay = ((float)$d->volume == (int)(float)$d->volume) ? number_format((float)$d->volume, 0, ',', '.') : rtrim(rtrim(number_format((float)$d->volume, 2, ',', '.'), '0'), ','); if ((float)$d->volume == 0) { $volDisplay = ''; } $uraian = $d->uraian_pekerjaan; $isSubItem = preg_match('/^[a-z]\.\s/i', $uraian); $hasNumber = preg_match('/^\d+\.\s/i', $uraian); @endphp @endforeach @empty @endforelse @if($details->isNotEmpty()) @endif
NO. URAIAN PEKERJAAN SAT. VOL. HARSAT JML. HARSAT
UPAH UPAH
Rp Rp
{{ $catLetter }} {{ $cleanCatName }}
@if(!$isSubItem && !$hasNumber) {{ $itemNo++ }}. @endif {{ $uraian }} {{ $d->satuan }} {{ $volDisplay }} {{ $harsatVal > 0 ? number_format($harsatVal, 0, ',', '.') : '-' }} {{ $totalVal > 0 ? 'Rp ' . number_format($totalVal, 0, ',', '.') : 'Rp -' }}
Sub Total {{ $catLetter }} Rp {{ isset($subTotalsTotal[$catName]) && $subTotalsTotal[$catName] > 0 ? number_format($subTotalsTotal[$catName], 0, ',', '.') : '-' }}
Belum ada item RAB Upah yang tercatat.
GRAND TOTAL UPAH Rp {{ number_format($grandTotal, 0, ',', '.') }}