

<?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>Reports</h4></div>
        </div>
        <div class="row">
            <div class="col-lg-4 col-sm-4">
                <div class="form-group w-30">
                    <select id="selectgrp" class="form-control <?php $__errorArgs = ['status_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>  <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="status_id" onchange="clicks()">
                        <?php
                            echo App\Http\Controllers\StatusController::StatusListForCombo(0);
                        ?>
                    </select>   
                    <?php $__errorArgs = ['status_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="invalid-feedback"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
            </div>
            <div class="col-lg-4 col-sm-4">
                
            </div>
            <div class="col-lg-4 col-sm-4">             
            
            </div>           
        </div>    
        
    </div>
    <div class="card-body" id="search_section">
        <?php $si=0; ?>
        <?php $__currentLoopData = $Orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $Order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="table-responsive mb-3">
            <table class="table table-hover">
                <thead class="thead-light">
                    <tr>
                        <th>SLNO.</th>
                        <th>Order No.</th>
                        <th>Customer</th>
                        <th>Status</th>
                        <th>Duration</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    
                    <tr>
                        <td><?php echo e(++$si); ?></td>
                        <td><?php echo e($Order->id); ?></td>
                        <td><?php echo e($Order->user->name); ?></td>
                        <td><?php echo e($Order->status->title); ?></td>
                        <td><?php echo e($Order->duration->title); ?></td>
                                             
                    </tr>
                    <tr>
                        <table class="table table-sm table-bordered">
                            <thead>
                                <tr>
                                    <th>Product</th>
                                    <th>Service</th>
                                    <th>Quantity</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($order_product->product->title); ?></td>
                                    <td>
                                        <?php $__currentLoopData = $order_product->order_product_services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order_service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <span class="badge badge-primary"><?php echo e($order_service->product_service->servicetype->title); ?></span>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </td>
                                    <td><?php echo e($order_product->quantity); ?></td> 
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </tr>
                </tbody>
            </table>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
    <div class="card-footer">
        <div class="row">
            <div class="col-lg-6">
                <div class="d-flex justify-content-start font-weight-bold">
                <a href=""><button class="btn btn-danger">Save Pdf</button></a>     
                </div>
            </div> 
            <div class="col-lg-6">
                <div class="d-flex justify-content-end font-weight-bold">
                    <form method="post" action="<?php echo e(route('detailPrint')); ?>">
                    <?php echo csrf_field(); ?>
                        <input type="hidden" class="form-control <?php $__errorArgs = ['selectgrp'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"  name="selectgrp" id="SelectGroupforPrint" required>
                        <?php $__errorArgs = ['selectgrp'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="invalid-feedback"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        <button type="submit" class="btn btn-primary">Print</button>
                    </form>   
                </div>
            </div>
        </div>            
    </div>
</div>

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

<script> 

function clicks() {

    var items = document.getElementById("selectgrp").value;
       
   
    document.getElementById("SelectGroupforPrint").value=items;
     
    $.ajax({
      url: '<?php echo e(route('ReportSelectGroups')); ?>',
      method: "get",
      data: {_token: '<?php echo e(csrf_token()); ?>',searchitems:items },
                              success: function (response){   

                                document.getElementById('search_section').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/Report/detailReport.blade.php ENDPATH**/ ?>