@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')
{{ $invoice->customer?->name ?? 'Walk-in customer' }}
{{ $invoice->customer?->email ?? 'No email saved' }}
{{ $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) }}
Deleting an invoice removes it from active billing lists. Payment records remain soft-deleted with the invoice record for audit recovery later.