@extends('layouts.admin', [ 'title' => 'Invoice Details', 'pageTitle' => 'Invoice Details', 'active' => 'invoices', ]) @php $statusVariants = [ 'draft' => 'muted', 'unpaid' => 'warning', 'partial' => 'purple', 'paid' => 'success', 'overdue' => 'danger', 'cancelled' => 'muted', ]; $paymentVariants = [ 'pending' => 'warning', 'paid' => 'success', 'failed' => 'danger', 'refunded' => 'purple', 'cancelled' => 'muted', ]; $money = fn ($amount, $currency = 'USD') => $currency.' '.number_format((float) $amount, 2); @endphp @section('content')
Back to Invoices
PDF Edit Record Payment
@include('admin.invoices.partials.pdf-preview', ['invoice' => $invoice])
Invoice{{ $invoice->invoice_number }}
Status{{ $invoice->status_label }}
Issue Date{{ $invoice->issue_date?->format('M d, Y') ?? '-' }}
Due Date{{ $invoice->due_date?->format('M d, Y') ?? '-' }}
Balance Due{{ $money($invoice->balance_due, $invoice->currency) }}
{{ $invoice->customer?->initials ?? 'CU' }}

{{ $invoice->customer?->name ?? 'Walk-in customer' }}

{{ $invoice->customer?->email ?? 'No email saved' }}

{{ $invoice->customer?->phone ?? 'No phone saved' }}
@if ($invoice->payments->isEmpty())
@else
@foreach ($invoice->payments as $payment)

{{ $payment->method_label }} Payment

{{ $payment->paid_at?->format('M d, Y') ?? 'No date' }} - {{ $payment->transaction_id ?: 'Manual record' }}

@if ($payment->note)

{{ $payment->note }}

@endif

{{ $money($payment->amount, $payment->currency) }}

{{ $payment->status_label }}
@endforeach
@endif

Deleting an invoice removes it from active billing lists. Payment records remain soft-deleted with the invoice record for audit recovery later.

@csrf @method('DELETE') Delete Invoice
@push('modals') @include('admin.invoices.partials.payment-modal', ['invoice' => $invoice, 'paymentMethods' => $paymentMethods]) @endpush @endsection