@extends('layouts.adminapp')

@section('content')

{{-- Pickup Details --}}
 
<div class="card mb-4">
    <div class="card-header">
        <div class="d-flex">
            <div class="mr-auto p-2 align-self-center"><h4>Orders No. {{$Order->id}}  </h4></div>
        </div>
    </div>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead>
                    <tr>
                    @php $Slno=0; @endphp
                        <th>Slno</th>
                        <th>Product</th>
                        <th>Services</th>
                        <th>Quantity</th>
                        <th>Amount</th> 
                    </tr>
                </thead>
                
                <tbody>
                @foreach($Order->order_products as $order_product)
                    <tr>
                        <td>{{++$Slno}}</td>
                        <td>{{$order_product->product->title}}</td>
                        <td>
                            @php $Amount=0; @endphp
                            @foreach($order_product->order_product_services as $order_product_services)
                            <span class="badge badge-primary">{{$order_product_services->product_service->servicetype->title}}</span>
                            @php $Amount+=$order_product_services->product_service->serviceprice; @endphp
                            @endforeach
                        </td>
                        <td>{{$order_product->quantity}}</td>
                        @php $Amount*=$order_product->quantity; @endphp
                        <td>{{$Amount}}</td>
                        <td></td>      
                    </tr>
                @endforeach
                </tbody>
                
            </table>
        </div>
    </div>
    
</div>

@endsection



