{{--@extends('backend.layouts.admin')--}} {{--@section('main-content')--}} {{-- @php $log_status = \App\Models\CustomBookingStatusLog::$status @endphp--}} {{-- @php $expenses_types = $booking->expense_types??[] @endphp--}} {{-- @php $title = $booking->title @endphp--}} {{-- @php $booking = $booking->booking @endphp--}} {{-- @php $availed_services = $booking['transports']??[] @endphp--}} {{-- --}} {{--
--}} {{--
--}} {{--

Booking

--}} {{-- --}} {{--
--}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
Booking Detail
--}} {{--
--}} {{--
--}} {{-- @if($booking['status'] == 1 && $booking['current_status'] && $booking['current_status']['type'] == 'transport' && $booking['current_status']['status'] == 0)--}} {{--
--}} {{-- --}} {{--
--}} {{-- @endif--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{--
User Name
--}} {{-- {{$booking['user']['name']??''}}
--}} {{--
--}} {{--
--}} {{--
Email
--}} {{--
{{$booking['user']['email']??''}}
--}} {{--
--}} {{--
--}} {{--
Phone
--}} {{--
--}} {{-- {{ '+' . $booking['user']['phone']??'' }}--}} {{--
--}} {{--
--}} {{--
--}} {{-- @php($curr_status = $booking['current_status'] && $booking['current_status']['status'] ?' ('.$log_status[$booking['current_status']['status']].')':'')--}} {{-- @php($curr_status_type = $booking['current_status']?' ('.ucfirst($booking['current_status']['type']).')':'')--}} {{--
Status{{$curr_status_type}}
--}} {{--
{{\App\Models\CustomBooking::$status[$booking['status']] .' '.$curr_status}}
--}} {{--
--}} {{--
--}} {{--
Booking Date
--}} {{--
{{ date('d-m-Y h:m A',strtotime($booking['created_at'])) ??''}}
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @php($tr_total = 0)--}} {{-- @php($expenses = collect($booking['expenses']))--}} {{-- @php($total_expense = 0)--}} {{-- @forelse($booking['transports'] as $row)--}} {{-- @php($detail = $row['detail'])--}} {{-- @php($vehicle = \App\Models\Vehicle::find($detail['vehicle_id']??''))--}} {{-- @php($vehicleId = $vehicle['id'] ?? 0)--}} {{-- @if($row['status'] != 0 && $row['service_id'])--}} {{-- @php($expense = $expenses->where('detail.route_id', $row['service_id'])--}} {{-- ->where('detail.vehicle_id', $vehicleId)--}} {{-- ->sum('amount'))--}} {{-- @else--}} {{-- @php($expense = 0)--}} {{-- @endif--}} {{-- @php($ex_rate = $detail['ex_rate']??1)--}} {{-- @php($expense = $expense?$expense/$ex_rate:0)--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @php($tr_total = $row['price_sar']+$tr_total)--}} {{-- @php($total_expense += $expense)--}} {{-- --}} {{-- @empty--}} {{-- --}} {{-- --}} {{-- --}} {{-- @endforelse--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
FromToModelVehicle No.DurationPriceExpense
{{$detail['from_city']??''}}{{$detail['to_city']??''}}{{ucfirst($detail['model']??'')}}{{$vehicle['registration_no']??''}}{{date('d-m-Y',strtotime($detail['date']??'')) .' '.$detail['time']??''}} - {{date('d-m-Y',strtotime($detail['to_date']??'')) .' '.$detail['to_time']??''}}{{number_format($row['price_sar'])}}{{number_format($expense)}}
No record found
Total (in {{config('constants.currency_symbol')}}){{number_format($tr_total)}}{{ number_format($total_expense) }}
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- @php($track_counter = 1)--}} {{-- @if($booking['status']==2)--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @foreach($booking['transports'] as $service)--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endforeach--}} {{-- --}} {{--
#ServiceTypeTimeStatus
{{$track_counter++}}--}} {{-- {{ucfirst($service['detail']['from_city']??'')}} - {{ucfirst($service['detail']['to_city']??'') }}--}} {{-- --}} {{--
{{\App\Models\Vehicle::find($service['detail']['vehicle_id']??0)?->registration_no??''}}--}} {{--
--}} {{--
CheckIn{{ isset($service['checkin_at']) ? \Carbon\Carbon::parse($service['checkin_at'])->format('d-m-Y h:i a') : '' }}--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{-- @if(is_null($service['checkin_status']) || ($service['checkin_status']==0))--}} {{-- --}} {{-- @endif--}} {{--
--}} {{--
--}} {{--
Checkout{{ isset($service['checkout_at']) ? \Carbon\Carbon::parse($service['checkout_at'])->format('d-m-Y h:i a') : '' }}--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{-- @if($service['checkin_status']== 1 && (is_null($service['checkout_status']) || ($service['checkout_status']==0)))--}} {{-- --}} {{-- @endif--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- @endif--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{--@endsection--}} {{--@push('scripts')--}} {{-- --}} {{--@endpush--}}