@extends('layouts.admin') @section('title', 'Invoice ' . $invoice->invoice_number) @section('page-title', 'Invoice Details') @section('breadcrumbs') Invoices chevron_right {{ $invoice->invoice_number }} @endsection @section('header-actions')
@if($invoice->status === 'paid' && $invoice->receipt) receipt View Receipt @elseif($invoice->status === 'paid' && !$invoice->receipt)
@csrf
@endif download Download PDF edit Edit {{-- Send Invoice functionality is available via the email modal in the view page --}}
@endsection @section('content')

{{ $invoice->invoice_number }}

Issue Date: {{ $invoice->issue_date->format('M d, Y') }} Due Date: {{ $invoice->due_date->format('M d, Y') }}
@php $statusColors = [ 'draft' => 'bg-gray-100 text-gray-800', 'sent' => 'bg-blue-100 text-blue-800', 'viewed' => 'bg-purple-100 text-purple-800', 'partial' => 'bg-yellow-100 text-yellow-800', 'paid' => 'bg-green-100 text-green-800', 'overdue' => 'bg-red-100 text-red-800', 'cancelled' => 'bg-gray-100 text-gray-800', ]; $color = $statusColors[$invoice->status] ?? 'bg-gray-100 text-gray-800'; @endphp {{ ucfirst($invoice->status) }}

Billed To

{{ $invoice->customer->name }}

@if($invoice->customer->email)

{{ $invoice->customer->email }}

@endif @if($invoice->customer->address)

{{ $invoice->customer->address }}

@endif

Payment Summary

Total Amount: {{ $invoice->currency }} {{ number_format($invoice->total, 2) }}
Paid Amount: {{ \App\Models\Currency::formatAmount($invoice->paid_amount, $invoice->currency) }}
Balance Due: {{ \App\Models\Currency::formatAmount($invoice->balance, $invoice->currency) }}

Invoice Items

@foreach($invoice->items as $item) @endforeach @if($invoice->tax_amount > 0) @endif @if($invoice->discount_amount > 0) @endif
Description Quantity Unit Price Tax Rate Amount
{{ $item->description }} {{ number_format($item->quantity, 2) }} {{ $invoice->currency }} {{ number_format($item->unit_price, 2) }} {{ number_format($item->tax_rate, 2) }}% {{ $invoice->currency }} {{ number_format($item->total, 2) }}
Subtotal: {{ $invoice->currency }} {{ number_format($invoice->subtotal, 2) }}
Tax: {{ \App\Models\Currency::formatAmount($invoice->tax_amount, $invoice->currency) }}
Discount: - {{ \App\Models\Currency::formatAmount($invoice->discount_amount, $invoice->currency) }}
Total: {{ $invoice->currency }} {{ number_format($invoice->total, 2) }}
@if($invoice->notes || $invoice->terms)
@if($invoice->notes)

Notes

{{ $invoice->notes }}

@endif @if($invoice->terms)

Terms & Conditions

{{ $invoice->terms }}

@endif
@endif @if($invoice->payments->count() > 0)

Payment History

@foreach($invoice->payments as $payment) @endforeach
Payment # Date Method Amount Status
{{ $payment->payment_number }} {{ $payment->payment_date->format('M d, Y') }} {{ ucfirst(str_replace('_', ' ', $payment->payment_method)) }} {{ \App\Models\Currency::formatAmount($payment->amount, $payment->currency) }} {{ ucfirst($payment->status) }}
@endif @if(auth()->user()->hasPermission('send_manual_reminders') || auth()->user()->hasRole(\App\Enums\RoleEnum::SUPER_ADMIN->value))

Billing reminders

Recent emails queued or sent for this invoice.

@forelse($invoice->reminderLogs as $log) @empty @endforelse
Type To Status Sent
{{ str_replace('_', ' ', $log->reminder_type) }} {{ $log->recipient_email }} {{ $log->status }} {{ $log->sent_at?->format('M j, Y g:i A') ?? '—' }}
No reminder log entries yet.
@push('scripts') @endpush @endif
@endsection