@if($company)

{{ $company->name }}

{{ $company->address_1 }}{{ $company->address_2 ? ', ' . $company->address_2 : '' }}

@endif

Incident Counts Report - {{ $monthName }} {{ $year }}

Generated By: {{ auth()->user()->name }}

Date Generated: {{ now()->format('M d, Y H:i') }}

@for($d = 1; $d <= $days; $d++) @endfor @foreach($reportData as $row) @for($d = 1; $d <= $days; $d++) @endfor @endforeach @for($d = 1; $d <= $days; $d++) @php $colTotal = collect($reportData)->sum(fn($r) => $r['days'][$d]); @endphp @endfor
Site{{ $d }}Total
{{ $row['site'] }} {{ $row['days'][$d] > 0 ? $row['days'][$d] : '' }} {{ $row['total'] }}
Totals{{ $colTotal > 0 ? $colTotal : '' }}{{ collect($reportData)->sum('total') }}