@php
$platform = $invoice['platform'] ?? [];
$platformName = $platform['name'] ?? config('app.name');
$platformLogo = $platform['logo_url'] ?? null;
@endphp
@if(!empty($platformLogo))
{{ $platformName }}INVOICE |
Invoice # {{ $invoice['number'] }} Date: {{ !empty($invoice['created_at']) ? \Illuminate\Support\Carbon::parse($invoice['created_at'])->toFormattedDateString() : '-' }} @php $status = strtolower((string) ($invoice['status'] ?? 'paid')); $badgeClass = in_array($status, ['paid', 'succeeded']) ? 'paid' : (in_array($status, ['open', 'pending']) ? 'pending' : 'failed'); @endphp {{ $invoice['status'] ?? 'paid' }} |
Bill To@php $account = $invoice['account'] ?? []; $companyName = $account['company_name'] ?? null; $contactName = $account['name'] ?? null; $billingEmail = $account['email'] ?? null; $address = $account['address'] ?? null; $city = $account['city'] ?? null; $country = $account['country'] ?? null; $postalCode = $account['postal_code'] ?? null; $taxId = $account['tax_id'] ?? null; @endphp @if(!empty($companyName)){{ $companyName }} @endif{{ $contactName ?? '-' }} {{ $billingEmail ?? '-' }} @if(!empty($address)){{ $address }} @endif @if(!empty($city) || !empty($country) || !empty($postalCode)){{ trim(($city ? $city . ', ' : '') . ($country ?? '') . ($postalCode ? ' ' . $postalCode : '')) }} @endif @if(!empty($taxId))Tax ID: {{ $taxId }} @endif |
Payment DetailsMethod: {{ $invoice['payment_method'] ?? '-' }} Status: {{ $invoice['status'] ?? '-' }} Transaction ID: {{ $invoice['id'] ?? '-' }} |
| Description | Qty | Unit Price | Total |
|---|---|---|---|
| {{ $invoice['plan'] ?? 'Subscription' }} | 1 | {{ $currency }} {{ number_format($amount / 100, 2) }} | {{ $currency }} {{ number_format($amount / 100, 2) }} |
| Subtotal | {{ $currency }} {{ number_format($amount / 100, 2) }} |
| Tax | {{ $currency }} 0.00 |
| Total | {{ $currency }} {{ number_format($amount / 100, 2) }} |