@extends('seller.layouts.app') @section('panel_content')
{{ translate('Orders') }}
@if (count($orders) > 0)
@foreach ($orders as $key => $order_id) @php $order = \App\Models\Order::find($order_id->id); @endphp @if($order != null) @endif @endforeach
# {{ translate('Order Code')}} {{ translate('Num. of Products')}} {{ translate('Customer')}} {{ translate('Amount')}} {{ translate('Profit')}} {{ translate('Pick Up Status') }} {{ translate('Delivery Status')}} {{ translate('Payment Status')}} {{ translate('Options')}}
{{ $key+1 }} {{ $order->code }} {{ count($order->orderDetails->where('seller_id', Auth::user()->id)) }} @if ($order->user_id != null) {{ optional($order->user)->name }} @else {{ translate('Guest') }} ({{ $order->guest_id }}) @endif {{ single_price($order->grand_total) }} @if ($order->product_storehouse_total > 0) {{ single_price($order->grand_total - $order->product_storehouse_total) }} @else {{ translate('None') }} @endif @if ($order->product_storehouse_status) {{translate('Picked Up')}} @else @if ($order->product_storehouse_total) {{translate('Unpicked Up')}} @endif @endif @php $status = $order->delivery_status; @endphp {{ translate(ucfirst(str_replace('_', ' ', $status))) }} @if ($order->payment_status == 'paid') {{ translate('Paid')}} @else {{ translate('Unpaid')}} @endif
{{ $orders->links() }}
@endif
@endsection @section('script') @endsection