@php $setting = \App\Setting::find(1); @endphp Equifax Cibil Score - {{$setting->companyName}} {{-- jQuery link --}} {{-- fa fa icon --}} {{-- Custom Css Link --}} {{-- --}} {{-- for ajex not define error solved --}} {{-- jquery link --}} {{-- @extends('layouts.backend') --}} {{-- @section('content') --}} {{--
--}} {{-- @include('pages.header.Header') --}}
{{-- Alerts --}} @if (session('error'))
{{ session('error') }}
@elseif(session('success'))
{{ session('success') }}
@endif {{-- ================== RESULT SECTION ================== --}} {{-- @if ($verification->status === 'REPORT_FETCHED') --}} {{-- ===== PDF REPORT ===== --}} {{-- @if ($verification->report_type === 'PDF')
Credit Report (PDF)
--}} {{-- ===== JSON REPORT ===== --}} {{-- @elseif ($verification->report_type === 'JSON') --}}
{{--
--}} {{-- Customer Credit Report --}} @php $reportJson = $response; /* is_string($verification->report_json) ? json_decode($verification->report_json, true) : $verification->report_json; */ $cirReportDataList = $reportJson['report']['CCRResponse']['CIRReportDataLst'] ?? []; $header = $reportJson['report']['CCRResponse']['CommercialBureauResponse']['InquiryResponseHeader'] ?? []; @endphp @forelse($cirReportDataList as $i => $dataList)
{{-- ===== HEADER ===== --}}
equifax {{ $i === 0 ? 'Consumer Credit Report' : 'MFI Credit Report' }}
{{-- ===== RESPONSE HEADER ===== --}}
Member Name (Client ID) : ({{ $header['ClientID'] ?? '' }}) Date : {{ isset($header['Date']) ? \Carbon\Carbon::parse($header['Date'])->format('d-m-Y') : '' }}
Report Order No : {{ $header['ReportOrderNO'] ?? '' }} Time : {{ $header['Time'] ?? '' }}
Reference Number : {{ $header['CustRefField'] ?? '' }} Tran ID : {{ $header['TranID'] ?? '' }}
@if (!empty($dataList['Error']))
Error Code: {{ $dataList['Error']['ErrorCode'] ?? 'N/A' }}
Error Desc: {{ $dataList['Error']['ErrorDesc'] ?? 'N/A' }}
@if (!empty($dataList['InquiryRequestInfo'])) @php $inq = $dataList['InquiryRequestInfo'] ?? []; /* ================= PERSONAL & ACCOUNT INFO ================= */ $inqPersonal = [ 'Consumer’s Full Name' => $inq['FirstName'] ?? '', 'DOB' => !empty($inq['DOB']) ? \Carbon\Carbon::parse($inq['DOB'])->format('d-m-Y') : '', 'Gender' => $inq['Gender'] ?? '', 'Inquiry / Request Purpose' => $inq['InquiryPurpose'] ?? '', ]; /* ---- Family Details (Relationship mapping) ---- */ $relationMap = [ 'F' => 'Father', 'H' => 'Husband', 'B' => 'Brother', 'S' => 'Son', 'U' => 'Son-In-Law', 'Y' => 'Father-In-Law', 'T' => 'Brother-In-Law', 'O' => 'Other', 'M' => 'Mother', 'W' => 'Wife', 'C' => 'Sister', 'D' => 'Daughter', 'V' => 'Daughter-In-Law', 'Z' => 'Mother-In-Law', 'X' => 'Sister-In-Law', ]; if (!empty($inq['MFIDetails']['FamilyDetails'])) { foreach ($inq['MFIDetails']['FamilyDetails'] as $fd) { $code = $fd['AdditionalNameType'] ?? ''; $label = $relationMap[$code] ?? 'Relation'; $inqPersonal[$label] = $fd['AdditionalName'] ?? ''; } } /* ================= ID & PHONE NUMBERS ================= */ $inqIdentity = []; // IDs foreach ($inq['IDDetails'] ?? [] as $id) { $inqIdentity[] = [ 'label' => $id['IDType'] ?? 'ID', 'value' => $id['IDValue'] ?? '', ]; } // Phones $typeMap = ['M' => 'Mobile', 'H' => 'Home', 'O' => 'Office']; foreach ($inq['InquiryPhones'] ?? [] as $ph) { $type = $ph['PhoneType'][0] ?? ''; $inqIdentity[] = [ 'label' => $typeMap[$type] ?? 'Phone', 'value' => $ph['Number'] ?? '', ]; } /* ================= CONTACT DETAILS ================= */ $inqContact = []; foreach ($inq['InquiryAddresses'] ?? [] as $addr) { $inqContact[] = [ 'label' => 'Address', 'value' => $addr['AddressLine1'] ?? '', ]; $inqContact[] = [ 'label' => 'State', 'value' => $addr['State'] ?? '', ]; $inqContact[] = [ 'label' => 'Postal', 'value' => $addr['Postal'] ?? '', ]; } /* ================= MAX ROW ================= */ $maxRows = max(count($inqPersonal), count($inqIdentity), count($inqContact)); @endphp
Input Enquiry
@for ($i = 0; $i < $maxRows; $i++) {{-- PERSONAL --}} {{-- ID & PHONE --}} {{-- CONTACT --}} @endfor
Personal & Account Information ID & Phone Numbers Contact Details
@if (isset(array_keys($inqPersonal)[$i])) @php $key = array_keys($inqPersonal)[$i]; @endphp {{ $key }} : {{ $inqPersonal[$key] }} @endif @if (isset($inqIdentity[$i])) {{ $inqIdentity[$i]['label'] }} : {{ $inqIdentity[$i]['value'] }} @endif @if (isset($inqContact[$i])) {{ $inqContact[$i]['label'] }} : {{ $inqContact[$i]['value'] }} @endif

