@lang("content.total") |
@php $prevTotal = 0 @endphp
@php $grandTotal = 0 @endphp
@foreach($categories as $i => $category)
@php $grandTotal += isset($flightsByCategory[$i]->count) ? $flightsByCategory[$i]->count : 0 @endphp
@endforeach
{{ $grandTotal }} |
@if (!isset($futureDates) || (isset($futureDates) && !$futureDates))
@foreach($categories as $i => $category)
@php $total = isset($flightsByCategory[$i]->count) ? $flightsByCategory[$i]->count : 0 @endphp
@if ($category == "above_60_mins")
@php $avPerc = $totalFlights != 0 ? 100 * round($total / $totalFlights, 2) : 0 @endphp
@else
@php $avPerc = $totalFlights != 0 ? 100 * round(($total + $prevTotal) / $totalFlights, 2) : 0 @endphp
@endif
@php $avPerc > 100 ? 100 : $avPerc @endphp
@php $prevTotal += $total @endphp
@php $bgClass = getPunctualityBgClass($category) @endphp
@if($category == "above_60_mins")
|
{{ $avPerc }}% |
@else
@php $showAcc = $avPerc >= 15 ? $avPerc."%" : "" @endphp
{{ $showAcc }}
|
@endif
{{ $total }} |
@endforeach
@endif