{{-- Header --}} {{-- Filters Bar --}} {{-- Status Dropdown --}}
@foreach($this->statusOptions as $key => $opt) @endforeach
{{-- Customer Dropdown --}}
@foreach($this->customers as $c) @endforeach
{{-- Date Range --}}
@if($dateFrom || $dateTo) @endif
{{-- Show Sent Toggle --}}
{{-- Content --}}
{{-- Loading overlay --}}
Loading...
@if($this->invoices->isEmpty()) {{-- Empty State --}}

No invoices found

Try adjusting your search or filters

@if($this->activeFiltersCount > 0) @endif
@else {{-- Table --}}
@foreach($this->invoices as $invoice) @php $statusOpt = $this->statusOptions[$invoice->status] ?? null; @endphp {{-- ID --}} {{-- Reference --}} {{-- Customer --}} {{-- Date --}} {{-- Status Badge --}} {{-- Drops --}} {{-- Qty --}} {{-- Value --}} {{-- Actions --}} @endforeach
ID @if($sortBy === 'id') @else @endif Reference @if($sortBy === 'reference') @else @endif Customer Date @if($sortBy === 'invoice_date') @else @endif Status @if($sortBy === 'status') @else @endif Drops Qty Value Actions
#{{ $invoice->id }} {{ $invoice->reference ?? '—' }} @if($invoice->supplier_invoice_ref)
{{ $invoice->supplier_invoice_ref }}
@endif
{{ $invoice->customer?->name ?? '—' }} @if($invoice->invoice_date) {{ $invoice->invoice_date->format('d M Y') }} @else @endif @if($statusOpt) {{ $statusOpt['label'] }} @endif {{ $invoice->drops_count }} @if($invoice->status === 'draft' && $invoice->unshipped_drops_count > 0)
{{ $invoice->unshipped_drops_count }} unshipped
@endif
{{ number_format($invoice->total_qty ?? 0) }} {{ $invoice->customer?->currency ?? '$' }}{{ number_format($invoice->total_value ?? 0, 2) }}
{{-- View/Edit --}} {{-- Download File --}} @if($invoice->invoice_file_path) @endif {{-- Status-specific actions --}} @if($invoice->status === 'draft') @if($invoice->drops_count === 0) @elseif($invoice->unshipped_drops_count > 0) @else @endif @endif {{-- Sent indicator for completed invoices --}} @if(in_array($invoice->status, ['ready', 'sent_to_zoho', 'complete'])) @endif
{{-- Pagination --}} @if($this->invoices->hasPages())
{{ $this->invoices->links() }}
@endif @endif
{{-- Invoice Edit Panel --}} @livewire('commission.invoice-edit')