@endif @else
Consumer Name: {{ $dataList['CIRReportData']['IDAndContactInfo']['PersonalInfo']['Name']['FullName'] ?? '' }}
@if (!empty($dataList['CIRReportData']['IDAndContactInfo'])) @php $info = $dataList['CIRReportData']['IDAndContactInfo'] ?? []; /* ================= PERSONAL (FIXED FIELDS) ================= */ $pi = $info['PersonalInfo'] ?? []; /* ===== COMMON FIELDS (CCR + MFI) ===== */ $personal = [ 'Previous Name' => $pi['PreviousName']['FullName'] ?? '', 'Alias Name' => $pi[' AliasName']['Name'] ?? '', 'DOB' => !empty($pi['DateOfBirth']) ? \Carbon\Carbon::parse($pi['DateOfBirth'])->format('d-m-Y') : '', 'Age' => !empty($pi['Age']['Age']) ? $pi['Age']['Age'] . ' Years' : '', 'Gender' => $pi['Gender'] ?? '', ]; /* ===== CCR (Consumer Credit Report) ===== */ if ($i === 0) { $personal['Total Income'] = $pi['IncomeDetails']['monthlyFamilyIncome'] ?? ''; $personal['Occupation'] = $pi['Occupation'] ?? ''; } /* ===== MFI Credit Report ===== */ if ($i === 1) { $personal['Marital Status'] = $pi['MaritalStatus'] ?? ''; $personal['Monthly Family Income'] = $pi['IncomeDetails']['monthlyFamilyIncome'] ?? ''; $personal['Income Reported Date'] = !empty( $pi['IncomeDetails']['familyIncomeReportedDate'] ) ? \Carbon\Carbon::parse( $pi['IncomeDetails']['familyIncomeReportedDate'], )->format('d-m-Y') : ''; } /* ================= IDENTIFICATION ================= */ $identity = []; foreach ($info['IdentityInfo'] ?? [] as $idType => $items) { foreach ($items as $row) { $identity[] = [ 'label' => $idType, 'value' => $row['IdNumber'] ?? '', ]; } } /* ================= CONTACT ================= */ $typeMap = [ 'M' => 'Mobile', 'P' => 'Phone', 'H' => 'Home', 'O' => 'Office', ]; $contact = []; foreach ($info['PhoneInfo'] ?? [] as $row) { $contact[] = [ 'label' => $typeMap[$row['typeCode']] ?? 'Other', 'value' => $row['Number'] ?? '', ]; } /* ================= MAX ROW ================= */ $maxRows = max(count($personal), count($identity), count($contact)); @endphp @for ($i = 0; $i < $maxRows; $i++) {{-- PERSONAL --}} {{-- IDENTIFICATION --}} {{-- CONTACT --}} @endfor
Personal Information Identification Contact Details
@if (isset(array_keys($personal)[$i])) @php $key = array_keys($personal)[$i]; @endphp {{ $key }}: {{ $personal[$key] }} @endif @if (isset($identity[$i])) {{ $identity[$i]['label'] }}: {{ $identity[$i]['value'] }} @endif @if (isset($contact[$i])) {{ $contact[$i]['label'] }}: {{ $contact[$i]['value'] }} @endif

