{{ t('invoices') }}

{{ t('account-activity-and-past-invoices-management') }}

{{ $orders->total() }} {{ t('records-found') }}
@if($orders->count() > 0) {{-- Desktop/Tablet: table view --}}
@foreach($orders as $order) @php $status = $order->status; $statusLabel = $status === 'completed' ? 'Ödendi' : ucfirst($status); $statusClass = $status === 'completed' ? 'is-success' : 'is-neutral'; @endphp @endforeach
{{ t('invoice-number') }} {{ t('date') }} {{ t('amount') }} {{ t('status') }} {{ t('actions') }}
{{ $order->invoice_number ?? 'Sipariş #' . $order->id }}
{{ $order->created_at->format('d.m.Y H:i') }}
@if ($order->discount_amount && (float) $order->discount_amount > 0)
{{ number_format($order->total, 2, ',', '.') }} {{ t('currency') }}
Satış: {{ number_format((float) ($order->subtotal ?? $order->total + $order->discount_amount), 2, ',', '.') }} {{ t('currency') }} · İndirim: -{{ number_format((float) $order->discount_amount, 2, ',', '.') }} {{ t('currency') }} @if ($order->coupon_code || $order->coupon_name) ({{ $order->coupon_name ?: $order->coupon_code }}) @endif @else
{{ number_format($order->total, 2, ',', '.') }} {{ t('currency') }}
@endif
{{ $statusLabel }} {{ t('download-pdf') }}
{{-- Mobile: stacked card list (Bootstrap) --}}
@foreach($orders as $order) @php $status = $order->status; $statusLabel = $status === 'completed' ? 'Ödendi' : ucfirst($status); $statusClass = $status === 'completed' ? 'is-success' : 'is-neutral'; $invoiceNo = $order->invoice_number ?? 'Sipariş #' . $order->id; @endphp
{{ $invoiceNo }}
{{ $order->created_at->format('d.m.Y H:i') }}
{{ $statusLabel }}
@if ($order->discount_amount && (float) $order->discount_amount > 0)
{{ number_format($order->total, 2, ',', '.') }} {{ t('currency') }}
Satış: {{ number_format((float) ($order->subtotal ?? $order->total + $order->discount_amount), 2, ',', '.') }} {{ t('currency') }}
İndirim: -{{ number_format((float) $order->discount_amount, 2, ',', '.') }} {{ t('currency') }} @if ($order->coupon_code || $order->coupon_name) ({{ $order->coupon_name ?: $order->coupon_code }}) @endif
@else
{{ number_format($order->total, 2, ',', '.') }} {{ t('currency') }}
@endif
@endforeach
{{ t('total') }} {{ $orders->total() }} {{ t('record') }} {{ $orders->firstItem() }} - {{ $orders->lastItem() }} {{ t('between') }}
{{ $orders->appends(array_merge(request()->except('page'), ['tab' => 'invoices']))->links('pagination::bootstrap-5') }}
@else

{{ t('no-invoices') }}

@endif