@extends('admin.layouts.master') @section('title', 'Order') @section('content')
Filter
@include('admin.includes.msg')
@if(Auth::user()->user_type==1) @endif @if($order->count()) @foreach($order as $key=>$val) @php $whatsapp = $whatsappNotifications[$val->id] ?? null; $whatsappStatus = strtolower($whatsapp->deliver_status ?? 'not_sent'); $whatsappDelivered = in_array($whatsappStatus, ['delivered', 'read']); @endphp @if(Auth::user()->user_type==1) @endif @endforeach @endif
Sl.No Order Id Price CustomerDeliveryboyStatus WhatsApp Action
{{ $order->firstItem() + $key }} {{ $val->orderId}}
{{ \Carbon\Carbon::parse($val->created_at)->format('h:i A, d M y') }}
Rs {{ $val->totalPrice}} @if($val->commission>0)
Paid Amount : {{$val->totalPrice-$val->commission}} @endif
{{ $val->firstName }}
{{ $val->mobile }}
@php $returnitem = ''; if((@$logorderIds[$val->id]>0) || ($val->is_return>0)){ $returnitem = 'disabled'; } @endphp
@csrf
@if($val->is_pos==1) COUNTER @endif @if($val->orderStatus=="Cancel" || $val->orderStatus=="Deleted") Cancelled @elseif($val->orderStatus=="Delivered") {{ $val->orderStatus}} @if($val->is_pos==1)
@php echo date("h:i A, d M ", strtotime($val->created_at));@endphp @else
@php echo date("h:i A, d M ", strtotime($val->delivered_date));@endphp @endif
@if(@$logorderIds[$val->id]>0) Partially Returned@endif @else {{ $val->orderStatus}} @endif
@if($whatsappDelivered) Delivered @elseif($whatsappStatus === 'sent') Sent @elseif($whatsappStatus === 'failed') Failed @else Not sent @endif @if($whatsapp && ! $whatsappDelivered)
Update mobile @endif
Showing {{ $order->firstItem() }} to {{ $order->lastItem() }} of {{ $order->total() }} entries
{{ $order->appends(Request::except('page'))->links('pagination::bootstrap-4') }}
@endsection