@php $appFontLocationId = $location?->id ?? (function_exists('current_location_id') ? current_location_id() : session('location_id')); $appFontFile = $appFontLocationId ? (string) (\App\Models\Setting::get('receipt_font_file', '', $appFontLocationId) ?: \App\Models\Setting::get('ui_font_file', '', $appFontLocationId) ?: \App\Models\Setting::get('app_font_file', '', $appFontLocationId)) : ''; $appFontUrl = $appFontFile !== '' ? asset('fonts/' . rawurlencode($appFontFile)) : ''; @endphp
| Customer Details | |
| Customer | {{ $repair->customer?->name ?? $repair->name }} |
| Contact | {{ $repair->customer?->mobile ?? $repair->contact }} |
| Job Details | |
| Item | {{ $repair->brand }}{{ $repair->model ? ', '.$repair->model : '' }}{{ $repair->serial ? ' (SN: '.$repair->serial.')' : '' }} |
| Issue | {{ $repair->problem_description }} |
| Remarks | {{ $repair->comments }} |
| Service | {{ $repair->service_required }} |
| Status | {{ [0=>'Pending', 1=>'Repairing', 2=>'Ready', 3=>'Complete', 4=>'Return'][$repair->status] ?? 'Pending' }} |
| Created | {{ optional($repair->created_at)->format('Y-m-d h:i A') }} |
| Parts Used | |
| {{ $part->product?->name ?? 'N/A' }} | {{ number_format($part->qty, 0) }} × {{ number_format($part->unit_price, 2) }} = {{ number_format($part->qty * $part->unit_price, 2) }} |
| Total Amount | {{ number_format($repair->amount ?? 0, 2) }} |
| Paid | {{ number_format(($repair->payments->sum('amount') ?? 0), 2) }} |
| Balance Due | {{ number_format(($repair->amount ?? 0) - ($repair->payments->sum('amount') ?? 0), 2) }} |