<div class="content-wrapper">
    <div class="container-xxl flex-grow-1 container-p-y">
        <div class="row">
            <div class="col">
                <div class="card shadow">
                    <div class="card-header text-uppercase custom-header bg-primary text-bg-info fw-bold">
                        <div class="col-6">
                            <i class="menu-icon ti ti-users-group"></i>Collection Report
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="row mt-3">
                            <div class="col d-flex justify-content-end">
                                <a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseExample"
                                    role="button" aria-expanded="false" aria-controls="collapseExample">

                                    <i class="ti ti-filter-pause"></i> Filter
                                </a>
                            </div>
                            <div class="collapse mt-3" id="collapseExample">
                                <div class="card card-body">
                                    <div class="row mt-3">
                                        <div class="col-md-3 me-2">
                                            <div class="form-group">
                                                <label for="divisionId" class="form-label fw-bold">Select
                                                    Division</label>
                                                <select name="divisionId" id="divisionIdData" class="selectize">
                                                    <option value="">Select Division</option>
                                                    <?php $__currentLoopData = $getDivision; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $division): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($division->divisionName); ?>">
                                                            <?php echo e($division->divisionName); ?>

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

                                        <div class="col-md-3 me-2">
                                            <div class="form-group">
                                                <label for="villageId" class="form-label fw-bold">Select village</label>
                                                <select name="villageId" id="villageId">
                                                    <option value="">Select Village</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-3 me-2">
                                            <div class="form-group">
                                                <label for="smallgroupId" class="form-label fw-bold">Select Small
                                                    Group</label>
                                                <select name="smallgroupId" id="smallgroupId">
                                                    <option value="">Select Small Group</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-3 me-2 mt-3">
                                            <div class="form-group">
                                                <label for="divisionId" class="form-label fw-bold">Select
                                                    Field Officer</label>
                                                <select name="fieldOfficerData" id="fieldOfficerData" class="selectize">
                                                    <option value="">Select Field Officer</option>
                                                    <?php $__currentLoopData = $getUser; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($user->name); ?>">
                                                            <?php echo e($user->name); ?>

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

                                        <div class="col-md-3 mt-3">
                                            <label class="form-label fw-bold">Amount</label>
                                            <div class="d-flex">
                                                <input type="number" id="with1Min" class="form-control me-1"
                                                    placeholder="Min" />
                                                <input type="number" id="with1Max" class="form-control"
                                                    placeholder="Max" />
                                            </div>
                                        </div>

                                        <div class="col-md-3 mt-3">
                                            <label class="form-label fw-bold">Date Range</label>
                                            <div class="d-flex">
                                                <input type="date" id="minDate" class="form-control me-1" />
                                                <input type="date" id="maxDate" class="form-control" />
                                            </div>
                                        </div>
                                        <div class="col-12 d-flex justify-content-end">
                                            <a class="btn btn-primary" id="btnApplyFilters" data-bs-toggle="collapse"
                                                href="#collapseExample" role="button" aria-expanded="false"
                                                aria-controls="collapseExample">
                                                <i class="ti ti-filter-pause"></i> Filter
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <a href="<?php echo e(route('view_collection_report')); ?>" class="mt-3" target="_blank">
                            <button class="btn btn-secondary ">
                                PDF
                            </button>
                        </a>

                        <table class="table table-sm" id="collectionReportTable">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>Date</th>
                                    <th>Collection By</th>
                                    <th>Member Name</th>
                                    <th>Division</th>
                                    <th>Village</th>
                                    <th>Small Group</th>
                                    <th>Member NIC</th>
                                    <th>Old Account Number</th>
                                    <th>Savings</th>
                                    <th>Principal Amount</th>
                                    <th>Interest Amount</th>
                                    <th>Entre Fees</th>
                                    <th>Total Amount</th>
                                    <th>Description</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                    $count = 1;
                                ?>
                                <?php $__currentLoopData = $getCollectionData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e($index + 1); ?></td>
                                        <td><?php echo e($data['collectionDate']); ?></td>
                                        <td><?php echo e($data['collectedBy']); ?></td>
                                        <td><?php echo e($data['memberFirstName']); ?> <?php echo e($data['memberLastName']); ?></td>
                                        <td><a
                                                href="<?php echo e(route('division_details', Crypt::encrypt($data['divisionId']))); ?>"><?php echo e($data['divisionName']); ?></a>
                                        </td>
                                        <td><a
                                                href="<?php echo e(route('village_details', Crypt::encrypt($data['villageId']))); ?>"><?php echo e($data['villageName']); ?></a>
                                        </td>
                                        <td><a
                                                href="<?php echo e(route('smallgroup_details', Crypt::encrypt($data['smallGroupId']))); ?>"><?php echo e($data['smallGroupName']); ?></a>
                                        </td>
                                        <td><?php echo e($data['nicNumber']); ?></td>
                                        <td><?php echo e($data['oldAccountNumber']); ?></td>
                                        <td><?php echo e(number_format($data['totalSaving'], 2)); ?></td>
                                        <td><?php echo e(number_format($data['totalPrincipal'], 2)); ?></td>
                                        <td><?php echo e(number_format($data['totalInterest'], 2)); ?></td>
                                        <td>-</td>
                                        <td><?php echo e(number_format($data['totalAmount'], 2)); ?></td>
                                        <td><?php echo e($data['descriptions']); ?></td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="col-12 mt-3">
                <div class="card shadow">
                    <div class="card-body">
                        <div class="row">
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label class="fw-bold">Total Collector</label>
                                    <p class="total-collector-count">0</p>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label class="fw-bold">Total Member</label>
                                    <p class="total-member-count">0</p>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label class="fw-bold">Total Division</label>
                                    <p class="total-division-count">0</p>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label class="fw-bold">Total Village</label>
                                    <p class="total-village-count">0</p>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label class="fw-bold">Total Smallgroup</label>
                                    <p class="total-smallgroup-count">0</p>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label class="fw-bold">Total Collection Amount</label>
                                    <p class="total-amount-count">0.00</p>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>
</div>
<?php /**PATH /Users/anlex/Desktop/untitled folder/ngo/resources/views/pages/allpages/reports/collection_reports.blade.php ENDPATH**/ ?>