Logo {{ getAuthCompanyName() }} - {{$cur_year}}

Driver Expense Report

Grand Total - ${{ number_format($gtotal, 2) }}


@for ($month = 1; $month <= 12; $month++) @endfor @php $monthlyTotals = array_fill(1, 12, 0); @endphp @foreach ($drivers as $driver) @for ($month = 1; $month <= 12; $month++) @php $expenseAmount = $expenseAmounts[$driver->DRIVER_ID][$month] ?? 0; $monthlyTotals[$month] += $expenseAmount; $color = $expenseAmount > 0 ? 'green' : ($expenseAmount < 0 ? 'red' : '#000'); @endphp @endfor @endforeach @for ($month = 1; $month <= 12; $month++) @endfor
Driver Name{{ \Carbon\Carbon::createFromDate($cur_year, $month, 1)->format('M-Y') }}
{{ strtoupper($driver->FIRST_NAME) }} {{ strtoupper($driver->LAST_NAME) }} ${{ number_format($expenseAmount, 2) }}
Total ${{ number_format($monthlyTotals[$month], 2) }}
Grand Total

${{ number_format($gtotal, 2) }}