@php use App\Enums\Payments\OrderType; use App\Enums\InvoiceStatus; @endphp @forelse($invoices as $invoice)
{{ $loop->iteration }} @isset($invoice->order) @else
{{ $invoice->compact_invoice_number }} {{ $invoice->year_month_display }}
@endisset {{ ucfirst($invoice->order?->order_type ?? 'N/A') }} @if($invoice->order?->customer)
{{ mb_substr($invoice->order->customer?->name ?? 'N', 0, 1) }}
{{ $invoice->order->customer?->name ?? 'No customer' }}
@else
N/A
@endif @if($invoice->order?->delivery) @if($invoice->order->delivery->is_in_store_pickup)
In-Store Pickup
@elseif($invoice->order->delivery->name)
{{ mb_substr($invoice->order->delivery->name, 0, 1) }}
{{ $invoice->order->delivery->name }}
@else
N/A
@endif @else
N/A
@endif {{ $invoice->order?->formatted_order_date }} {{ $invoice->order?->formatted_delivery_date }} @empty No invoice logged. @endforelse @push('scripts') @endpush