@endif {{-- Addresses --}} @if (!empty($dataList['CIRReportData']['IDAndContactInfo']['AddressInfo']))
Consumer Address
@forelse($dataList['CIRReportData']['IDAndContactInfo']['AddressInfo'] ?? [] as $i => $addr) @empty @endforelse
Type Address State Postal code Last Reported Date
{{ $addr['Type'] ?? '' }} {{ $addr['Address'] ?? '' }} {{ $addr['State'] ?? '' }} {{ $addr['Postal'] ?? '' }} {{ $addr['ReportedDate'] ?? '' }}
No Address Found

@endif @if (!empty($dataList['CIRReportData']['ScoreDetails'])) {{-- Equifax Score --}}
Equifax Score(s):
@forelse($dataList['CIRReportData']['ScoreDetails'] ?? [] as $score) {{-- Score Name --}} {{-- Score --}} {{-- Scoring Elements --}} {{-- Score Attributes --}} @empty @endforelse
Score Name Score Scoring Elements Score Attributes
Equifax Risk Score {{ $score['Version'] ?? '' }} {{ $score['Value'] ?? '' }} @if (!empty($score['ScoringElements']))
    @foreach ($score['ScoringElements'] as $element)
  1. {{ $element['Description'] ?? '' }}
  2. @endforeach
@else @endif
No Score Information Available

@endif @if (!empty($dataList['CIRReportData']['IncomeDetails'])) {{-- Income details --}}
Income Details:
@forelse($dataList['CIRReportData']['IncomeDetails'] ?? [] as $income) @empty @endforelse
Occupation Monthly Income Monthly Expenses Poverty Index Asset Ownership Last Reported Date
{{ $income['occupation'] ?? '' }} {{ $income['monthlyIncome'] ?? '' }} {{ $income['monthlyExpense'] ?? '' }} {{ $income['povertyIndex'] ?? '' }} {{ $income['assetOwnership'] ?? '' }} {{ $income['reportedDate'] ?? '' }}
No Income Information Available

@endif @if (!empty($dataList['CIRReportData']['RecentActivities'])) {{-- Recent activieits --}}
Recent Activities
@php $recentActivities = $dataList['CIRReportData']['RecentActivities'] ?? []; @endphp @foreach ($recentActivities as $key => $value) @endforeach
Recent Activity (last 90 days)
{{ ucwords(str_replace('_', ' ', $key)) }}: {{ $value ?? '' }}

