@php
$startdate = request('start_date') ?: date('Y-m-01');
$monthYear = (new DateTime($startdate))->format('Y');
@endphp
{{ 'P&L Monthly Report' }} ({{ $monthYear }})
{{ getAuthCompanyName() }}
{{ getAuthCarrierInfo()->BILL_TO }}
{{ date('m/d/Y h:i A') }}
|
{{ date('m/d/Y h:i A') }}
|
Grand Total:
${{ number_format($profitGrandTotal ?? 0, 2) }}
|
{{-- @php
$repair_type_totals = 0;
$expense_type_totals = 0;
foreach ($truck_issues_new as $truck_issues) {
if (isset($repair_type_array_new[$truck_issues->Type])) {
$repair_type_totals += $truck_issues->total_amount;
}
}
foreach ($truck_expense_new as $truck_expense) {
if (isset($expense_type_array_new[$truck_expense->TYPE])) {
$expense_type_totals += $truck_expense->total_amount;
}
}
$profit = $income - $repair_type_totals - $expense_type_totals;
@endphp
|
{{ date('m/d/Y h:i A') }}
|
Profit:
${{ number_format($profit, 2) }}
|
--}}
@php
$start = \Carbon\Carbon::parse($startDate);
$end = \Carbon\Carbon::parse($endDate);
$dateInterval = \Carbon\CarbonPeriod::create($start, '1 month', $end);
$overallTotals=0;
@endphp
|
@foreach($months as $month)
{{ strtoupper($month) }}
|
@endforeach
Total |
| Loads Income |
@php $totalLoadIncome=0; @endphp
@foreach($months as $month)
${{ number_format($report['income'][$month] ?? 0, 2) }}
@php
$overallTotals+=$report['income'][$month];
@endphp
|
@endforeach
${{ number_format((float) array_sum($report['income']), 2) }}
|
| Extra Charge |
@php $totalExtracharge=0; @endphp
@foreach($months as $month)
${{ number_format($report['extra_charge'][$month] ?? 0, 2) }}
@php
$totalExtracharge+=$report['extra_charge'][$month];
$overallTotals+=$totalExtracharge;
@endphp
|
@endforeach
${{ number_format((float) array_sum($report['extra_charge']), 2) }}
|
| Income Total |
@php $totalIncome=0; @endphp
@foreach($months as $month)
${{ number_format($report['income_total'][$month] ?? 0, 2) }} |
@php
$totalIncome+=$report['income_total'][$month];
$overallTotals+=$totalIncome
@endphp
@endforeach
${{ number_format((float) array_sum($report['income_total']), 2, '.', ',') }}
|
| Repair |
@php $totalRepair=0; @endphp
@foreach($months as $month)
${{ number_format($report['repair'][$month] ?? 0, 2) }}
@php
$totalRepair+=$report['repair'][$month];
$overallTotals+=$totalRepair
@endphp
|
@endforeach
${{ isset($report['repair'][$month])
? number_format((float)$report['repair'][$month], 2, '.', ',')
: '0.00' }}
|
| Expense |
@php $totalExp =0; @endphp
@foreach($months as $month)
${{ number_format($report['expense'][$month] ?? 0, 2) }}
@php
$totalExp+=$report['expense'][$month];
$overallTotals+=$totalExp
@endphp
|
@endforeach
${{ number_format((float) array_sum($report['expense']), 2, '.', '') }}
|
| PROFIT |
@php $totalProfit = 0; @endphp
@foreach($months as $month)
@php
$monthlyProfit = $report['profit'][$month] ?? 0;
@endphp
${{ number_format($monthlyProfit, 2) }}
|
@php $totalProfit+=$monthlyProfit;
$overallTotals+=$totalProfit
@endphp
@endforeach
${{ number_format((float) array_sum($report['profit']), 2, '.', '') }}
|
| Grand Total |
{{-- Grand Total column --}}
${{ number_format($profitGrandTotal ?? 0, 2) }}
|
@if(!empty($chartImage))
@else
@endif