@extends('layouts.app') @section('title', 'Passenger Details') @section('content') @php $isFingerprintOnlyViewer = auth()->user()->branch_id && auth()->user()->branch_id === ($passenger->booking?->fingerprint_branch_id) && auth()->user()->branch_id !== ($passenger->booking?->booking_branch_id); $canViewFinancialSection = auth()->user()->roles->pluck('name')->intersect(['Super Admin', 'Co Admin', 'Auditor'])->isNotEmpty(); $canViewVisaSection = auth()->user()->roles->pluck('name')->intersect(['Super Admin', 'Co Admin', 'Visa Admin', 'Visa Staff'])->isNotEmpty(); $canDeleteDocument = auth()->user()->roles->pluck('name')->intersect(['Super Admin', 'Co Admin'])->isNotEmpty() || (auth()->user()->hasRole('Fingerprint Admin') && auth()->user()->branch_id && (auth()->user()->branch_id === ($passenger->booking?->fingerprint_branch_id) || auth()->user()->branch_id === ($passenger->booking?->booking_branch_id))); @endphp
Invoice: {{ $passenger->booking?->invoice?->id ?? '-' }}
{{ trim($passenger->first_name . ' ' . $passenger->last_name) ?: '-' }}
{{ $passenger->passport_no ?? '-' }}
{{ $passenger->passport_expiry?->format('d M Y') ?? '-' }}
{{ $passenger->date_of_birth?->format('d M Y') ?? '-' }}
{{ ucfirst($passenger->passenger_type?->value ?? '-') }}
{{ $passenger->mobile_no ?? '-' }}
{{ $passenger->booking?->package?->package_name ?? '-' }}
{{ match($passenger->service_required?->value) { 'all' => 'Visa + Ticket', 'visa_only' => 'Visa Only', 'ticket_only' => 'Ticket Only', default => '-' } }}
{{ $passenger->status?->name ?? '-' }}
{{ match($passenger->booking?->fingerprint_location?->value) { 'home' => 'Home', 'office' => 'Office', default => '-' } }}
{{ $routeDisplay ?? '-' }}
{{ $passenger->ticketFare?->airline?->name ?? '-' }}
{{ $passenger->ticketFare?->airlineClass?->class?->name ?? '-' }}
@if($passenger->flight_date_from && $passenger->flight_date_to) {{ $passenger->flight_date_from->format('d M Y') }} → {{ $passenger->flight_date_to->format('d M Y') }} @else - @endif
{{ $passenger->latestIssuedTicket?->pnr ?? '-' }}
{{ $passenger->latestIssuedTicket?->ticket_number ?? '-' }}
{{ $passenger->address ?? '-' }}
@currency($ticketFare, 2, $rate)
@currency($visaCost, 2, $rate)
@currency($fingerprintCost, 2, $rate)
@currency($due, 2, $rate)
@currency($paid, 2, $rate)
| Date | Agent | Agent Cost | Add. Cost | Agent Commission | Status | Cancellation Fee |
|---|---|---|---|---|---|---|
| {{ $date }} | {{ $row['agent'] }} | @if($row['agent_cost'])SAR {{ number_format($row['agent_cost'], 2) }}@else N/A @endif | @if($row['add_cost'])SAR {{ number_format($row['add_cost'], 2) }}@else N/A @endif | @if($row['agent_commission'])SAR {{ number_format($row['agent_commission'], 2) }}@else N/A @endif | @switch($row['status']) @case('submitted') Submitted @break @case('issued') Issued @break @case('cancelled') Cancelled @break @default {{ ucfirst($row['status'] ?? 'Pending') }} @endswitch | @if($row['cancellation_fee'])SAR {{ number_format($row['cancellation_fee'], 2) }}@else - @endif |
| No visa submission found | ||||||