@extends('layouts.app') @section('title', 'Transport Reports') @section('content')

Transport reports

Route utilisation, fare revenue and fleet running costs.
Assignments
@include('transport._nav')

Learners by route

Assigned learners on each route
@if($byRoute->count()) {!! \App\Support\Chart::bars($byRoute->mapWithKeys(fn ($row) => [$row->name => (int) $row->total])->all(), 200) !!} @else @endif

Travel mode mix

One-way versus two-way
@if(count($byMode))
{!! \App\Support\Chart::donut($byMode, 180) !!}
@foreach($byMode as $mode => $total) @endforeach
{{ $mode }} {{ num($total) }} {{ $assigned > 0 ? round($total / $assigned * 100) : 0 }}%
@else @endif

Fleet fuel consumption

Total spend per vehicle
@forelse($fuel as $row) @empty @endforelse @if($fuel->count()) @endif
VehicleLitresFuel cost
{{ $row->reg_no }} {{ number_format((float) $row->litres, 2) }} {{ money($row->total) }}
Total {{ number_format((float) $fuel->sum('litres'), 2) }} {{ money($fuel->sum('total')) }}

Route summary

Stops and fares
@forelse($routes as $route)
{{ $route->name }} {{ $route->stops->count() }} stops
@if($route->stops->count()) 1-way from {{ money($route->stops->min('one_way_price')) }} ยท 2-way from {{ money($route->stops->min('two_way_price')) }} @else No stops configured @endif
@empty @endforelse
@endsection @push('styles') @endpush