@php /** @var \App\Domain\Saas\Models\SubscriptionInvoice $invoice */ @endphp

{{ __('Invoice') }} {{ $invoice->invoice_number }}

{{ __('Back to invoices') }}
@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif
{{ __('Tenant') }}
{{ $invoice->tenant->name }}
{{ __('Plan') }}
{{ $invoice->plan_name }}
{{ __('Period') }}
{{ $invoice->period_start->format('Y-m-d') }} → {{ $invoice->period_end->format('Y-m-d') }}
{{ __('Due Date') }}
{{ $invoice->due_date->format('Y-m-d') }}
{{ __('Amount') }}
{{ number_format($invoice->amount, 2) }}
{{ __('Outstanding') }}
{{ number_format($invoice->outstandingBalance(), 2) }}
{{ __('Status') }}
{{ $invoice->status->label() }}

{{ __('Payment History') }}

@forelse ($invoice->payments as $payment) @empty @endforelse
{{ __('Date') }} {{ __('Amount') }} {{ __('Method') }} {{ __('Reference') }} {{ __('Recorded By') }}
{{ $payment->paid_at->format('Y-m-d H:i') }} {{ number_format($payment->amount, 2) }} {{ $payment->method ?? '—' }} {{ $payment->reference ?? '—' }} {{ $payment->recordedBy?->name ?? '—' }}
{{ __('No payments recorded yet.') }}
@if (! $invoice->status->isSettled())

{{ __('Record Payment') }}

@csrf @method('PUT')
{{ __('Record Payment') }}
@endif