{{-- ── Header ──────────────────────────────────────────────────────────── --}}
|
Performance SA
Workshop
|
Tax Invoice
INV-{{ str_pad($jobCard->id, 5, '0', STR_PAD_LEFT) }}
{{ now()->format('d F Y') }}
|
|
{{-- ── Customer + Vehicle ─────────────────────────────────────────────── --}}
|
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 }}
|
|
{{-- ── 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
{{-- Section heading --}}
|
{{ $section['name'] }}
|
{{ $statusLabel }}
|
{{-- Line items table --}}
| Description |
Type |
Supplier / Mechanic |
Qty / Hrs |
Cost excl. |
Markup |
Unit excl. |
Total incl. |
Status |
@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
|
{{ $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 }}
|
@endforeach
| Section subtotal excl. VAT |
R {{ number_format($section['subtotal_excl'],2) }} |
|
| VAT (15%) |
R {{ number_format($section['vat'],2) }} |
|
|
@endforeach
{{-- ── Grand Total ──────────────────────────────────────────────────── --}}
| Subtotal excl. VAT |
R {{ number_format($grandTotalExcl,2) }} |
| VAT (15%) |
R {{ number_format($grandVat,2) }} |
|
| Total incl. VAT |
R {{ number_format($grandTotal,2) }} |
|
|
{{-- ── Payment Notice ─────────────────────────────────────────────── --}}
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.
|
{{-- ── Footer ──────────────────────────────────────────────────────── --}}
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') }}
|
|
|