
<?php $__env->startSection('main-content'); ?>
<main>
    <div class="container-fluid">
        <h2 class="mt-5 mb-4">Fund Deposit Report</h2>
        <div class="row">
            <div class="col-md-12">
                <div class="card card-primary">
                    <div class="card-header">

                    </div>
                    <div class="responsive">
                        <form action="<?php echo e(url('/branch/report/fund-deposit-report')); ?>" method="get">
                            <div class="card-body" id="demo">
                                <div class="col-md-2">
                                    <div class="form-group">
                                        <label for="">From Date</label>
                                        <input type="date" class="form-control" name="from_date" id="from_date" value="<?php echo e(Request::get('from_date')); ?>">
                                    </div>
                                </div>
                                <div class="col-md-2">
                                    <div class="form-group">
                                        <label for="">To Date</label>
                                        <input type="date" class="form-control" name="to_date" id="to_date" value="<?php echo e(Request::get('to_date')); ?>">
                                    </div>
                                </div>
                                <!-- <div class="col-md-2">
                                    <div class="form-group">
                                        <label>Registrar EA Combination</label>
                                        <select name="Ea_Code" id="eacode" onchange="eacodeFun()" class="form-control select2">
                                            <option value="">All</option>
                                            <?php $__currentLoopData = DB::table('registrars')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($val->Ea_Code); ?>" <?php echo e(Request::get('Ea_Code')==$val->Ea_Code ?
                                                'selected' : ''); ?>>
                                                <?php echo e($val->Ea_Code); ?> (<?php echo e($val->Ea_Name); ?>)</option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                </div> -->
                                <div class="col-md-2">
                                    <label for="">State</label>
                                    <select name="state" id="state" onchange="stateFun()" class="form-control">
                                        <option value="">All</option>
                                        <?php $__currentLoopData = $state; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($val->state); ?>" <?php echo e(Request::get('state')==$val->state ? 'selected':''); ?>><?php echo e($val->state); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                                
                                <div class="col-md-2">
                                    <div class="form-group">
                                        <label for="">District</label>
                                        <select name="district" id="district" onchange="districtFun()" class="form-control">
                                            <option value="">All</option>
                                            <?php $__currentLoopData = $districtList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                             <option value="<?php echo e($val->District); ?>" <?php echo e(Request::get('district') == $val->District ? 'selected':''); ?>><?php echo e($val->District); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-2">
                                    <div class="form-group">
                                        <label for="">Operator Name</label>
                                        <select name="operator_code" id="operator"  class="form-control">
                                            <option value="">All</option>
                                            <?php $__currentLoopData = $operatorList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($val->Operator_Code); ?>" <?php echo e(Request::get('operator_code') == $val->Operator_Code ? 'selected':''); ?>><?php echo e($val->Operator_Code); ?> <?php echo e($val->Operator_Name); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-2">
                                    <input type="submit" class="btn btn-primary" value="Filter" style="margin: 25px; float:right;">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <br>
            </div>

            <div class="col-md-12">
                <div class="card card-primary">
                    <div class="card-header">
                        <!-- <h6 class="card-title"></h6> -->
                        <a onclick="excelDownload()" class="btn btn-primary"><i class="fa fa-download"></i> Fund Deposit
                            Report</a>
                    </div>
                    <div class="card-body" id="demo">
                        <div class="table-responsive">
                            <table class="table table-bordered table-striped" width="100%" cellspacing="0">
                                <thead>
                                    <tr>
                                        <th width="5%">S.No.</th>
                                        <th width="8%">Transaction Date</th>
                                        <th width="12%">Branch</th>
                                        <th width="20%">District</th>
                                        <th width="10%">Operator ID</th>
                                        <th width="10%">Operator Name</th>
                                        <th width="10%">Station Code </th>
                                        <th>Transaction Amount</th>
                                        <th>Transaction Number </th>

                                    </tr>
                                </thead>
                                <tbody>

                                    <?php $__empty_1 = true; $__currentLoopData = $enrollmentList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key =>$val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr>
                                        <td><?php echo e($key+ $enrollmentList->firstItem()); ?>.</td>
                                        <td><?php echo e(date('d-m-Y',strtotime($val->date_of_transaction))); ?></td>
                                        <td><?php echo e($val->branch_name); ?></td>
                                        <td><?php echo e($val->district); ?></td>
                                        <td><?php echo e($val->Operator_Code); ?></td>
                                        <td><?php echo e($val->Operator_Name); ?></td>
                                        <td><?php echo e($val->Station_Code); ?></td>
                                        <td><?php echo e($val->amount_credited); ?></td>
                                        <td><?php echo e($val->transaction_no); ?></td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>

                                    <tr>
                                        <td colspan="19">No Record Found !!</td>
                                    </tr>

                                    <?php endif; ?>

                                </tbody>
                            </table>
                            <?php echo $enrollmentList->links(); ?>

                        </div>
                    </div>
                    <!-- /.card-body -->
                </div>
                <!-- /.card -->

                <!-- end -->
            </div>
        </div>

    </div>
</main>
<!-- Include jQuery -->
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>

<script>
    function excelDownload(){
            var from_date = $('#from_date').val();
            var to_date   = $('#to_date').val();
            var eacode = "";//$('#eacode').val();
            var state = $('#state').val();
            var district = $('#district').val();
            var operator = $('#operator').val();

            window.location.href="<?php echo e(url('/branch/get-excel-fund-deposit')); ?>?from_date="+from_date+"&to_date="+to_date+"&eacode="+eacode+"&state="+state+"&district="+district+"&operator="+operator;
             
        }
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('branch.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/aks5g/public_html/aadhar.aks.5g.in/resources/views/branch/funddeposit_reporting.blade.php ENDPATH**/ ?>