@extends('frontend.vendor_dashboard.dashboard.layouts.app') @section('content')
Back
Dispatch no.: {{ $VerRelation->chalani_no ?? '' }}
Date: {{ \Carbon\Carbon::parse($VerRelation->date ?? now())->format('d F, Y') }}

Verification of Relationship

@php // Helper function to get title based on gender and marital status if (!function_exists('getTitle')) { function getTitle($gender, $maritalStatus = null) { if ($gender == 'Male') { return 'Mr.'; } else { return $maritalStatus == 'Married' ? 'Mrs.' : 'Ms.'; } } } // Decode relations $relations = is_string($VerRelation->relations ?? '') ? json_decode($VerRelation->relations, true) : $VerRelation->relations ?? []; // Calculate how many photos can fit on first page (approximately) // Applicant photo + relations photos $totalPhotos = count($relations) + 1; // Define max photos per page (adjust based on your layout) // With 20% width, you can fit 5 per row, so ~10 photos per page (2 rows) $maxPhotosPerPage = 8; // Adjust this number based on your needs @endphp

This is to verify that applicant {{ getTitle($VerRelation->gender ?? 'Male', $VerRelation->applicant_marital_status ?? null) }} {{ $VerRelation->applicant_name ?? '' }} holder of Nepali Citizenship Certificate No. {{ $VerRelation->applicant_citizen ?? '' }} @if (!empty($VerRelation->applicant_id_no)) and National ID No. {{ $VerRelation->applicant_id_no }} @endif @if (!empty($VerRelation->applicant_passport)) and Passport No. {{ $VerRelation->applicant_passport }} @endif @if (($VerRelation->gender ?? 'Male') == 'Male') grandson @else granddaughter @endif of {{ getTitle('Male') }} {{ $VerRelation->applicant_grandfather ?? '' }}, @if (($VerRelation->gender ?? 'Male') == 'Male') son @else daughter @endif of {{ getTitle('Male') }} {{ $VerRelation->applicant_father ?? '' }} and {{ getTitle('Female', 'Married') }} {{ $VerRelation->applicant_mother ?? '' }}, permanent resident of ward No. {{ $VerRelation->ward->name ?? ($VerRelation->previous_ward_no ?? '') }} @if (!empty($VerRelation->previous_ward_no)) (Previous ward No. {{ $VerRelation->previous_ward_no ?? '' }}) @endif , {{ $VerRelation->municipality->name ?? '' }}, {{ $VerRelation->district ?? '' }}, {{ $VerRelation->provinance ?? '' }}, Nepal. has the following relationship with the under mentioned persons.

@if (isset($relations) && is_array($relations) && count($relations) > 0) @foreach ($relations as $index => $relation) @endforeach @endif
S.N Name Citizenship Certificate No Relationship with the Applicant
1 {{ getTitle($VerRelation->gender ?? 'Male', $VerRelation->applicant_marital_status ?? null) }} {{ $VerRelation->applicant_name ?? '' }} {{ $VerRelation->applicant_citizen ?? '' }} Self (Applicant)
{{ $index + 2 }} {{ getTitle($relation['relation_gender'] ?? 'Male', $relation['married_status'] ?? null) }} {{ $relation['relation_name'] ?? '' }} {{ $relation['relation_citizen'] ?? '' }} {{ $relation['relation'] ?? '' }}
Photo Verification
@if (isset($VerRelation->applicant_photo) && $VerRelation->applicant_photo) {{ $VerRelation->applicant_name ?? 'Applicant' }} @else
PHOTO
@endif
Applicant
{{ getTitle($VerRelation->gender ?? 'Male', $VerRelation->applicant_marital_status ?? null) }} {{ $VerRelation->applicant_name ?? '' }}
@if (isset($relations) && is_array($relations) && count($relations) > 0) @foreach ($relations as $index => $relation) @php // Determine if this photo should have a page break before it // Break after every 4 photos (1 row in print) $photoNumber = $index + 2; // +2 because applicant is 1 $shouldBreak = ($photoNumber - 1) % 4 == 0 && $index > 0; @endphp
@if (isset($relation['photo']) && $relation['photo']) {{ $relation['relation_name'] ?? 'Photo' }} @else
PHOTO
@endif
{{ ucfirst($relation['relation'] ?? 'Relation') }}
{{ getTitle($relation['relation_gender'] ?? 'Male', $relation['married_status'] ?? null) }} {{ $relation['relation_name'] ?? '' }}
@endforeach @else
No relations information available.
@endif

This letter is issued on the basis of the applicant's written self-declaration, official inquiry and investigation carried out at the local level, confirmation by competent witnesses, and in accordance with the Section 12 of the Local Government Operation Act, 2074 BS (2017 AD).

{{ $Wardchairman->name ?? '' }}
{{ $Wardchairman->position ?? 'Ward Chairman' }}
{{ $Wardchairman->municipality->name ?? 'Bhaktapur Municipality' }}, Ward {{ $Wardchairman->ward->name ?? '2' }}
@endsection