@php use Carbon\Carbon; $setting = $setting ?? \App\Models\InvoiceSetting::get(); $subtotal = (float) $appointment->price; $total = round($subtotal); // No GST for appointments $aptDate = Carbon::parse($appointment->date)->format('F d, Y'); $aptTime = Carbon::parse($appointment->time)->format('h:i A'); $issueDate = ($appointment->paid_at ?? $appointment->created_at)->format('F d, Y'); $itemsLabel = $appointment->serviceNamesLabel(); @endphp {{-- ── LOGO + INVOICE TITLE ── --}}
@if(!empty($setting->logo_path) && file_exists(public_path('storage/'.$setting->logo_path))) {{ $setting->business_name }} @else {{ $setting->business_name }} @endif

Invoice

{{-- ── FROM ── --}}
From:
{{ $setting->business_name }}
@if($setting->website) Website: {{ $setting->website }}
@endif @if($setting->email) Email: {{ $setting->email }}
@endif @if($setting->gst_registered && $setting->gst_number) GST No: {{ $setting->gst_number }}
@endif @if($setting->pst_registered && $setting->pst_number) PST No: {{ $setting->pst_number }}
@endif @if($setting->hst_registered && $setting->hst_number) HST No: {{ $setting->hst_number }}
@endif @if($setting->phone) Phone: {{ $setting->phone }}
@endif
{{-- ── INFO TABLE ── --}} @if($appointment->email) @endif
Invoice Date: {{ $issueDate }}
Bill To: {{ $appointment->name }}
Email: {{ $appointment->email }}
{{-- ── ITEMS TABLE ── --}}
# Item & Description Price Tax Amount
1 Appointment Booking Fee
Booking ID: {{ $appointment->appointment_id }}
Service Date: {{ $aptDate }} at {{ $aptTime }} @if($itemsLabel)
Item(s): {{ $itemsLabel }} @endif @foreach($appointment->displayFormEntries() as $field)
{{ $field['label'] }}: {{ $field['value'] }} @endforeach
${{ number_format($subtotal, 2) }} ${{ number_format($total, 2) }}
{{-- ── SUMMARY ── --}}
Subtotal ${{ number_format($subtotal, 2) }}
Total ${{ number_format($total, 2) }}
{{-- ── PAYMENT INFO ── --}}
Payment Information:
@if($setting->terms_conditions) @php $termsRaw = $setting->terms_conditions; $termsOut = (strip_tags($termsRaw) === $termsRaw) ? nl2br(e($termsRaw)) : $termsRaw; @endphp
{!! $termsOut !!}
@else
Payment can be done via e-transfer at: {{ $setting->email }}
@endif
Thank you for choosing {{ $setting->business_name }}!