@extends('layouts/layoutMaster') @section('title', __('locale.Ride Details')) @section('vendor-style') @vite(['resources/assets/css/datatables.scss', 'resources/assets/vendor/libs/raty-js/raty-js.scss', 'resources/assets/vendor/scss/pages/app-invoice.scss']) @endsection @section('vendor-script') @vite(['resources/assets/js/datatables.js', 'resources/assets/vendor/libs/raty-js/raty-js.js', 'resources/assets/js/star-ratings.js']) @endsection @section('content') @php $currency = $ride->currency ?? Helper::setting('currency_symbol', 'currency'); @endphp
{{-- Ride Header --}}

{{ __('locale.Ride ID') }}: #{{ $ride->ride_id }} {{ $ride->type }}

{{ __('locale.Departure') }}: {{ \Carbon\Carbon::parse($ride->departure_time)->format('d M, Y h:i A') ?? 'N/A' }} | {{ __('locale.Arrival') }}: {{ \Carbon\Carbon::parse($ride->arrived_time)->format('d M, Y h:i A') ?? 'N/A' }}

{{ $ride->status }}
{{-- Ride Info --}}
{{ __('locale.Ride Information') }}

{{ __('locale.Pickup Location') }}: {{ $ride->pickup_location }}

{{ __('locale.Drop Location') }}: {{ $ride->drop_location }}

{{ __('locale.Trip Distance') }}: {{ $ride->trip_distance }} km

{{ __('locale.Trip Time') }}: {{ $ride->trip_time }} mins

{{ __('locale.Fare') }}: {{ $currency }}{{ number_format($ride->fare, 2) }}

{{ __('locale.Payment Type') }}: {{ $ride->payment_type }}

{{ __('locale.Payment Status') }}: {{ $ride->payment_status }}

@if ($ride->type == 'parcel')

{{ __('locale.Sender Name') }}: {{ $ride->sender_name }}

{{ __('locale.Receiver Name') }}: {{ $ride->receiver_name }}

{{ __('locale.Receiver Phone') }}: {{ $ride->receiver_phone }}

{{ __('locale.Parcel Category') }}: {{ $ride->parcel_category?->name ?? 'N/A' }}

{{ __('locale.Package Details') }}: {{ $ride->package_details ?? 'N/A' }}

{{ __('locale.Order ID') }}: {{ $ride->order_id ?? '-' }}

@if ($ride->cancelled_by)

{{ __('locale.Cancelled By') }}: {{ $ride->cancelled_by }} | {{ $ride->cancelled_message ?? '' }}

@endif @endif
{{-- Ride Locations Map --}}
{{ __('locale.Ride Route') }}

{{ __('locale.Distance') }}: -

{{ __('locale.Estimated Time') }}: -

{{-- Invoice / Fare breakdown --}} @php $invoice = json_decode($ride->invoice_details, true) ?? []; $currency = $invoice['currency'] ?? '₹'; // fallback @endphp @if ($ride->type != 'Delivery')
{{ __('locale.Invoice Details') }} {{ isset($invoice['invoice_date']) ? \Carbon\Carbon::parse($invoice['invoice_date'])->format('d M, Y h:i A') : '-' }}
{{ __('locale.Invoice No') }}:
{{ $invoice['invoice_no'] ?? '-' }}
{{ __('locale.Ride Cost') }}:
{{ $currency }}{{ number_format($invoice['old_fare'] ?? 0, 2) }}
{{ __('locale.Taxes') }}:
{{ $currency }}{{ number_format($invoice['taxes'] ?? 0, 2) }}
{{ __('locale.Waiting Charges') }}:
{{ $currency }}{{ number_format($invoice['waiting_charges'] ?? 0, 2) }}
{{ __('locale.Subtotal') }}:
{{ $currency }}{{ number_format($invoice['sub_total'] ?? 0, 2) }}
{{ __('locale.Discount') }}:
{{ $currency }}{{ number_format($invoice['discount'] ?? 0, 2) }}
{{ __('locale.Grand Total') }}:
{{ $currency }}{{ number_format($invoice['grand_total'] ?? 0, 2) }}
@endif
{{-- Driver & User Details --}}
{{ __('locale.Driver Details') }}
Avatar
{{ $ride->driver?->user?->name ?? 'N/A' }}
{{ __('locale.Driver ID') }}: #{{ $ride->driver?->user?->id }}
{{ __('locale.Contact info') }}

{{ __('locale.Email') }}: {{ $ride->driver?->user?->email ?? 'N/A' }}

{{ __('locale.Phone') }}: {{ $ride->driver?->user?->phone ?? 'N/A' }}

{{ __('locale.Customer details') }}
Avatar
{{ $ride->user->name ?? 'N/A' }}
{{ __('locale.Customer ID') }}: #{{ $ride->user->id }}
{{ __('locale.Contact info') }}

{{ __('locale.Email') }}: {{ $ride->user->email ?? 'N/A' }}

{{ __('locale.Phone') }}: {{ $ride->user->phone ?? 'N/A' }}

@if (isset($ride->platform_commission))
{{ __('locale.Platform Commission') }}:
{{ $currency }}{{ number_format($ride->platform_commission, 2) }}
@endif
@endsection @section('page-script') @endsection