Vendor Report
Vendor Report
Back
{{ getAuthCompanyName() }}
Maintenance Log
Name: {{$vendor->NAME}} |
Address: {{$vendor->ADDRESS_1}} |
Address 2: {{$vendor->ADDRESS_2}} |
City: {{$vendor->CITY}} |
State: {{$vendor->PROVINCE}} |
Zip: {{$vendor->POSTAL_CODE}} |
@php
$totalSum = 0;
$totalSum2 = 0;
@endphp
@foreach ($vehicle_maintenances as $item)
@php
$arr = [];
if (!empty($item->service_provider)) {
$arr = explode(",", $item->service_provider);
}
$total = $item->part + $item->labor;
$totalSum2 += $total;
@endphp
@endforeach
Total Part Cost: ${{ number_format($sum->total_part, 2) }} |
Total Maintenance Cost ${{ number_format($totalSum2, 2) }} |
Total Labor Cost: ${{ number_format($sum->total_labour, 2) }} |
|
Month |
@for ($month = 1; $month <= 12; $month++)
{{ \Carbon\Carbon::createFromDate($cur_year, $month, 1)->format('M-Y') }} |
@endfor
@php
$repairSubtotals = array_fill(1, 12, 0);
@endphp
@foreach ($repairTypes as $repairType)
{{ $repairType->NAME }} |
@for ($month = 1; $month <= 12; $month++)
@php
$key = sprintf('%02d-%d', $month, $cur_year);
$amount = $repairAmounts[$repairType->NAME][$key] ?? '0';
$amount = floatval($amount);
$repairSubtotals[$month] += $amount;
@endphp
@if($amount > 0) ${{ number_format($amount, 2) }} @endif
|
@endfor
@endforeach
Repair Subtotal |
@for ($month = 1; $month <= 12; $month++)
@if($repairSubtotals[$month] > 0) ${{ number_format($repairSubtotals[$month], 2) }} @endif
|
@endfor
EXPENSE TYPE |
@php
$expenseSubtotals = array_fill(1, 12, 0);
@endphp
@foreach ($expenseTypes as $expenseType)
{{ $expenseType->NAME }} |
@for ($month = 1; $month <= 12; $month++)
@php
$key = sprintf('%02d-%d', $month, $cur_year);
$amount = $expenseAmounts[$expenseType->NAME][$key] ?? 0;
$expenseSubtotals[$month] += $amount;
@endphp
@if(!empty($amount)) ${{ number_format($amount,2) }} @endif |
@endfor
@endforeach
Expense Subtotal |
@for ($month = 1; $month <= 12; $month++)
@if($expenseSubtotals[$month] > 0) ${{ number_format($expenseSubtotals[$month], 2) }} @endif
|
@endfor
Total Monthly Cost |
@for ($month = 1; $month <= 12; $month++)
${{ number_format($monthlyTotals[$month], 2) }} |
@endfor
Vehicle Maintenance Log
Description |
Status |
Date |
Odometer |
Type |
Vendor |
Part |
Labor Cost |
Total Cost |
@foreach ($vehicle_maintenances as $item)
@php
$arr = [];
if (!empty($item->service_provider)) {
$arr = explode(",", $item->service_provider);
}
$total = $item->part + $item->labor;
$totalSum += $total;
@endphp
{{$item->description}} |
{{$item->status}} |
{{ date('m/d/Y',strtotime($item->date))}} |
{{$item->odometer}} |
{{$item->repair_name}}
|
{{$item->vendorname}} |
{{$item->part}} |
{{$item->labor}} |
${{number_format($total, 2)}} |
@endforeach
Total
| |
|
|
|
|
|
|
${{number_format($totalSum, 2)}} |
@endsection()
@section('script')
@endsection