

<?php $__env->startSection('content'); ?>
<div class="card mb-3">
    <div class="card-header">
        <h5 class="mb-0">Contribution Rates</h5>
    </div>
    <div class="card-body">
        <!-- Date Filter Form -->
        <form method="GET" action="<?php echo e(url('/trends/contribution-rates')); ?>" class="row g-3 mb-4">
            <div class="col-md-4">
                <label for="start_date" class="form-label">Start Date</label>
                <input type="date" name="start_date" class="form-control"
                    value="<?php echo e($startDate ?? now()->format('Y-m-d')); ?>">
            </div>
            <div class="col-md-4">
                <label for="end_date" class="form-label">End Date</label>
                <input type="date" name="end_date" class="form-control"
                    value="<?php echo e($endDate ?? now()->format('Y-m-d')); ?>">
            </div>
            <div class="col-md-4 align-self-end">
                <button type="submit" class="btn btn-primary btn-sm">
                    <i class="fas fa-search"></i> Filter
                </button>
            </div>
        </form>


        <!-- Contribution Rates Table -->
        <div class="dt-responsive table-sm table-responsive">
            <table id="basic-btn" class="table table-sm table-striped table-bordered nowrap">
    <thead class="bg-200 text-900">
        <tr>
            <th>#</th> <!-- New column for row numbers -->
            <th>Member Name</th>
            <th>Total Contribution</th>
            <th>Average Per Month</th>
        </tr>
    </thead>
    <tbody>
        <?php $__currentLoopData = $contributionRates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <tr>
            <td><?php echo e($loop->iteration); ?></td> <!-- Row number -->
            <td><?php echo e($row->member_name); ?></td>
            <td>E<?php echo e(number_format($row->total_contribution, 2)); ?></td>
            <td>E<?php echo e(number_format($row->average_per_month, 2)); ?></td>
        </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>
</table>

        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\WORK-STATION\MBBS\Insurance-Version Controls\03-01-2026\resources\views/trends/contribution_rates.blade.php ENDPATH**/ ?>