{{-- Same data/save flow as creditpaper/edit.blade.php (posts to the same cp.store route), styled to mirror components.forms.lead-credit-paper's printed layout from CREDIT APPRAISAL through JUSTIFICATIONS. --}} @php $hasPreFactoring = !empty($lead->pre_facility_code); $checklistAnswers = $lead->cp_checklist_answers->keyBy('checklist_item_id'); $contractDetailsItems = $checklistItems['contract_details'] ?? collect(); $managementExperienceItems = $checklistItems['management_experience'] ?? collect(); $financialScreeningItems = $checklistItems['financial_screening'] ?? collect(); $nonFinancialScreeningItems = $checklistItems['non_financial_screening'] ?? collect(); $keyManagements = old('key_managements', $lead->cp_key_managements->toArray()); $creditInfoRows = old('credit_info', $lead->cp_credit_info->toArray()); $borrowingFacilities = old('borrowing_facilities', $lead->cp_borrowing_facilities->toArray()); @endphp @extends('layouts.app') @section('title') Credit Paper Preparation @endsection @section('css') @endsection @section('content') @component('components.breadcrumb') @slot('li_1') Credit Paper @endslot @slot('title') {{ $lead->serial_no }} @endslot @endcomponent

Credit Paper Preparation - {{ $lead->serial_no }}

Please review the application details below. Once confirmed, you may proceed to generate the credit paper for this lead.

@if (session('success')) @endif @if (session('error')) @endif @if(!empty($lead->creditpaper) && !empty($lead->creditpaper->reject_remarks))
Reject Notes:
{{ $lead->creditpaper->reject_remarks }}
@endif @if(!empty($lead->cc_reject_remarks))
Credit Committee Reject Notes:
{{ $lead->cc_reject_remarks }}
@endif @if(!empty($lead->bod_reject_remarks))
BOD Reject Notes:
{{ $lead->bod_reject_remarks }}
@endif
@csrf {{-- CREDIT APPRAISAL --}}
CREDIT APPRAISAL
CLIENT NAME CUSTOMER NAME
{{ $lead->applicant->applicant_name }} {{ $lead->contracts->pluck('awarder_name')->filter()->unique()->implode(', ') }}
{{-- CURRENT AND PROPOSED FACILITIES (live preview of the Financing Amount / Exposure figures entered below) --}}
CURRENT AND PROPOSED FACILITIES
Pre-Factoring Factoring Client's Exposure WFC's Exposure
Current (As-to-date) Proposed Current (As-to-date) Proposed RM {{ number_format($lead->creditpaper->client_exposure ?? 0, 2) }} RM {{ number_format($lead->creditpaper->wfc_exposure ?? 0, 2) }}
RM 0.00 RM {{ number_format($lead->creditpaper->pre_amount ?? 0, 2) }} RM 0.00 RM {{ number_format($lead->creditpaper->post_amount ?? 0, 2) }}
FINANCING AMOUNT
Contract / PO Value (RM) *
@if($hasPreFactoring)
PRE-FACTORING
{{-- --}}
Amount*
RM
Processing fee *
RM
Profit Charges (per month on the advance amount) *
%
Projected Collection Period (days) *
days
Projected Profit Charges
RM
@endif
FACTORING
{{-- --}} {{-- --}}
Amount *
RM
Admin Fee (on invoice value) *
%
Admin Fee
RM
Processing Fee *
RM
Total Processing Fees
Profit Charges (per month on the advance amount) *
%
Projected Collection Period *
days
Projected Profit Charges
RM
EXPOSURE
Client's Exposure *
WFC's Exposure *
{{-- COMPANY BACKGROUND --}}
COMPANY BACKGROUND
{{-- CONTRACT DETAILS --}}
CONTRACT DETAILS
@forelse($contractDetailsItems as $i => $item) @empty @endforelse
{{ chr(97 + $i) }}. {{ $item->description }} * @php $savedAnswer = optional($checklistAnswers->get($item->id))->answer; $answer = old("checklist_answers.$item->id", $savedAnswer === null ? null : ($savedAnswer ? '1' : '0')); @endphp
No checklist questions configured.
{{-- MANAGEMENT EXPERIENCE --}}
MANAGEMENT EXPERIENCE
@forelse($managementExperienceItems as $i => $item) @empty @endforelse
{{ chr(97 + $i) }}. {{ $item->description }} * @php $savedAnswer = optional($checklistAnswers->get($item->id))->answer; $answer = old("checklist_answers.$item->id", $savedAnswer === null ? null : ($savedAnswer ? '1' : '0')); @endphp
No checklist questions configured.
@foreach($keyManagements as $km) @endforeach
Name Age NRIC/Passport No Position Ownership (%)
{{-- CREDIT INFORMATION --}}
CREDIT INFORMATION
@foreach($creditInfoRows as $i => $row) @endforeach
No Name Score Remarks (Key contributing factors)
{{ $i + 1 }}
{{-- BORROWING FACILITIES --}}
BORROWING FACILITIES
@foreach($borrowingFacilities as $bf) @endforeach
Name of Banks/FI Type of facilities LO Date Facility Amt Loan Os/g (RM) Period of Loan Debenture Charge (if any) Name of Consultant (if any)
{{-- FINANCIAL SCREENING --}}
FINANCIAL SCREENING
@forelse($financialScreeningItems as $item) @empty @endforelse
{{ $item->description }} * @if($item->note)
{{ $item->note }}
@endif
@php $savedAnswer = optional($checklistAnswers->get($item->id))->answer; $answer = old("checklist_answers.$item->id", $savedAnswer === null ? null : ($savedAnswer ? '1' : '0')); @endphp
No checklist questions configured.
{{-- NON-FINANCIAL SCREENING --}}
NON-FINANCIAL SCREENING
@php $currentGroup = null; $groupIndex = 0; @endphp @forelse($nonFinancialScreeningItems as $item) @php if ($item->group_label !== $currentGroup) { $currentGroup = $item->group_label; $groupIndex = 0; } $savedAnswer = optional($checklistAnswers->get($item->id))->answer; $answer = old("checklist_answers.$item->id", $savedAnswer === null ? null : ($savedAnswer ? '1' : '0')); @endphp @if($item->group_label && $groupIndex === 0) @endif @php $groupIndex++; @endphp @empty @endforelse
{{ $item->group_label }}
{{ chr(97 + $groupIndex) }}. {{ $item->description }} *
No checklist questions configured.
{{-- JUSTIFICATIONS --}}
JUSTIFICATIONS
@php $selectedJustifications = collect($lead->justifications ?? [])->pluck('justification_id')->filter()->toArray(); if (old('justifications')) { $selectedJustifications = old('justifications'); } $otherTerms = old('other_terms'); if (!$otherTerms) { $otherTerms = collect($lead->justifications ?? []) ->whereNull('justification_id') ->map(fn($item) => ['term' => $item->description]) ->values() ->toArray(); } @endphp @foreach($justifications as $just)
id, $selectedJustifications) ? 'checked' : '' }}>
@endforeach @error('justifications')
{{ $message }}
@enderror
@if(!empty($otherTerms)) @foreach($otherTerms as $term)
@endforeach @else
@endif
@error('other_terms')
{{ $message }}
@enderror
{{-- PROJECTED INCOME (computed preview, matching print) --}} {{--
PROJECTED INCOME
Pre-Factoring Factoring Total
Processing Fee Profit Processing Fee Administration Fee Profit
RM {{ $lead->creditpaper->pre_process_fee ?? '' }} RM {{ number_format($lead->creditpaper->profit_charges ?? 0, 2) }} RM {{ number_format($lead->creditpaper->process_fee ?? 0, 2) }} RM {{ number_format($lead->creditpaper->post_admin_fees ?? 0, 2) }} RM {{ number_format($lead->creditpaper->discount_charges ?? 0, 2) }} RM {{ number_format( ($lead->creditpaper->pre_process_fee ?? 0) + ($lead->creditpaper->profit_charges ?? 0) + ($lead->creditpaper->process_fee ?? 0) + ($lead->creditpaper->post_admin_fees ?? 0) + ($lead->creditpaper->discount_charges ?? 0), 2 ) }}
Return On Capital Employed: @php $postAmountPreview = ($lead->creditpaper->post_amount ?? 0) ?: 1; $rocePreview = (($lead->creditpaper->profit_charges ?? 0) + ($lead->creditpaper->post_admin_fees ?? 0) + ($lead->creditpaper->discount_charges ?? 0) + ($lead->creditpaper->tot_process_fees ?? 0)) / $postAmountPreview; @endphp {{ number_format($rocePreview * 100, 2) }}% @ {{ $lead->creditpaper->post_coll_period ?? 0 }} days
Computed automatically from the Financing Amount/Charges figures above.
--}} {{-- FORECAST ADVANCES AND COLLECTION TIMELINE (computed preview) --}} {{--
FORECAST ADVANCES AND COLLECTION TIMELINE
Pre-Factoring Factoring

Advances to Invoicing

{{ $lead->creditpaper->pre_coll_period ?? 0 }} days

Invoicing to Collection

{{ $lead->creditpaper->post_coll_period ?? 0 }} days
--}} @if(!empty($lead->creditpaper))
Save changes before previewing to see your latest changes.
@endif @if(!empty($lead->creditpaper))
@if(!empty($lead->creditpaper->reject_remarks) || !empty($lead->cc_reject_remarks) || !empty($lead->bod_reject_remarks))
This credit paper was rejected. Click "Update Credit Paper" to save your changes and clear the rejection note before submitting for verification again.
@endif
@endif
View Related Document
@include('components.forms.related-documents', [ 'application_form' => true, 'term_sheet' => true, 'credit_paper' => false, ])
@endsection @section('script') @endsection