{{$title}}
Live Tracking
@foreach($allotments as $allotment) @php $badgeClass = ''; if ($allotment->booking->type == 'one-way') { $badgeClass = 'badge-primary'; } elseif ($allotment->booking->type == 'two-way') { $badgeClass = 'badge-secondary'; } elseif ($allotment->booking->type == 'enroute') { $badgeClass = 'badge-warning'; } if($allotment->driver_update == 1){ $driver_no = $allotment->driver_number; $vehicle_no = $allotment->vehicle_number; }else{ if($allotment->vehicle->own == 0){ $driver_no = $allotment->driver->phone_number; $vehicle_no = $allotment->vehicle->vehicle_no; }else{ $driver_no = ''; $vehicle_no = ''; } } @endphp @endforeach
{{$allotment->booking->fromPlace->city->name}}
0h 0m 0s
{{ date('H:i', strtotime($allotment->allotment_date)) }} Hrs
{{ Str::limit($allotment->booking->guest_name, 20) }}
AD-{{$allotment->booking->adults}} | CH-{{$allotment->booking->children}} | INF-{{$allotment->booking->infants}}
{{$allotment->booking->guest_mobile_number}}
{{$allotment->booking->agent_reference}}
{{$allotment->booking->agent->company_name}}
{{$allotment->booking->type}} @if(!empty($allotment->booking->enroute_places)) ( @foreach(json_decode($allotment->booking->enroute_places) as $key => $place) {{ $place->title }} {{ $key < count(json_decode($allotment->booking->enroute_places)) - 1 ? ', ' : '' }} @endforeach ) @endif
{{$allotment->booking->fromPlace->place_name}} To {{$allotment->booking->toPlace->place_name}}
vehicle->own == 0 || $allotment->driver_update == 1?'readonly':''}}>
vehicle->own == 0 || $allotment->driver_update == 1?'readonly':''}}>
driver_update==1?'disabled':''}}>
Vehicle List
@foreach($vehicles as $vehicle)
LT

{{$vehicle->vehicle_no}}

@if(!$vehicle->speedometers->isEmpty()) @foreach($vehicle->speedometers as $speedometer) {{date('d-m-Y H:i',strtotime($speedometer->created_at))}}
{{ ($speedometer->vehicle_engine_on == 1) ? (($speedometer->status==0)?'Trip-in':'Trip-Out') : 'Shutdown' }} {{$speedometer->shutdown_reason}} @endforeach @endif

{{--@if($vehicle->speedometers->isEmpty()) @endif--}}

@endforeach
Summary
Vehicle expenses

฿{{$getExpenseThisMonth}}

Office Expense

฿{{$getOfficeExpenseThisMonth}}

Payment

฿{{$getPaymentThsMonth}}

Allotment by Vehicle
@php $google = $dashboard2; $vehicle = array_column($dashboard2, 'vehicle_id'); // Extract only vehicle_id values $current_mon = array_column($dashboard2, 'total_sell'); // Extract only vehicle_id values @endphp