{{ __('invoices_admin.title') }}

{{ __('invoices_admin.subtitle') }}

{{-- The one thing that can be created here. The list itself stays read-only: an issued invoice is corrected by a cancellation and a new document, never by an edit button. --}} {{ __('invoices_admin.new') }}
@if (session('status')) {{ session('status') }} @endif
@if ($invoices->isEmpty())

{{ __('invoices_admin.empty') }}

@else @foreach ($invoices as $invoice) @endforeach
{{ __('invoices_admin.col_number') }} {{ __('invoices_admin.col_customer') }} {{ __('invoices_admin.col_date') }} {{ __('invoices_admin.col_net') }} {{ __('invoices_admin.col_gross') }} {{ __('invoices_admin.col_actions') }}
{{ $invoice->number }} {{ $invoice->customer?->name ?? '—' }} {{ $invoice->issued_on?->local()->format('d.m.Y') }} {{ \App\Services\Billing\InvoiceMath::money($invoice->net_cents) }} {{ \App\Services\Billing\InvoiceMath::money($invoice->gross_cents) }} {{ $invoice->currency }} {{-- A link, not a Livewire action: a PDF is a file download, and routing one through a component round-trip only adds a way for it to fail. --}} {{ __('invoices_admin.download') }}
{{ $invoices->links() }}
@endif