@endif @php $retailSummary = $dataList['CIRReportData']['RetailAccountsSummary'] ?? null; $mfiSummary = $dataList['CIRReportData']['MicrofinanceAccountsSummary'] ?? null; $isCCR = !empty($retailSummary); $isMFI = !empty($mfiSummary); $summaryConfig = $isCCR ? [ ['Number of Accounts', 'NoOfAccounts'], ['Total Balance Amount', 'TotalBalanceAmount'], ['Recent Account', 'MostRecentAccount'], ['Number of Open Accounts', 'NoOfActiveAccounts'], ['Total Past Due Amount', 'TotalPastDue'], ['Oldest Account', 'OldestAccount'], ['Number of Past Due Accounts', 'NoOfPastDueAccounts'], ['Total High Credit', 'TotalHighCredit'], ['Total Credit Limit', 'TotalCreditLimit'], ['Number of Write-off Accounts', 'NoOfWrittenOffAccounts'], ['Total Sanction Amount', 'TotalSanctionAmount'], ['Single Highest Credit', 'SingleHighestCredit'], ['Number of Zero Balance Accounts', 'NoOfZeroBalanceAccounts'], ['Total Monthly Payment Amount', 'TotalMonthlyPaymentAmount'], ['Single Highest Sanction Amount', 'SingleHighestSanctionAmount'], ['Most Severe Status < 24 Months', 'MostSevereStatusWithIn24Months'], ['Average Open Balance', 'AverageOpenBalance'], ['Single Highest Balance', 'SingleHighestBalance'], ] : [ ['Number of Open Accounts', 'NoOfActiveAccounts'], ['Total Balance Amount', 'TotalBalanceAmount'], ['Total Monthly Instmt Amt', 'TotalMonthlyPaymentAmount'], ['Number of Past Due Accounts', 'NoOfPastDueAccounts'], ['Total Past Due Amount', 'TotalPastDue'], ['Total Written Off Amount', 'TotalWrittenOffAmount'], ]; $summarySource = $isCCR ? $retailSummary : $mfiSummary; @endphp @if (!empty($summarySource))
Summary :
@foreach (array_chunk($summaryConfig, 3) as $row) @foreach ($row as [$label, $key]) @endforeach @endforeach
Credit Report Summary
{{ $label }} : {{ $summarySource[$key] ?? '-' }}

@endif @php $retailAccounts = $dataList['CIRReportData']['RetailAccountDetails'] ?? []; $mfiAccounts = $dataList['CIRReportData']['MicrofinanceAccountDetails'] ?? []; @endphp {{-- Accounts --}} @if (!empty($dataList['CIRReportData']['RetailAccountDetails']))
Account Details :
@foreach ($retailAccounts ?? [] as $i => $acc) @endforeach
@endif @if (!empty($dataList['CIRReportData']['MicrofinanceAccountDetails'])) {{-- Accounts --}}
Account Details :
@foreach ($mfiAccounts ?? [] as $i => $acc) @endforeach
@endif @if (!empty($dataList['CIRReportData']['EnquirySummary'])) {{-- Enquiry Summary --}}
Enquiry Summary:
@php $fieldMap = [ 'Purpose' => 'Purpose', 'Total' => 'Total', 'Past30Days' => 'Past30Days', 'Past12Months' => 'Past12Months', 'Past24Months' => 'Past24Months', 'Recent' => 'Recent', ]; @endphp @foreach ($fieldMap as $label => $key) @endforeach
Purpose Total Past 30 Days Past 12 Months Past 24 Months Recent
@if ($key === 'Recent' && !empty($dataList['CIRReportData']['EnquirySummary'][$key])) {{ \Carbon\Carbon::parse($dataList['CIRReportData']['EnquirySummary'][$key])->format('d-m-Y') }} @else {{ $dataList['CIRReportData']['EnquirySummary'][$key] ?? '-' }} @endif

@endif @if (!empty($dataList['CIRReportData']['Enquiries']))
Enquiries:
@forelse($dataList['CIRReportData']['Enquiries'] ?? [] as $enq) @empty @endforelse
Institution Date Time Purpose Amount
{{ $enq['Institution'] ?? '' }} {{ isset($enq['Date']) ? \Carbon\Carbon::parse($enq['Date'])->format('d-m-Y') : '' }} {{ $enq['Time'] ?? '' }} {{ $enq['RequestPurpose'] ?? '' }} {{ $enq['Amount'] ?? '' }}
No Enquiries Found

