{{ getAuthCompanyName() }} - {{$cur_year}}
Driver Maintenance & 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)
@php $total = 0; @endphp
{{ strtoupper($driver->FIRST_NAME) }} {{ strtoupper($driver->LAST_NAME) }} |
@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');
$total += $expenseAmount;
@endphp
${{ number_format($expenseAmount, 2) }}
|
@endfor
${{ number_format($total, 2) }}
|
@endforeach
Total |
@for ($month = 1; $month <= 12; $month++)
${{ number_format($monthlyTotals[$month], 2) }}
|
@endfor
${{ number_format($gtotal, 2) }}
|
Grand Total |
${{ number_format($gtotal, 2) }}
|