{{-- Header --}}
Focus Humanitarian Assistance {{ auth()->user()->country->name ?? '' }}
Unit: {{ $rop['data']['office']['name'] ?? '' }}
RELEASE OF PAYMENT
DATE: {{ \Carbon\Carbon::parse($rop['data']['request_date'])->format('d-M-Y') }} @if(!empty($rop['data']['urgent']) && $rop['data']['urgent'] == 1)   URGENT @endif
{{-- Payee details --}}
Payee Name: {{ $rop['data']['payee_name'] }}
Address: {{ $rop['data']['payee_address'] }}
Purpose of Payment: {{ $rop['data']['purpose'] }}
{{-- Charging table --}}
{{ strtoupper($rop['data']['purpose_category']) }}
@foreach($rop['data']['rop_expenses'] as $item) @endforeach
Fund Project Activity District Location Amount Remarks
{{ $item['fund'] }} {{ $item['project'] }} {{ $item['activity_name'] }} {{ $item['district_name'] }} {{ $item['activity_location'] }} {{ number_format($item['amount'], 0) }} {{ $item['remarks'] }}
{{-- Checklist + Amount / Bank details side by side --}} {{-- Left: Checklist --}} {{-- Right: Amount + Bank details --}}
@foreach($rop['data']['rop_checklists'] as $item) @endforeach
Checklist Page #
{{ $item['check_list'] ?? '-' }} {{ $item['reference'] ?? '-' }}
Amount in Figure
{{ number_format($rop['data']['amount_figure'], 0) }}
Amount in Words:
{{ $rop['data']['amount_words'] }}
Payee Account Detail (direct cheque deposit)
Bank Name {{ $rop['data']['bank_name'] }}
Branch {{ $rop['data']['branch'] }}
Account Title {{ $rop['data']['account_title'] }}
Account No {{ $rop['data']['account_no'] }}
{{-- Approval / Sign-off section --}} @php // Take the latest feedback entry per section (in case of re-submission cycles). $latestBySection = collect($rop['data']['rop_approval_feedbacks'] ?? []) ->sortBy('created_at') ->groupBy('section') ->map(function ($group) { return $group->last(); }); $statusClass = function ($status) { switch (strtolower($status ?? '')) { case 'approved': return 'status-approved'; case 'rejected': return 'status-rejected'; default: return 'status-pending'; } }; $sections = [ 'Department Head' => $rop['data']['department_head_status'] ?? null, 'Admin Section' => $rop['data']['admin_section_status'] ?? null, 'Finance Section' => $rop['data']['finance_section_status'] ?? null, 'High Authority Section'=> $rop['data']['high_authority_section_status'] ?? null, ]; @endphp @foreach($sections as $sectionName => $status) @endforeach {{-- Preparer --}} {{-- Each approval section --}} @foreach($sections as $sectionName => $status) @php $feedback = $latestBySection->get($sectionName); @endphp @endforeach
Prepared By{{ $sectionName }}
{{ trim(($rop['data']['user']['salutation'] ?? '').' '.($rop['data']['user']['first_name'] ?? '').' '.($rop['data']['user']['last_name'] ?? '')) }} Date: {{ \Carbon\Carbon::parse($rop['data']['created_at'])->format('d-M-Y') }} {{ $status ?? 'Pending' }}
@if($feedback) {{ trim((data_get($feedback, 'user.salutation', '')).' '.(data_get($feedback, 'user.first_name', '')).' '.(data_get($feedback, 'user.last_name', ''))) }}
{{ data_get($feedback, 'remarks') }}
Date: {{ \Carbon\Carbon::parse(data_get($feedback, 'created_at'))->format('d-M-Y') }} @endif
Instruction: All information must be complete before payment can be released. Proper attachment must accompany the form for prompt payment. Upon completion, please forward the form with supporting documents to Finance Department.