@extends('layouts.admin.app') @section('title', translate('Order_List')) @push('css_or_js') @endpush @section('content')
@if (Request::is('admin/refund/*'))
@endif @if ( isset($status) && $status != 'dine_in') @endif
@foreach ($orders as $key => $order) @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 @endforeach
{{ translate('sl') }} {{ translate('messages.Order_ID') }} {{ translate('messages.order_date') }} {{ translate('messages.customer_information') }} {{ translate('messages.restaurant') }} {{ translate('messages.total_amount') }} {{ translate('messages.order_status') }} {{ translate('messages.actions') }}
{{ $key + $orders->firstItem() }} {{ $order['id'] }} @if ($order->is_pos == 1) ({{ translate('POS') }}) @endif
@if ($order->edited == 1) ({{ translate('Edited') }}) @endif
{{ \App\CentralLogics\Helpers::date_format($order->created_at) }}
{{ \App\CentralLogics\Helpers::time_format($order->created_at) }}
@if ($order->is_guest) @php $customer_details = json_decode($order['delivery_address'], true); @endphp {{ $customer_details['contact_person_name'] }}
{{ $customer_details['contact_person_number'] }}
@elseif($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') }} @elseif($order->payment_status == 'partially_paid') {{ translate('messages.partially_paid') }} @else {{ translate('messages.unpaid') }} @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') {{$order?->order_type == 'dine_in' ? translate('messages.Completed') : translate('messages.delivered')}} @elseif($order['order_status'] == 'failed') {{ translate('messages.payment_failed') }} @else {{ translate(str_replace('_', ' ', $order['order_status'])) }} @endif
@if ($order['order_type'] == 'take_away') {{ translate('messages.take_away') }} @elseif ($order['order_type'] == 'dine_in') {{ translate('Dine_in') }} @else {{ translate('home_delivery') }} @endif
{{-- --}}
@if (count($orders) === 0)
public
{{ translate('no_data_found') }}
@endif
@endsection @push('script_2') @endpush