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
Maintenance Cost Summary ${{number_format($totalSum2,2) }}
Month |
@for ($month = 1; $month <= 12; $month++)
{{ \Carbon\Carbon::createFromDate($cur_year, $month, 1)->format('M-Y') }} |
@endfor
REPAIR TYPE |
@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] ?? '';
@endphp
@if(!empty($amount)) ${{ number_format($amount,2) }} @endif |
@endfor
@endforeach
EXPENSE TYPE |
@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] ?? '';
@endphp
@if(!empty($amount)) ${{ number_format($amount,2) }} @endif |
@endfor
@endforeach
Total Monthly Cost |
@for ($month = 1; $month <= 12; $month++)
${{ number_format($monthlyTotals[$month], 2) }} |
@endfor
Vehicle Maintenance Log
Description |
Status |
Date |
Odometer |
Service Provider |
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}} |
@foreach($serviceCode as $key => $serviceCodes)
@if(in_array($serviceCodes->SERVICEID, $arr))
{{$serviceCodes->Description}}
@endif
@endforeach
{{$item->service_provider}}
|
{{$item->vendorname}} |
{{$item->part}} |
{{$item->labor}} |
${{number_format($total, 2)}} |
@endforeach
Total
| |
|
|
|
|
|
|
${{number_format($totalSum, 2)}} |
@endsection()
@section('script')
@endsection