@extends('layouts.agent.app') @section('content')
@csrf
From Date To Date Select the Status
Generate Report
@if($agent_assigned->isEmpty()) No Data Found @else
AGENT PANEL
{{$user->name}}

{{----}} @php $i = 0; @endphp @foreach($agent_assigned as $agent_assigneds) @php $i++; @endphp {{----}} {{----}} {{----}} {{----}} @endforeach
Sr No Assign Order IdOrder IdProducts Delivery Date Status Action
{{$i}} {{$agent_assigneds->agent_order_id}} @php $orderId = null; $processedOrders = []; @endphp @foreach($orders1 as $order) @if($agent_assigneds->OID == $order->id && $agent_assigneds->agent_id == $order->agent_id) @php $duplicate_string = $order->unique_order_id; @endphp @if(!in_array($duplicate_string, $processedOrders)) {{$order->unique_order_id}} @php $orderId = $order->id; $processedOrders[] = $duplicate_string; break; @endphp @endif @endif @endforeach @php $printedProducts = []; @endphp @foreach($product_maped as $key) @foreach($key as $product_mapeds) @if($product_mapeds->agent_assinged_id == $agent_assigneds->id) @foreach($agent_product_list as $product) @if($product->id == $product_mapeds->product_id && !in_array($product->id, $printedProducts)) {{ $product->item }}
@php $printedProducts[] = $product->id; @endphp @endif @endforeach @endif @endforeach @endforeach
@php $agentProductDtl = App\Http\Helper1::getAgentPlaceProductDtl($agent_assigneds->id); @endphp @foreach($agentProductDtl as $product) {{ucwords($product->item)}}({{$product->qty}}) @if(!$loop->last), @endif @endforeach @php $founddetails = false; @endphp @foreach($order_details as $order_detail) @if($order_detail->order_id == $agent_assigneds->OID) {{$order_detail->delivery_date}} @php $founddetails = true; break; @endphp @endif @endforeach {{ date("d/m/Y" , strtotime($agent_assigneds->delivery_date)) }} @if($agent_assigneds->status=='P') @elseif($agent_assigneds->status=='PC') @elseif($agent_assigneds->status=='CL') @elseif($agent_assigneds->status=='H') @elseif($agent_assigneds->status=='D') @elseif($agent_assigneds->status=='S') @endif @if($agent_assigneds->status=='P')
PENDING
@elseif($agent_assigneds->status=='PC')
PROCESSED
@elseif($agent_assigneds->status=='CL')
CANCEL
@elseif($agent_assigneds->status=='H')
HOLD
@elseif($agent_assigneds->status=='D')
DELIVERED
@elseif($agent_assigneds->status=='S')
SHIPPED
@endif
@if($agent_assigneds->status == "PC" ||$agent_assigneds->status == "CL" ||$agent_assigneds->status == "D" ||$agent_assigneds->status == "S") @else @endif
@endif
{{--Back--}}
@endsection