@extends('layouts.admin') @section('title' , 'Manage Orders') @section('styles') @endsection @section('breadcrumb-item') @endsection @section('styles') {{-- --}} @endsection @section('content')
Manage Orders
{{ csrf_field() }}
@include('includes.partials.error', ['field' => 'bookers'])
@include('includes.partials.error', ['field' => 'booking_date'])
@include('includes.partials.error', ['field' => 'areas'])
@include('includes.partials.error', ['field' => 'orders'])
@include('includes.partials.error', ['field' => 'delivery_date'])

Assigned Orders:

@if(sizeof($employee->assignedOrders) > 0) @endif {{----}} @forelse($employee->assignedOrders as $order) {{----}} @empty @endforelse

Employee Name: {{ $employee->name }}

Unlink All
Sr# Order ID Amount ShopBooked ByPlaced On Status Unlink
{{$loop->iteration}} {{$order->id ?? ''}} {{ _orderConditions($order) }} {{$order->shop->name ?? ''}}{{$order->employee->name}}{{$order->created_at->format('d-M-Y') ?? ''}} {{$order->status_string ?? ''}}
{{--Unlink Confirmation Dialog--}}
No Orders Yet
Total Amount {{$employee->assignedOrders->sum('amount')}}
Total Orders {{$employee->assignedOrders->count()}}

Summery:

{{-- --}} @foreach ($productNames as $productId => $productName) @php $qty = 0; $bonus = 0; $total_qty = 0; @endphp {{-- --}} @endforeach

Employee Name: {{ $employee->name }}

Product Name Pack Size quantity bonus Total QuantityPrice
{{ $productName->name }} {{ $productName->size }} @foreach ($orderProductNames as $orderProduct) @if ($orderProduct->product_id == $productId) @php $qty += $orderProduct->total_quantity; @endphp @endif @endforeach {{ $qty }} @foreach ($orderProductNames as $orderProduct) @if ($orderProduct->product_id == $productId) @php $bonus += $orderProduct->total_bonus; @endphp @endif @endforeach {{ $bonus }} @foreach ($orderProductNames as $orderProduct) @if ($orderProduct->product_id == $productId) @php $total_qty += $orderProduct->total_quantity + $orderProduct->total_bonus; @endphp @endif @endforeach {{ $total_qty }} --}} {{-- @foreach ($orderProductNames as $orderProduct)--}} {{-- @if ($orderProduct->product_id == $productId)--}} {{-- {{ $orderProduct->price }}--}} {{-- @endif--}} {{-- @endforeach--}} {{--
Total Amount {{$employee->assignedOrders->where('status',1)->sum('amount')}}
Total Orders {{$employee->assignedOrders->where('status',1)->count()}}
@endsection @section('scripts') {{----}} {{----}} @endsection