@php
$startdate = request('start_date') ?: date('Y-01-01');
$year = (new DateTime($startdate))->format('Y');
@endphp
{{ 'P&L Yearly Report' }} ({{ $year }})
{{ getAuthCompanyName() }}
{{ getAuthCarrierInfo()->BILL_TO }}
@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);
@endphp
@php
$totalIncome = ($income ?? 0) + ($incomeExt ?? 0);
$repairSubtotal = $repair_type_totals ?? 0;
$expenseSubtotal = $expense_type_totals ?? 0;
$profit = $totalIncome - $repairSubtotal - $expenseSubtotal;
@endphp
@if(!empty($chartImage))
@else
@endif