{{-- Header --}}
{{ $this->stats['ready'] }} Shipped & Approved {{ $this->stats['sent_to_zoho'] }} Sent to Zoho {{ $this->stats['complete'] }} Complete {{ number_format($this->stats['total_value'], 0) }} Pending Value
@if($this->isZohoConnected) Zoho Connected @endif
@if($search) @endif
{{-- Zoho Connection Toast (Floating) --}} @if(!$this->isZohoConnected)
Connect to Zoho Books Required to create invoices automatically
@endif {{-- Filters --}} {{-- Status Dropdown --}}
@foreach($this->statusOptions as $key => $opt) @endforeach
{{-- Customer Dropdown --}}
@foreach($this->customers as $c) @endforeach
{{-- Content --}}
{{-- Loading overlay --}}
Loading...
@if($this->invoiceGroups->isEmpty())

No invoices to process

Shipped & approved invoices will appear here for Zoho processing

View All Invoices
@else
@foreach($this->invoiceGroups as $invoice) @php $isExpanded = in_array($invoice->id, $expanded); $statusOpt = $this->statusOptions[$invoice->status] ?? null; @endphp
{{-- Invoice Header --}}
#{{ $invoice->id }} {{ $invoice->reference ?? 'No Reference' }} {{ $invoice->customer?->name }}
@if($invoice->invoice_date) {{ $invoice->invoice_date->format('d M Y') }} @endif {{ $invoice->drops_count }} drops {{ $invoice->customer?->currency ?? '$' }}{{ number_format($invoice->total_value ?? 0, 2) }}
@if($statusOpt) {{ $statusOpt['label'] }} @endif
@if($invoice->status === 'ready') @elseif($invoice->status === 'sent_to_zoho')
@elseif($invoice->status === 'complete') @if($invoice->zoho_invoice_id) Zoho: {{ $invoice->zoho_invoice_id }} @endif @endif
{{-- Expanded Drops Section --}} @if($isExpanded)
@forelse($invoice->drops as $drop) @php $line = $drop->line; $order = $line?->order; @endphp @empty @endforelse @if($invoice->drops->count() > 0) @endif
Order PO Style Colour Ship Date Qty Value
{{ $order?->customer_po ?? 'N/A' }} {{ $line?->getStyleRef() ?? $line?->imported_style_ref ?? 'N/A' }} {{ $line?->getColourName() ?? 'N/A' }} @if($drop->shipped_date) {{ $drop->shipped_date->format('d M Y') }} @else @endif {{ number_format($drop->total_shipped_qty ?: $drop->total_qty) }} {{ $invoice->customer?->currency ?? '$' }}{{ number_format($drop->total_value ?? 0, 2) }}
No drops attached to this invoice
Totals: {{ number_format($invoice->total_qty ?? 0) }} {{ $invoice->customer?->currency ?? '$' }}{{ number_format($invoice->total_value ?? 0, 2) }}
{{-- Additional Info --}} @if($invoice->notes || $invoice->supplier_invoice_ref)
@if($invoice->supplier_invoice_ref)
{{ $invoice->supplier_invoice_ref }}
@endif @if($invoice->notes)
{{ $invoice->notes }}
@endif @if($invoice->sent_to_zoho_at)
{{ $invoice->sent_to_zoho_at->format('d M Y H:i') }}
@endif
@endif
@endif
@endforeach
{{-- Pagination --}} @if($this->invoiceGroups->hasPages())
{{ $this->invoiceGroups->links() }}
@endif @endif