@php $statusColors = [ 'unpaid' => ['bg' => '#fffbeb', 'fg' => '#b45309'], 'partially_paid' => ['bg' => '#eff6ff', 'fg' => '#1d4ed8'], 'paid' => ['bg' => '#ecfdf5', 'fg' => '#047857'], 'overdue' => ['bg' => '#fef2f2', 'fg' => '#b91c1c'], 'cancelled' => ['bg' => '#f1f5f9', 'fg' => '#475569'], ]; $statusColor = $statusColors[$invoice->status] ?? $statusColors['cancelled']; $guardian = $invoice->student?->guardians->first(); @endphp Invoice {{ $invoice->invoice_number }} — {{ $tenant->name }}
@if($tenant->logo_path) @else
{{ \Illuminate\Support\Str::of($tenant->name)->substr(0, 1) }}
@endif
{{ $tenant->name }}
{{ $tenant->tagline }}

Invoice

{{ $invoice->invoice_number }}
{{ ucfirst(str_replace('_', ' ', $invoice->status)) }}
Billed To
{{ $invoice->student?->fullName() ?? 'Admission applicant' }} @if($invoice->student)({{ $invoice->student->student_code }})@endif
@if($guardian)
Guardian
{{ $guardian->fullName() }}
@endif
Issued
{{ $invoice->issued_at->setTimezone($tenant->timezone ?: 'UTC')->format('M j, Y') }}
Due Date
{{ $invoice->due_date->format('M j, Y') }}
@if($invoice->billing_period)
Billing Period
{{ $invoice->billing_period }}
@endif
@if($invoice->student)
Class
{{ $invoice->student->section?->schoolClass?->name ?? '—' }}
Section
{{ $invoice->student->section?->name ?? '—' }}
Roll
{{ $invoice->student->roll_number ?? '—' }}
Branch
{{ $invoice->student->branch?->name ?? '—' }}
Campus
{{ $invoice->student->branch?->campus?->name ?? '—' }}
@endif
Description Fee Type Amount
{{ $invoice->description }} {{ $invoice->feeType?->name ?? $invoice->feeStructure?->feeType?->name ?? 'Ad-hoc' }} {{ \App\Support\Money::format($invoice->amount_cents, $currency) }}
Subtotal{{ \App\Support\Money::format($invoice->amount_cents, $currency) }}
@if($invoice->discount_cents > 0)
Discount-{{ \App\Support\Money::format($invoice->discount_cents, $currency) }}
@endif
Paid So Far{{ \App\Support\Money::format($invoice->amountPaidCents(), $currency) }}
Amount Due{{ \App\Support\Money::format($invoice->amount_due_cents, $currency) }}
Payment History
@if($invoice->payments->isEmpty())

No payments recorded yet.

@else @foreach($invoice->payments as $payment) @endforeach
Gateway Reference Paid At Amount
{{ ucfirst($payment->gateway) }} {{ $payment->gateway_reference ?? '—' }} {{ $payment->paid_at?->setTimezone($tenant->timezone ?: 'UTC')->format('M j, Y g:i A') ?? '—' }} {{ \App\Support\Money::format($payment->amount_cents, $currency) }}
@endif
Back to Invoice