 <?php $__env->startSection('content'); ?>
<div class="col-lg-12 col-xxl-9">
  <div class="card mb-3">
    <div class="card-body">
      <div class="row">
        
        <div class="col-lg-4 border-lg-end border-bottom border-lg-0 py-3 py-lg-0">
          <div class="d-flex flex-between-center mb-3">
            <div class="d-flex align-items-center">
              <div class="icon-item icon-item-sm bg-soft-primary shadow-none me-2 bg-soft-info"><span class="fas fa-hand-holding-usd text-info"></span></div>
              <h6 class="mb-0">Search Per cover</h6>
            </div>           
          </div>
          <div class="d-flex">
            <div class="d-flex">
            <form class="form-material" method="POST" action="<?php echo e(url ('/search_cover_payment')); ?>">
                <?php echo csrf_field(); ?>
                <select required name="search" class="form-control">
                  <option disabled selected>--Select Option--</option>
                  <?php $__currentLoopData = $covers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cover): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <option  value="<?php echo e($cover->id); ?>"><?php echo e($cover->name); ?></a></option>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                
                <br>
                <input type="date" value="<?php echo date('Y-m-d'); ?>" required class="form-control" name="date1" id=""><br>
                <input type="date" value="<?php echo date('Y-m-d'); ?>" required class="form-control" name="date2" id="">
                <br>
                <br>
                <button type="submit" class="btn btn-primary btn-sm" aria-placeholder="Search"><i class="fas fa-search"></i> Preview</button>

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


        <div class="col-lg-4 pt-3 pt-lg-0">
          <div class="d-flex flex-between-center mb-3">
            <div class="d-flex align-items-center">
              <div class="icon-item icon-item-sm bg-soft-primary shadow-none me-2 bg-soft-success"><span class="fas fa-calendar-week text-success"></span></div>
              <h6 class="mb-0">Search Per Date</h6>
            </div>           
          </div>
          <div class="d-flex">
            <div class="d-flex">
            <form class="form-material" method="POST" action="<?php echo e(url ('/search_date_payment')); ?>">
                <?php echo csrf_field(); ?>
                From
                    <input type="date" value="<?php echo date('Y-m-d'); ?>" required class="form-control" name="date1" id="">
                    To:<input type="date" value="<?php echo date('Y-m-d'); ?>" required class="form-control" name="date2" id="">
                    <br>
                    <select required name="search" class="form-control">
                        <option disabled selected>--Select Option--</option>
                        <option value="Cash">Collected Cash</option>
                        <option value="All">All Payments</option>
                    </select>
                <br>
                <button type="submit" class="btn btn-primary btn-sm" aria-placeholder="Search"><i class="fas fa-search"></i> Preview</button>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="card mb-3">
  <div class="card-header">
    <div class="row flex-between-end">
      <div class="col-auto align-self-center">
        <h5 class="mb-0" data-anchor="data-anchor">List of payments</h5>
      </div>
    </div>
  </div>
  <div class="card-body pt-0">

    <div id="tableExample2" data-list='{"valueNames":["id", "date", "member_id","name","amount", "method"],"page":10,"pagination":true}'>
      <div class="table-responsive scrollbar">
        <table class="table table-bordered table-striped fs--1 mb-0">
          <thead class="bg-200 text-900">
            <tr>
              <th class="sort" data-sort="date">Payment ID</th>
              <th class="sort" data-sort="date">Date</th>
              <th class="sort" data-sort="member_id">Member ID</th>
              <th class="sort" data-sort="name">Member Name</th>
              <th class="sort" data-sort="amount">Amount</th>
            </tr>
          </thead>
          <tbody class="list">
            <?php $__currentLoopData = $payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
              <td class="id"><?php echo e($payment->id); ?></td>
              <td class="date"><?php echo e($payment->payment_date); ?></td>
              <td class="name"><?php echo e($payment->member_id); ?></td>
              <td class="name"><?php echo e($payment->member->name); ?></td>
              <td class="amount"><?php echo e($payment->amount_paid); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          </tbody>
        </table>
      </div>
      <div class="d-flex justify-content-center mt-3"><button class="btn btn-sm btn-falcon-default me-1" type="button" title="Previous" data-list-pagination="prev"><span class="fas fa-chevron-left"></span></button>
        <ul class="pagination mb-0"></ul><button class="btn btn-sm btn-falcon-default ms-1" type="button" title="Next" data-list-pagination="next"><span class="fas fa-chevron-right"> </span></button>
      </div>
    </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/reports/allpayments.blade.php ENDPATH**/ ?>