@extends('layouts.agent.app') @section('content')
@csrf
From Date To Date
@if($result == 1)

DELIVERY REPORT


@php $i = 0; $totalPrice = 0; @endphp @forelse($agent_assigned as $agent_assigneds) @php $i++; @endphp @php $totalPrice+=$agent_assigneds->totalPrice @endphp @empty @endforelse
Sr No Assign Order Id Products Delivery Date Status Price Action
{{$i}} {{$agent_assigneds->agent_order_id}} @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 }} (QTY : {{$product_mapeds->qty}})
@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')
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
{{$agent_assigneds->totalPrice}}
No Data Found
@endif
@endsection