@php
$headerLogoPath = \App\Models\Setting::get('header_logo_path');
$defaultLogoPath = public_path('images/sob-offer-logo.png');
$logoCandidates = [];
if ($headerLogoPath) {
$normalizedHeaderLogoPath = ltrim($headerLogoPath, '/');
$normalizedHeaderLogoPath = preg_replace('/^storage\//', '', $normalizedHeaderLogoPath);
$logoCandidates[] = storage_path('app/public/' . $normalizedHeaderLogoPath);
$logoCandidates[] = public_path('storage/' . $normalizedHeaderLogoPath);
$logoCandidates[] = public_path($normalizedHeaderLogoPath);
}
$logoCandidates[] = $defaultLogoPath;
$logoPath = collect($logoCandidates)->first(fn($p) => is_string($p) && file_exists($p)) ?? $defaultLogoPath;
@endphp
{{ config('app.name') }}
{{ config('app.address', 'Address not set') }}
{{ config('app.phone', 'Phone not set') }}
{{ config('app.email', 'Email not set') }}
{{ config('app.address', 'Address not set') }}
{{ config('app.phone', 'Phone not set') }}
{{ config('app.email', 'Email not set') }}
INVOICE
Invoice #: {{ $order->order_number }}
Date: {{ $order->created_at->format('d M Y') }}
Status: {{ ucfirst($order->status) }}
Bill To:
{{ $order->customer_name }}
{{ $order->address }}
{{ $order->city }}, {{ $order->postal_code }}, {{ $order->country }}
Email: {{ $order->customer_email }}
Phone: {{ $order->customer_phone }}
Billing Details:
Order Date: {{ $order->created_at->format('d M Y') }}
Payment Method: {{ strtoupper($order->payment_method) }}
Order Status: {{ ucfirst($order->status) }}
| Product | Serial Numbers | Qty | Unit Price | Total |
|---|---|---|---|---|
|
{{ $product?->name ?? 'Product unavailable' }}
@if ($product?->warranty)
Warranty: {{ str_replace('_',' ',ucfirst($product->warranty)) }} @endif |
{{ $serialList ?: 'N/A' }} | {{ $item->quantity }} |
| Subtotal | |
| Tax ({{ tax_rate() }}%) | |
| Total |