{{-- Table body content for AJAX updates --}} @if ($orders->isEmpty()) @else @php $isPaginated = $orders instanceof \Illuminate\Pagination\LengthAwarePaginator; $startIndex = $isPaginated ? ($orders->currentPage() - 1) * $orders->perPage() : 0; @endphp @foreach ($orders as $loopIndex => $order) @php $serial = $startIndex + $loopIndex + 1; @endphp @endforeach @endif
# Order Code Date Items Total Pending Payment Payment Status Status
No Orders found
{{ $serial }} @if (Auth::user()->hasPermission('sales.orders.view')) {{ $order->code }} @else {{ $order->code }} @endif {{ $order->created_at->format('M d, Y') }} {{ $order->products->count() }} item(s) {{ format_price($order->sub_total) }} @if ($order->pending_payment > 0) {{ format_price($order->pending_payment) }} @else Paid @endif {!! BaseHelper::clean($order->payment->status->toHtml()) !!} {!! BaseHelper::clean($order->status->toHtml()) !!}
{{-- Pagination & Summary --}} {{--

@if ($orders instanceof \Illuminate\Pagination\LengthAwarePaginator) Showing {{ $orders->firstItem() }} to {{ $orders->lastItem() }} of {{ $orders->total() }} entries @else Showing {{ $orders->count() }} @if($orders->count() === 1) entry @else entries @endif @endif

@if ($orders instanceof \Illuminate\Pagination\LengthAwarePaginator) {!! $orders->appends(request()->query())->links() !!} @endif
--}}

@if ($orders instanceof \Illuminate\Pagination\LengthAwarePaginator) Showing {{ $orders->firstItem() }} to {{ $orders->lastItem() }} of {{ $orders->total() }} entries @else Showing {{ $orders->count() }} @if($orders->count() === 1) entry @else entries @endif @endif

@if ($orders instanceof \Illuminate\Pagination\LengthAwarePaginator) {!! $orders->appends(request()->query())->links() !!} @endif