@extends('layouts.master') @section('content')
Unit Id | @for ($month = 1; $month <= 12; $month++){{ \Carbon\Carbon::createFromDate($cur_year, $month, 1)->format('M-Y') }} | @endforTotal | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ $truck->UNIT_ID }} | @for ($month = 1; $month <= 12; $month++) @php $repairAmount = $repairAmounts[$truck->TRUCK_ID][$month] ?? 0; $expenseAmount = $expenseAmounts[$truck->TRUCK_ID][$month] ?? 0; $totalAmount = $repairAmount + $expenseAmount; $monthlyTotals[$month] += $totalAmount; $total += $totalAmount; @endphp${{ number_format($totalAmount, 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) }} |