

<?php $__env->startSection('content'); ?>


 
<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. <?php echo e($Order->id); ?> </h4></div>
        </div>
    </div>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead>
                    <tr>
                    <?php $Slno=0; ?>
                        <th>Slno</th>
                        <th>Product</th>
                        <th>Services</th>
                        <th>Quantity</th>
                        <th>Amount</th> 
                    </tr>
                </thead>
                
                <tbody>
                <?php $__currentLoopData = $Order->order_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order_product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <tr>
              <td><?php echo e(++$Slno); ?></td>
              <td><?php echo e($order_product->product->title); ?></td>
              <td>
              <?php $Amount=0; ?>
                <?php $__currentLoopData = $order_product->order_product_services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order_product_services): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <span class="badge badge-primary"><?php echo e($order_product_services->product_service->servicetype->title); ?></span>
                  <?php $Amount+=$order_product_services->product_service->serviceprice; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              </td>
              <td><?php echo e($order_product->quantity); ?></td>
              <?php $Amount*=$order_product->quantity; ?>
              <td><?php echo e($Amount); ?></td>
              <td></td>      
              </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                
            </table>
        </div>
    </div>
    <div class="card-footer">
        <form method="POST" action="<?php echo e(route('acceptOrder',$Order->id)); ?>">
        <?php echo csrf_field(); ?>
            <div class="row">
                <div class="col-lg-3 col-md-3 col-12">
                    <select class="form-control" id="cbEmployee" name="employee_id">
                        <option value="0">On Site Delivery</option>
                        <?php
                            echo App\Http\Controllers\EmployeeController::DeliveryBoyListForCombo(2);
                        ?>
                    </select>
                </div>
                <div class="col-lg-3 col-md-3 col-12">
                    <select class="form-control" id="cbGodown" name="godown_id" onchange="godown_onchange(this)">
                        <option>Select a godown</option>
                        <?php
                            echo App\Http\Controllers\GodownController::GodownListForCombo(0);
                        ?>
                    </select>  
                </div>
                <div class="col-lg-3 col-md-3 col-12">
                    <select class="form-control" id="selectRackId" name="rack_id" >
                        
                    </select>  
                </div>     
                
                <div class="col-lg-3 col-sm-3 col-12">
                    <span class="pull-right"><button type="submit" class="btn btn-success"  ><i class="fas fa-check"></i> Accept</button></span>
                </div>
            </div>
        </form>
    </div>
</div>

<?php $__env->stopSection(); ?>



<script>

function godown_onchange(Data){
    godownID = Data.value;
    $.ajax({
        url: '<?php echo e(route('selecetRack')); ?>',
        method: "get",
        data:{_token:'<?php echo e(csrf_token()); ?>',godownID:godownID},
            success: function(response){                                                        
                document.getElementById('selectRackId').innerHTML=response;
            }
            });

    }

</script>
<?php echo $__env->make('layouts.adminapp', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/exouzia1/public_html/tailor/resources/views/DeliveryManager/details.blade.php ENDPATH**/ ?>