@extends('layouts.master') @section('content')
Driver Name | @for ($month = 1; $month <= 12; $month++){{ \Carbon\Carbon::createFromDate($cur_year, $month, 1)->format('M-Y') }} | @endforTotal | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ 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) }} | |||||||||||
Total | @for ($month = 1; $month <= 12; $month++) @php $gtotal += $monthlyTotals[$month]; @endphp${{ number_format($monthlyTotals[$month], 2) }} | @endfor${{ number_format($gtotal, 2) }} | |||||||||||
Grand Total : ${{ number_format($gtotal, 2) }} |