{{--
The Payment Request Form laid out as R/FNC/01 prints it: the grey
masthead, the two company blocks with the Urgent box, the mode of
payment, what is to be issued on ruled lines, the three sign-offs, the
address, and the document control block at the foot.
Shared by the browser print view and the dompdf export; $forPdf switches
to a font dompdf embeds and trims the sizes to hold one A4 page.
--}}
@php
use App\Models\PaymentRequest;
use App\Support\Format;
$forPdf = $forPdf ?? false;
$logo = $forPdf ? public_path('img/gintell-logo.jpg') : asset('img/gintell-logo.jpg');
$logoExists = is_file(public_path('img/gintell-logo.jpg'));
$tick = fn (bool $on) => $on ? '✓' : ' ';
$date = fn ($value) => $value ? \Illuminate\Support\Carbon::parse($value)->format('d/m/Y') : '';
// The description sits on the ruled lines, one line each, and the sheet
// keeps its full set of rules however little was written.
$written = preg_split('/\r\n|\r|\n/', (string) $paymentRequest->description) ?: [];
$lines = array_pad(
array_slice($written, 0, PaymentRequest::DESCRIPTION_LINES),
PaymentRequest::DESCRIPTION_LINES,
''
);
@endphp
Payment Request Form (PRF) — {{ $proposal->outlet }}
@unless ($forPdf)
@endunless
{{-- ---------------------------------------------------------- --}}
{{-- Masthead --}}
{{-- ---------------------------------------------------------- --}}
@if ($logoExists)

@else
GINTELL
@endif
PAYMENT REQUEST FORM
{{-- ---------------------------------------------------------- --}}
{{-- To / From / Urgent --}}
{{-- ---------------------------------------------------------- --}}
|
To : Finance Department
@foreach (PaymentRequest::toOptions() as $key => $text)
|
{!! $tick($paymentRequest->to_company === $key) !!}
|
{{ $text }} |
@endforeach
|
From :
{{-- Written in rather than ticked, so it sits on a rule. --}}
| {{ $paymentRequest->from_company }} |
|
{!! $tick((bool) $paymentRequest->is_urgent) !!}
Urgent
|
{{-- ---------------------------------------------------------- --}}
{{-- Mode of payment --}}
{{-- ---------------------------------------------------------- --}}
Mode of Payment
@foreach ([PaymentRequest::MODE_CHEQUE_AC_PAYEE, PaymentRequest::MODE_CHEQUE_CASH_BEARER] as $key)
|
{!! $tick($paymentRequest->mode_of_payment === $key) !!}
|
{{ PaymentRequest::modeOptions()[$key] }} |
@endforeach
|
|
{!! $tick($paymentRequest->mode_of_payment === PaymentRequest::MODE_BANK_DRAFT) !!}
|
{{ PaymentRequest::modeOptions()[PaymentRequest::MODE_BANK_DRAFT] }} |
|
{!! $tick($paymentRequest->mode_of_payment === PaymentRequest::MODE_OTHERS) !!}
|
Others |
{{ $paymentRequest->mode_of_payment === PaymentRequest::MODE_OTHERS
? $paymentRequest->mode_of_payment_other
: '' }}
|
|
{{-- ---------------------------------------------------------- --}}
{{-- Please issue the following --}}
{{-- ---------------------------------------------------------- --}}
Please issue the following:
| Payee : |
{{ $paymentRequest->payee }} |
| Description : |
{{ $lines[0] }} |
@foreach (array_slice($lines, 1) as $line)
|
{{ $line }} |
@endforeach
|
Amount : RM
|
{{ Format::money($paymentRequest->amount, 2, '') }} |
Date of Collection :
|
{{ $date($paymentRequest->collection_date) }} |
{{-- ---------------------------------------------------------- --}}
{{-- Sign-off --}}
{{-- ---------------------------------------------------------- --}}
| Requested By : |
Verified By : |
Approved By : |
|
|
|
| Name : {{ $paymentRequest->requested_by_name }} |
Name : {{ $paymentRequest->verified_by_name }} |
Name : {{ $paymentRequest->approved_by_name }} |
| Date : {{ $date($paymentRequest->requested_on) }} |
Date : {{ $date($paymentRequest->verified_on) }} |
Date : {{ $date($paymentRequest->approved_on) }} |
No.27, Jalan Persiaran Industri, Bandar Sri Damansara, 52200 Kuala Lumpur, Malaysia.
Tel: 603-6277 9333 Fax: 603-6277 9222 www.gintell.com
Document No.: {{ PaymentRequest::DOCUMENT_NO }}
Revision No.: {{ PaymentRequest::REVISION_NO }}
Effective Date: {{ PaymentRequest::EFFECTIVE_DATE }}
@if ($paymentRequest->reference)
Ref.: {{ $paymentRequest->reference }}
@endif