@extends('layouts.dashboard') @section('content')

Invoice {{ $invoice->invoice_number }}

Invoice Details

Invoice Number: {{ $invoice->invoice_number }}
Date: {{ $invoice->invoice_date->format('M d, Y') }}
Due Date: {{ $invoice->due_date ? $invoice->due_date->format('M d, Y') : 'N/A' }}
Status: @php $statusColors = [ 'draft' => 'bg-gray-100 text-gray-800', 'sent' => 'bg-blue-100 text-blue-800', 'paid' => 'bg-green-100 text-green-800', 'overdue' => 'bg-red-100 text-red-800', 'cancelled' => 'bg-red-100 text-red-800' ]; @endphp {{ ucfirst($invoice->status) }}
@if($invoice->paid_at)
Paid Date: {{ $invoice->paid_at->format('M d, Y') }}
@endif

Customer Information

{{ $invoice->customer_name }}
{{ $invoice->customer_email }}
@if($invoice->billing_company)
{{ $invoice->billing_company }}
@endif @if($invoice->billing_address)
{{ $invoice->billing_address }}
@endif
@if($invoice->order)

Related Order

Status: {{ ucfirst($invoice->order->status) }}
Order Date: {{ $invoice->order->created_at->format('M d, Y') }}
@endif

Items

@php $lineItems = $invoice->line_items ?? []; @endphp @forelse($lineItems as $item) @empty @endforelse
Description Quantity Price Total
{{ $item['description'] ?? 'N/A' }} {{ $item['quantity'] ?? 0 }} ${{ number_format($item['price'] ?? 0, 2) }} ${{ number_format(($item['quantity'] ?? 0) * ($item['price'] ?? 0), 2) }}
No items found
Subtotal: ${{ number_format($invoice->subtotal, 2) }}
Tax: ${{ number_format($invoice->tax_amount, 2) }}
Total: ${{ number_format($invoice->total_amount, 2) }}
@if($invoice->notes)

Notes

{{ $invoice->notes }}

@endif
@endsection