@php($businessName = businessConfig('business_name', 'business_information')?->value) @php($businessLogo = businessConfig('header_logo', 'business_information')?->value) @php($businessSignature = businessConfig('business_signature', 'business_information')?->value) @php($businessContactEmail = businessConfig('business_support_email', 'business_information')?->value) @php($businessContactPhone = businessConfig('business_support_phone', 'business_information')?->value) {{-- The PDF reads images from disk; fetching them over HTTP is slow and fails when the app URL is unreachable. --}} @php($forPdf = $forPdf ?? false) @php($asset = fn ($path) => $forPdf ? public_path($path) : asset($path)) {{ $businessName }} {{ translate('invoice') }} @if (isset($emailed))

{{ $emailed ? 'Receipt emailed to '.$data['customer_info']['customer_email'].'.' : 'The receipt could not be emailed. Print it or try again.' }}

@endif
Invoice
{{ 'Trip ID' }} #{{ $data->ref_id }} @php($time_format = getSession('time_format'))
{{ translate('date') }}: {{ date(DATE_FORMAT . ' h:i a', strtotime($data['customer_info']['trip_date'] ?? now())) }}
{{ $businessName }}

{{ translate('trip_distance') }}

{{ translate('pickup_Address') }} ({{ date(DATE_FORMAT, strtotime($data->created_at)) . ' ' . date('h:i A', strtotime($data?->tripStatus?->ongoing)) ?? 'N/a' }})
{{ $data['customer_info']['pickup_location'] }}
{{ translate('destination_Address') }} ({{ date(DATE_FORMAT, strtotime($data->created_at)) . ' ' . date('h:i A', strtotime($data?->tripStatus?->completed ?? $data?->tripStatus?->cancelled)) ?? 'N/a' }})
{{ $data['customer_info']['dropoff_location'] }}
@if ($data->current_status == 'completed')

{{ $data['customer_info']['distance'] }} {{ translate('kilometers') }}

@else

{{ $data['customer_info']['distance'] }} {{ translate('kilometers') }}

@endif