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