@extends('garage.layouts.app') @section('title', 'Service reminder') @section('content') @php $garageName = trim((string) (($garage->name ?? '') ?: 'Garage')); $fareedMotorsLogoPath = public_path('images/fareed-motors-logo.png'); $useFareedMotorsLogo = is_file($fareedMotorsLogoPath) && stripos($garageName, 'fareed') !== false; $logoUrl = $useFareedMotorsLogo ? asset('images/fareed-motors-logo.png') : null; $fmtDate = function ($d) { if (! $d) return '—'; try { return \Carbon\Carbon::parse($d)->format('d-m-Y'); } catch (\Throwable $e) { return (string) $d; } }; @endphp
Back
@if($logoUrl) {{ $garageName }} @else {{ strtoupper($garageName) }} @endif
Vehicle Number:
{{ $print['vehicle_line1'] ?? ($print['vehicle_label'] ?? '—') }} @if(!empty($print['vehicle_line2']))
{{ $print['vehicle_line2'] }} @endif
Current Reading: {{ $print['current_reading'] !== null ? \App\Support\GarageMeterReading::format($print['current_reading']) . ' km' : '—' }}
Next Oil Change : {{ $print['next_reading'] !== null ? \App\Support\GarageMeterReading::format($print['next_reading']) . ' km' : '—' }}
Oil Change Date: {{ $fmtDate($print['service_date'] ?? null) }}
Next Oil Change Date: {{ $fmtDate($print['next_service_date'] ?? null) }}
Oil Name:
{{ $print['oil_name'] ?? '—' }}
A/F O/F A/c/F
@endsection