@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 Id Order Id Products Date Status View
{{$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 $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 @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 == "PC" ||$agent_assigneds->status == "CL" ||$agent_assigneds->status == "D" ||$agent_assigneds->status == "S") @else @endif VIEW
@endif
{{--Back--}}
@endsection