

<head>
    <title> <?php echo e($clientname[0]); ?> </title>
</head>
<?php $__env->startSection('content'); ?>

<div class="card">
    <div class="card-body">

        <?php if($message = Session::get('success')): ?>
        <div class="alert border-0 bg-light-success alert-dismissible fade show py-2">
            <div class="d-flex align-items-center">
                <div class="fs-3 text-success"><i class="bi bi-check-circle-fill"></i>
                </div>
                <div class="ms-3">
                    <div class="text-success"><?php echo e($message); ?></div>
                </div>
            </div>
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
        <?php endif; ?>

        <?php if($message = Session::get('fail')): ?>
        <div class="alert border-0 bg-light-danger alert-dismissible fade show py-2">
            <div class="d-flex align-items-center">
                <div class="fs-3 text-danger"><i class="bi bi-x-circle-fill"></i>
                </div>
                <div class="ms-3">
                    <div class="text-danger">
                        <?php echo e($message); ?>

                    </div>
                </div>
            </div>
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
        </div>
        <?php endif; ?>

        <h6 class="mb-0 text-uppercase"><?php echo e($clientname[0]); ?></h6>
        <hr />

        <a href="https://api.digitronicsindia.com/CCATEST/vt/PDF2/pdf-data-student/index-pdf.php?ClientID=<?php echo e(session('LoggedUser')['ClientID']); ?>" class="btn btn-primary"> PDF </a>

        <div class="table-responsive">
            <!-- <table data-page-length='32' id="example2" class="table table-striped table-bordered"> -->
            <table data-page-length='32' id="example" class="display" style="width:100%">
                <thead class="table-secondary">


                    <tr>
                        <th>#</th>
                        <?php $__currentLoopData = $tablehead; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $head): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <th><?php echo e($head->column_name); ?> </th>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tr>


                </thead>

                <tbody>
                    <?php $num = 1; ?>
                    <?php $k = 0; ?>
                    <?php $__currentLoopData = $tablerow; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td></td>
                        <!-- <?php for($i=0 ; $i< count($tablehead);$i++ ): ?> 
                        <td><?php echo e($tr->row_key); ?></td>
                        <?php endfor; ?> -->
                        <td><?php echo e($tr->row_name); ?></td>

                        <?php for($i=0 ; $i< count($tablehead)-2;$i++ ): ?> <td>
                            </td>
                            <?php endfor; ?>

                            <?php $__currentLoopData = $totalValues; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tv): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <?php while($k< count($tablerow)): ?> <td><?php echo e($tv[ $tablerow[$k]['row_key'] ]); ?></td>
                                <?php $k++; ?>
                                <?php break; ?>;
                                <?php endwhile; ?>
                                <!-- <?php for($i=0 ; $k< count($tablerow);$k++ ): ?>
                        <td><?php echo e($tv[ $tablerow[$i]['row_key'] ]); ?></td>
                        <?php break; ?>
                        <?php endfor; ?> -->

                                <?php break; ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>



                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                    <?php $__currentLoopData = $stock; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $st): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($num); ?></td>
                        <?php for($i=0 ; $i< count($tablehead);$i++ ): ?> <td><?php echo e($st[$tablehead[$i]['column_key']]); ?></td>

                            <?php endfor; ?>
                    </tr>
                    <?php $num++; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>



                </tbody>
            </table>
        </div>


    </div>
</div>

<script>
    let status = 0;

    $(document).ready(function() {

        // {
        //         extend: 'pdfHtml5',
        //         orientation: 'landscape',
        //         pageSize: 'LEGAL'
        //     }

        $('#example').DataTable({
            dom: 'Bfrtip',

            buttons: [{
                extend: 'excel',
                text: 'Excel',
                exportOptions: {
                    modifier: {
                        page: 'all'
                    }
                }
            }]
        });


    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('Admin.Layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/digitronicsindia/public_html/aswas/resources/views/Admin/viewStockReport.blade.php ENDPATH**/ ?>