Order Id : {{$order->unique_order_id}}
Purchase Date : {{$order->created_at}}
@if($order->order_delivery_status=='P')
Sr No | Product Name | Send to | Price | Quantity | Total |
---|---|---|---|---|---|
{{$i}} | {{$products->product_name}} | {{$order->delivery_address}} | {{$order_detail->total_price}} | {{$order_detail->qty}} | {{$order_detail->qty * $order_detail->unit_price}} |
Grand Total :{{$grandtotal}}
Assign Agent
@endif @if($disable == 0) @elseProcessed Order
@php $mailDisable = 0; $groupedData = []; foreach ($assinged as $assignedItem) { foreach ($assigned_agent_product_map as $assigned_agent_product_maps) { if ($assignedItem->id == $assigned_agent_product_maps->agent_assinged_id) { $agent = $agents->firstWhere('id', $assignedItem->agent_id); $productItem = $product->firstWhere('id', $assigned_agent_product_maps->product_id); $productMapedItem = $agent_product_list->firstWhere('id', $assigned_agent_product_maps->product_id); if ($productItem && $agent) { $agentId = $assignedItem->agent_id; if (!isset($groupedData[$agentId])) { $groupedData[$agentId] = [ 'products' => [], 'mapped_details' => [], 'OrderID' => $assignedItem->id, 'agent_order_id' => $assignedItem->agent_order_id, 'totalPrice' => $assignedItem->totalPrice, 'status' => $assignedItem->status, 'agent_name' => $agent->name, 'extra' => $assignedItem->extra, 'Deliver_charge' => $assignedItem->Deliver_charge, 'reason' => $assignedItem->reason, 'track_no' => $assignedItem->track_no, 'isConfirmCl' => $assignedItem->isConfirmCl ]; } $groupedData[$agentId]['products'][] = $productItem->product_name; $groupedData[$agentId]['mapped_details'][] = $productMapedItem->item; } } } } @endphpSr No | Order Id | Product Name (Mapped Details) | Assigned Agent Name | Delivery Price | Extra | Delivery Charge | Reason | Track No | Status | |
---|---|---|---|---|---|---|---|---|---|---|
{{ $i++ }} | {{ $data['agent_order_id'] }} |
{!! implode(' ', $data['mapped_details']) !!} |
{{ $data['agent_name'] }} | {{ $data['totalPrice'] }} | {{ $data['extra'] }} | {{ $data['Deliver_charge'] }} | {{ $data['reason'] }} | {{ $data['track_no'] }} |
@if($data['status'] == 'P')
PENDING
@elseif($data['status'] == 'PC')
@php $mailDisable++; @endphp
PROGRESS
@elseif($data['status'] == 'CL')
CANCEL
@elseif($data['status'] == 'H')
HOLD
@elseif($data['status'] == 'S')
@php $mailDisable++; @endphp
Shipped
@elseif($data['status'] == 'D')
@php $mailDisable++; @endphp
DELIVERED
@endif
|
@if($data['isConfirmCl'] == 0 && $data['status'] == "CL") @endif |
Customer Email
@php $count = 0; $buttonEnable = count($agentasGroupBy) + 1; $buttonCount = 1; @endphp @foreach($agentasGroupBy as $assign) @if($assign->status != 'P') @php $count++; $buttonCount++; @endphp @endif @endforeach@endif | @if($buttonCount == $buttonEnable) | @endif |
Paid To Agent : {{$total}}
@endif @if($order->order_delivery_status == 'PC') @endif @endif