{{-- ── Header ──────────────────────────────────────────────────────────── --}} {{-- ── Customer + Vehicle ─────────────────────────────────────────────── --}} {{-- ── Sections + Line Items ─────────────────────────────────────────── --}} @foreach($sections as $section) @php $statusColors = ['open'=>['#fef3c7','#92400e'],'pending_approval'=>['#fffbeb','#b45309'],'approved'=>['#eff6ff','#1d4ed8'],'paid'=>['#f0fdf4','#15803d']]; $sc = $statusColors[$section['status']] ?? ['#f9fafb','#374151']; $statusLabel = \App\Domain\Workshop\Models\JobCardSection::STATUSES[$section['status']] ?? $section['status']; @endphp @endforeach {{-- ── Grand Total ──────────────────────────────────────────────────── --}} {{-- ── Payment Notice ─────────────────────────────────────────────── --}} {{-- ── Footer ──────────────────────────────────────────────────────── --}}
Performance SA
Workshop
Tax Invoice
INV-{{ str_pad($jobCard->id, 5, '0', STR_PAD_LEFT) }}
{{ now()->format('d F Y') }}
Bill To
{{ $jobCard->customer_name ?: $jobCard->customer_email }}
@if($jobCard->customer_name)
{{ $jobCard->customer_email }}
@endif @if($jobCard->customer_phone)
{{ $jobCard->customer_phone }}
@endif
Vehicle
{{ $jobCard->vehicleDescription() }}
@if($jobCard->vehicle_registration)
{{ $jobCard->vehicle_registration }}
@endif
Job Card #{{ $jobCard->id }}
{{-- Section heading --}}
{{ $section['name'] }} {{ $statusLabel }}
{{-- Line items table --}} @foreach($section['items'] as $i => $item) @php $rowBg = $item['approval'] === 'rejected' ? '#fef2f2' : ($i % 2 === 0 ? '#ffffff' : '#f9fafb'); $approvalColors = ['awaiting' => ['#fef3c7','#92400e'], 'approved' => ['#d1fae5','#065f46'], 'rejected' => ['#fee2e2','#991b1b']]; $ac = $approvalColors[$item['approval']] ?? ['#f3f4f6','#374151']; $approvalLabel = ucfirst($item['approval']); $isLabour = $item['type'] === 'labour'; @endphp @endforeach
Description Type Supplier / Mechanic Qty / Hrs Cost excl. Markup Unit excl. Total incl. Status
{{ $item['description'] }} {{ ucfirst($item['type']) }} @if($isLabour && $item['mechanic_name']) {{ $item['mechanic_name'] }} @elseif(!$isLabour && $item['supplier']) {{ $item['supplier'] }} @else — @endif @if($isLabour) {{ number_format($item['actual_hours'] ?? 0, 1) }}h @else {{ number_format($item['qty'], $item['qty'] == intval($item['qty']) ? 0 : 2) }} @endif @if(!$isLabour && $item['cost_price_excl_vat'] !== null) R {{ number_format($item['cost_price_excl_vat'], 2) }} @else — @endif @if(!$isLabour && $item['markup_pct'] !== null) {{ number_format($item['markup_pct'] * 100, 0) }}% @else — @endif {{ $item['unit_excl'] ? 'R '.number_format($item['unit_excl'],2) : '—' }} {{ $item['total_incl'] ? 'R '.number_format($item['total_incl'],2) : '—' }} {{ $approvalLabel }}
Section subtotal excl. VAT R {{ number_format($section['subtotal_excl'],2) }}
VAT (15%) R {{ number_format($section['vat'],2) }}
Subtotal excl. VAT R {{ number_format($grandTotalExcl,2) }}
VAT (15%) R {{ number_format($grandVat,2) }}
Total incl. VAT R {{ number_format($grandTotal,2) }}
Payment
Payment is due on collection of your vehicle. If you have approved items via the online portal, your Yoco payment link is available at your job card page.
Performance SA · workshop.performancesa.co.za
VAT Reg No: supplied on request
INV-{{ str_pad($jobCard->id, 5, '0', STR_PAD_LEFT) }} · {{ now()->format('d M Y') }}