@extends('layouts.master') @section('content')
UNIT ID | @for ($month = 1; $month <= 12; $month++){{ \Carbon\Carbon::createFromDate($cur_year, $month, 1)->format('M-Y') }} | @endforTotal | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@if ($isTrailer) Trailer {{ $id }} @elseif($isDriver) Driver {{ $id }} @elseif($isMisc) MISC Expenses @else {{ $id }} @endif | @for ($month = 1; $month <= 12; $month++) @php $profit = $profits[$month] ?? 0; $monthlyTotals[$month] += $profit; // Sum monthly profits for the total row @endphp${{ number_format($profit, 2) }} | @endfor${{ number_format($rowTotal, 2) }} | |||||||||||
Total | @for ($month = 1; $month <= 12; $month++)${{ number_format($monthlyTotals[$month], 2) }} | @endfor${{ number_format($gtotal, 2) }} | |||||||||||
Grand Total Profit: ${{ number_format($gtotal, 2) }} |