@endif @if (!empty($dataList['InquiryRequestInfo'])) @php $inq = $dataList['InquiryRequestInfo'] ?? []; /* ================= PERSONAL & ACCOUNT INFO ================= */ $inqPersonal = [ 'Consumer’s Full Name' => $inq['FirstName'] ?? '', 'DOB' => !empty($inq['DOB']) ? \Carbon\Carbon::parse($inq['DOB'])->format('d-m-Y') : '', 'Gender' => $inq['Gender'] ?? '', 'Inquiry / Request Purpose' => $inq['InquiryPurpose'] ?? '', ]; /* ---- Family Details (Relationship mapping) ---- */ $relationMap = [ 'F' => 'Father', 'H' => 'Husband', 'B' => 'Brother', 'S' => 'Son', 'U' => 'Son-In-Law', 'Y' => 'Father-In-Law', 'T' => 'Brother-In-Law', 'O' => 'Other', 'M' => 'Mother', 'W' => 'Wife', 'C' => 'Sister', 'D' => 'Daughter', 'V' => 'Daughter-In-Law', 'Z' => 'Mother-In-Law', 'X' => 'Sister-In-Law', ]; if (!empty($inq['MFIDetails']['FamilyDetails'])) { foreach ($inq['MFIDetails']['FamilyDetails'] as $fd) { $code = $fd['AdditionalNameType'] ?? ''; $label = $relationMap[$code] ?? 'Relation'; $inqPersonal[$label] = $fd['AdditionalName'] ?? ''; } } /* ================= ID & PHONE NUMBERS ================= */ $inqIdentity = []; // IDs foreach ($inq['IDDetails'] ?? [] as $id) { $inqIdentity[] = [ 'label' => $id['IDType'] ?? 'ID', 'value' => $id['IDValue'] ?? '', ]; } // Phones $typeMap = ['M' => 'Mobile', 'H' => 'Home', 'O' => 'Office']; foreach ($inq['InquiryPhones'] ?? [] as $ph) { $type = $ph['PhoneType'][0] ?? ''; $inqIdentity[] = [ 'label' => $typeMap[$type] ?? 'Phone', 'value' => $ph['Number'] ?? '', ]; } /* ================= CONTACT DETAILS ================= */ $inqContact = []; foreach ($inq['InquiryAddresses'] ?? [] as $addr) { $inqContact[] = [ 'label' => 'Address', 'value' => $addr['AddressLine1'] ?? '', ]; $inqContact[] = [ 'label' => 'State', 'value' => $addr['State'] ?? '', ]; $inqContact[] = [ 'label' => 'Postal', 'value' => $addr['Postal'] ?? '', ]; } /* ================= MAX ROW ================= */ $maxRows = max( count($inqPersonal), count($inqIdentity), count($inqContact), ); @endphp
Input Enquiry
@for ($i = 0; $i < $maxRows; $i++) {{-- PERSONAL --}} {{-- ID & PHONE --}} {{-- CONTACT --}} @endfor
Personal & Account Information ID & Phone Numbers Contact Details
@if (isset(array_keys($inqPersonal)[$i])) @php $key = array_keys($inqPersonal)[$i]; @endphp {{ $key }} : {{ $inqPersonal[$key] }} @endif @if (isset($inqIdentity[$i])) {{ $inqIdentity[$i]['label'] }} : {{ $inqIdentity[$i]['value'] }} @endif @if (isset($inqContact[$i])) {{ $inqContact[$i]['label'] }} : {{ $inqContact[$i]['value'] }} @endif

@endif @if (!empty($dataList['CIRReportData']['OtherKeyInd']))
Other Key Indicators
@foreach ($dataList['CIRReportData']['OtherKeyInd'] as $key => $value) @endforeach
Indicator Value
{{ ucwords(str_replace('_', ' ', $key)) }} {{ $value ?? '-' }}

@endif
@endif
@empty

No Data Found: something went wrong

@endforelse
{{-- @endif --}} {{-- @endif --}}
{{-- @endsection --}}