@extends('layout.app') @section('content')
{{ __('Statistiques') }}
@foreach ($stats as $index => $stat) @php $workdays = 203; if (strpos($index, '2021') !== false) { $workdays = 92; } $sum = 0; @endphp @foreach ($stat as $data) @php $sum += $data->nb; @endphp @endforeach
{{ $index }} {{ __('Jour(s)') }} %
{{ $data->activity->label }} {{ $data->nb * 0.25 }} {{ round((($data->nb * 0.25) / $workdays) * 100) }}%
{{ __('Total') }} {{ $sum * 0.25 }} / {{ $workdays }} {{ round((($sum * 0.25) / $workdays) * 100) }}%
@endforeach
@endsection