@extends('admin.layouts.master') @section('title', ($saleInvoice->sale_number ?? 'Invoice') . ' | Vogue Technics') @php $invoiceLabel = $saleInvoice->invoice_type === 'proforma' ? 'PROFORMA INVOICE' : 'SALE INVOICE'; $quoteReference = $quote?->quote_number ?: ($quote?->quoteJob?->job_number ?? 'N/A'); $vehicleMake = $quote?->vehicle?->make ?: ''; $vehicleModel = $quote?->vehicle?->model ?: ''; $vehicleVin = $quote?->vehicle?->vin ?: 'N/A'; $vehicleMileage = $saleInvoice->mileage ?: ($quote?->mileage ?: 'N/A'); $websiteUrl = rtrim( preg_replace('#^https?://#', '', $saleInvoice->website?->url ?: ($quote?->website?->url ?: 'www.voguetechnics.co.uk')), '/' ); $websiteLogo = $saleInvoice->website?->logo ?: ($quote?->website?->logo ?: 'assets/logo.png'); $websiteAddress = $saleInvoice->website?->address ?: ($quote?->website?->address ?: 'Unit 1 Hedley Avenue, RM9 4EU, United Kingdom'); $websiteLandline = $saleInvoice->website?->landline ?: ($quote?->website?->landline ?: '01753675355'); $websitePhone = $saleInvoice->website?->phone ?: ($quote?->website?->phone ?: '07411095629'); $websiteEmail = $saleInvoice->website?->email ?: ($quote?->website?->email ?: 'info@voguetechnics.co.uk'); @endphp @section('styles') @endsection @section('content')

{{ ucfirst($saleInvoice->invoice_type) }} Invoice

Back to Listing @if ($saleInvoice->status !== 'paid') @can('edit-sale-invoice') Edit Invoice @endcan @endif
Invoice Background
Brand Logos
Vogue Technics
{{ $websiteUrl }}
Engine Repair & Replacement Specialists.
Range Rover, Jaguar, BMW & Other Prestige Makes
Created Date: {{ $saleInvoice->created_at?->format('d M Y') ?? optional($saleInvoice->date)->format('d M Y') }}
Address: {{ $websiteAddress }}
Landline No: {{ $websiteLandline }}
Mobile: {{ $websitePhone }}
Email: {{ $websiteEmail }}
{{ $invoiceLabel }}
Name & Address

{{ $saleInvoice->name }}

@if ($saleInvoice->address)

{!! nl2br(e($saleInvoice->address)) !!}

@endif @if ($saleInvoice->city)

{{ $saleInvoice->city }}

@endif @if ($saleInvoice->phone)

{{ $saleInvoice->phone }}

@endif
Invoice Info

Invoice No: {{ $saleInvoice->sale_number }}

Date: {{ optional($saleInvoice->date)->format('d-M-y') }}

Order No: {{ $quoteReference }}

Make / Model Engine Code Mileage VRM VIN Served By
{{ trim($saleInvoice->make_model ?: trim($vehicleMake . ' ' . $vehicleModel)) ?: 'N/A' }} {{ $saleInvoice->engine_code ?: 'N/A' }} {{ $vehicleMileage }} {{ $saleInvoice->vrm ?: 'N/A' }} {{ $vehicleVin }} {{ $saleInvoice->served_by ?: 'N/A' }}
@forelse ($saleInvoice->details as $index => $detail) @empty @endforelse
Sr Parts Description Qty Unit Price Net Total
{{ $index + 1 }} {{ $detail->description ?: ($detail->part?->name ?: 'N/A') }} {{ rtrim(rtrim(number_format((float) $detail->qty, 2, '.', ''), '0'), '.') }} {{ number_format((float) $detail->amount, 2) }} {{ number_format((float) $detail->total_amount, 2) }}
No service rows added.
Sub Total {{ number_format((float) $saleInvoice->sub_total, 2) }}
Initial Deposit {{ number_format((float) $saleInvoice->initial_deposit, 2) }}
Discount {{ number_format((float) $saleInvoice->discount, 2) }}
VAT {{ number_format((float) $saleInvoice->vat, 2) }}
Net {{ number_format((float) $saleInvoice->total, 2) }}
Bank Details:
Name: {{ $saleInvoice->bank?->name ?: 'N/A' }}
Account Number: {{ $saleInvoice->bank?->account_number ?: 'N/A' }}
Sort Code: {{ $saleInvoice->bank?->sort_code ?: 'N/A' }}
Account Title: {{ $saleInvoice->bank?->account_title ?: 'N/A' }}
Branch: {{ $saleInvoice->bank?->branch_name ?: 'N/A' }}
Vat {{ number_format((float) $saleInvoice->vat, 2) }}
Total {{ number_format((float) $saleInvoice->total, 2) }}
Note: {{ $saleInvoice->notes ?: 'Engine oil and coolant level needs to be checked regularly. This repair covers the recorded fault only.' }}
@if (($selectedTermsAndConditions ?? collect())->isNotEmpty())
Terms & Conditions:
@foreach ($selectedTermsAndConditions as $term)
{!! $term['content'] ?? '' !!}
@endforeach
@endif
SIGNATURE
{{-- --}}
@endsection @section('scripts') @if ($isPrintMode ?? false) @endif @endsection