@extends('layouts.vendor.app') @section('title',translate('messages.Order List')) @push('css_or_js') @endpush @section('content')
| {{ translate('messages.sl') }} | {{translate('messages.Order ID')}} | {{translate('messages.order')}} {{translate('messages.date')}} | {{translate('messages.customer_information')}} | {{translate('messages.total')}} {{translate('messages.amount')}} | {{translate('messages.order')}} {{translate('messages.status')}} | {{translate('messages.actions')}} | 
|---|---|---|---|---|---|---|
| {{$key+$orders->firstItem()}} | {{$order['id']}} | {{date('d M Y',strtotime($order['created_at']))}} {{date(config('timeformat'),strtotime($order['created_at']))}} | @if($order->customer) {{$order->customer['f_name'].' '.$order->customer['l_name']}} {{$order->customer['phone']}} @else @endif | 
                                 
                                        {{\App\CentralLogics\Helpers::format_currency($order['order_amount'])}}
                                     
                                    @if($order->payment_status=='paid')
                                    
                                        {{translate('messages.paid')}}
                                    
                                    @else
                                        
                                            {{translate('messages.unpaid')}}
                                        
                                    @endif
                                 | 
                            
                                @if (isset($order->subscription)  && $order->subscription->status != 'canceled' )
                                    @php
                                        $order->order_status = $order->subscription_log ? $order->subscription_log->order_status : $order->order_status;
                                    @endphp
                                @endif
                                    @if($order['order_status']=='pending')
                                        
                                            {{translate('messages.pending')}}
                                        
                                    @elseif($order['order_status']=='confirmed')
                                        
                                        {{translate('messages.confirmed')}}
                                        
                                    @elseif($order['order_status']=='processing')
                                        
                                        {{translate('messages.processing')}}
                                        
                                    @elseif($order['order_status']=='picked_up')
                                        
                                        {{translate('messages.out_for_delivery')}}
                                        
                                    @elseif($order['order_status']=='delivered')
                                        
                                        {{translate('messages.delivered')}}
                                        
                                    @else
                                        
                                            {{translate(str_replace('_',' ',$order['order_status']))}}
                                        
                                    @endif
                                 
                                    @if($order['order_type']=='take_away')
                                        
                                            {{translate('messages.take_away')}}
                                        
                                        @else
                                        
                                            {{translate('messages.delivery')}}
                                        
                                    @endif
                                 
                             |