{{-- Subscription invoice (mPDF). Rendered by App\Services\SubscriptionInvoiceService. Print colours are fixed (no theme). --}} @php $money = fn($v) => $currency . number_format((float) $v, 2); $status = strtolower($payment->payment_status); $statusLabel = ['success' => 'PAID', 'pending' => 'DUE', 'failed' => 'FAILED'][$status] ?? strtoupper($status); $statusColor = ['success' => '#0f9f6e', 'pending' => '#c27803', 'failed' => '#d92d20'][$status] ?? '#475467'; $address = collect([$company->address ?? null, trim(($company->city ?? '') . ' ' . ($company->pincode ?? '')), $company->state ?? null, $company->country ?? null]) ->map(fn($v) => trim((string) $v))->filter()->implode(', '); $features = collect(preg_split('/\s*,\s*/', (string) ($subscription->included_features ?? '')))->filter(); $cycle = $package->billing_cycle ?? null; @endphp
|
{{ $seller['name'] }}
@if (!empty($seller['address'])){{ $seller['address'] }} @endif
{{ collect([$seller['email'] ?? null, $seller['website'] ?? null])->filter()->implode(' · ') }}
@if (!empty($seller['tax_id']))Tax ID: {{ $seller['tax_id'] }} @endif
|
INVOICE
|
|
Billed to
{{ $company->company_name ?? '—' }}
@if ($address){{ $address }} @endif
@if (!empty($company->email)){{ $company->email }} @endif
@if (!empty($company->phone)){{ $company->phone }} @endif
|
Payment status
{{ $statusLabel }}
|
| # | Description | Qty | Amount |
|---|---|---|---|
| 1 |
{{ $package->package_name ?? 'Subscription' }}{{ $cycle ? ' — ' . ucfirst(strtolower($cycle)) : '' }}
{{ $subscription->user_limit ? $subscription->user_limit . ' users' : '' }}{{ $subscription->user_limit && $subscription->support_level ? ' · ' : '' }}{{ $subscription->support_level ? $subscription->support_level . ' support' : '' }}
@if ($validUntil) · valid until {{ $validUntil->format('d M Y') }} @endif
@if ($features->isNotEmpty())
Includes: {{ $features->implode(', ') }}
@endif
|
1 | {{ $money($amount) }} |
|
| Method | {{ $payment->payment_method ?: '—' }} |
| Transaction ID | {{ $payment->transaction_id ?: '—' }} |
| Payment date | {{ $issuedOn->format('d M Y, h:i A') }} |
Thank you for choosing {{ $seller['name'] }}. This is a computer-generated invoice and does not need a signature. @if (!empty($seller['email'])) Questions about this invoice: {{ $seller['email'] }}. @endif