@extends('layouts.app') @php use App\Models\PaymentRequest; use App\Support\Format; $saved = $paymentRequest->exists; $value = fn (string $field, $fallback = null) => old($field, $paymentRequest->{$field} ?? $fallback); $dateValue = fn (string $field) => old($field, $paymentRequest->{$field}?->format('Y-m-d')); $amount = old('amount', $paymentRequest->amount === null ? '' : Format::money($paymentRequest->amount, 2, '')); @endphp @section('title', ($saved ? 'Payment request '.$paymentRequest->reference : 'New payment request').' — '.$proposal->outlet) @section('heading', 'Payment Request Form (PRF)') @section('subheading', 'R/FNC/01 · Rev 0 · Eff date 21 Aug 2025 — for '.$proposal->outlet) @section('actions') @if ($saved) Print for signing PDF @endif Blank form Cancel @endsection @section('content') @if ($errors->any())
Please check the {{ $errors->count() }} highlighted {{ \Illuminate\Support\Str::plural('entry', $errors->count()) }} below.
@endif @unless ($saved)
Drafted from the accepted proposal — the landlord as payee, the deposits written out and totalled. Every field is editable: change what is actually being asked for, then raise it.
@endunless
@csrf @if ($saved) @method('PUT') @endif
{{-- ---------------------------------------------------- --}} {{-- Head of the form: who is asking whom --}} {{-- ---------------------------------------------------- --}}
Request
To : Finance Department
@foreach (PaymentRequest::toOptions() as $key => $text)
@endforeach @error('to_company')
{{ $message }}
@enderror
@error('from_company')
{{ $message }}
@enderror
Written on the sheet as typed.

is_urgent))>
Ticks the Urgent box at the head of the printed sheet.
{{-- ---------------------------------------------------- --}} {{-- Mode of payment --}} {{-- ---------------------------------------------------- --}}
Mode of payment
@foreach (PaymentRequest::modeOptions() as $key => $text)
@endforeach @error('mode_of_payment')
{{ $message }}
@enderror
@error('mode_of_payment_other')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Please issue the following --}} {{-- ---------------------------------------------------- --}}
Please issue the following
@error('payee')
{{ $message }}
@enderror @if ($proposal->landlord)
From the proposal: {{ $proposal->landlord->name }}
@endif
@error('description')
{{ $message }}
@enderror
One line each, as it is to read on the sheet. The printed form leaves {{ PaymentRequest::DESCRIPTION_LINES }} ruled lines.
@error('amount')
{{ $message }}
@enderror
@error('collection_date')
{{ $message }}
@enderror
{{-- ---------------------------------------------------- --}} {{-- Sign-off --}} {{-- ---------------------------------------------------- --}}
Sign-off
@foreach ([ 'requested' => 'Requested by', 'verified' => 'Verified by', 'approved' => 'Approved by', ] as $key => $text)
@error($key.'_by_name')
{{ $message }}
@enderror
@endforeach
Cancel
@endsection @push('scripts') @endpush