@extends('layouts.admin.app') @section('title', translate('messages.Camapign_Order_Report')) @push('css_or_js') @endpush @section('content')

{{ translate('Search Data') }}

@if (isset($filter) && $filter == 'custom')
@endif

{{ translate('messages.Total Orders') }} {{ $orders->total() }}

@foreach ($orders as $key => $order) @endforeach
{{ translate('messages.sl') }} {{ translate('messages.order_id') }} {{ translate('messages.restaurant') }} {{ translate('messages.customer_name') }} {{ translate('messages.total_item_amount') }} {{ translate('messages.item_discount') }} {{ translate('messages.coupon_discount') }} {{ translate('messages.discounted_amount') }} {{ translate('messages.tax') }} {{ translate('messages.delivery_charge') }} {{ translate('messages.order_amount') }} {{ translate('messages.amount_received_by') }} {{ translate('messages.payment_method') }} {{ translate('messages.order_status') }} {{ translate('messages.action') }}
{{ $key + $orders->firstItem() }} {{ $order['id'] }} @if($order->restaurant) {{Str::limit($order->restaurant->name,25,'...')}} @else @if ($order->customer) {{ $order->customer['f_name'] . ' ' . $order->customer['l_name'] }} @else @endif
{{ \App\CentralLogics\Helpers::number_format_short($order['order_amount']-$order['dm_tips']-$order['total_tax_amount']-$order['delivery_charge']+$order['coupon_discount_amount'] + $order['restaurant_discount_amount']) }}
@if ($order->payment_status == 'paid') {{ translate('messages.paid') }} @else {{ translate('messages.unpaid') }} @endif
{{ \App\CentralLogics\Helpers::number_format_short($order->details->sum('discount_on_food')) }} {{ \App\CentralLogics\Helpers::number_format_short($order['coupon_discount_amount']) }} {{ \App\CentralLogics\Helpers::number_format_short($order['coupon_discount_amount'] + $order['restaurant_discount_amount']) }} {{ \App\CentralLogics\Helpers::number_format_short($order['total_tax_amount']) }} {{ \App\CentralLogics\Helpers::number_format_short($order['delivery_charge']) }}
{{ \App\CentralLogics\Helpers::number_format_short($order['order_amount']) }}
@if ($order->payment_status == 'paid') {{ translate('messages.paid') }} @else {{ translate('messages.unpaid') }} @endif
{{isset($order->transaction) ? $order->transaction->received_by : translate('messages.not_received_yet')}} {{ translate(str_replace('_', ' ', $order['payment_method'])) }} @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')}} @elseif($order['order_status']=='failed') {{translate('messages.payment')}} {{translate('messages.failed')}} @elseif($order['order_status']=='handover') {{translate('messages.handover')}} @elseif($order['order_status']=='canceled') {{translate('messages.canceled')}} @elseif($order['order_status']=='accepted') {{translate('messages.accepted')}} @else {{str_replace('_',' ',$order['order_status'])}} @endif
@if (count($orders) !== 0)
@endif
{!! $orders->links() !!}
@if (count($orders) === 0)
public
{{ translate('no_data_found') }}
@endif
@endsection @push('script_2') @endpush