
@extends('layouts.dashboard', ['title' => 'Beneficiaries Report'])

@section('content')
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Main content -->
<!-- Main content -->
    <section class="content">

        <!-- /.row -->
        <!-- Main row -->
        <div class="">
            <br><br>
            @include('inc.messages')
          <!-- Left col -->

          <!-- /.Left col -->
          <!-- right col (We are only adding the ID to make the widgets sortable)-->
          <section class="col-lg-12 connectedSortable">

            <!-- Map card -->
            <div class="card">
              <div class="card-header no-border">
                <h3 class="card-title">
                  Beneficiaries Summary Report. <b>District:</b> {{ $district }}
                </h3>
                <!-- card tools -->

                <!-- /.card-tools -->
              </div>
              <div class="card-body">

               <h5><b>Start Date:</b> {{ $start_date }} - <b>End Date:</b> {{ $end_date }}   <b>Total No. of Beneficiaries:</b> {{  $no_of_beneficiaries  }}. <b>Total Amount:</b> {{ number_format($total) }} UGX</h5>
              <div class="float-right">
                
              </div>

              <br><br><br>

              <div class="table-responsive">
                  <table id="" width="100%" class="table-bordered table-striped table-sm dataTable no-footer">
                      <thead>
                      <tr>
                        <th>ID</th>
                        <th>District</th>
                        <th>No. of Beneficiaries</th>
                        <th>Entitlement Amount</th>
                        <th>Service Fee</th>
                        <th>Withdraw Charges</th>
                        <th>Total</th>
                        <th>Quarter</th>
                        <th>Payment Date</th>
                        <th>Financial Year</th>
                      </tr>
                      </thead>
                      <tbody>
                        @foreach($entries as $item)
                        <tr>
                            <td>{{ $loop->iteration }}</td>
                            <td>{{ $item->district }}</td>
                            <td>{{ $item->no_of_beneficiaries }}</td>
                            <td>{{ number_format($item->ent_amount) }}</td>
                            <td>{{ number_format($item->service_fee) }}</td>
                            <td>{{ number_format($item->withdraw_charge) }}</td>
                            <td>{{ number_format($item->total) }}</td>
                            <td>{{ $item->quarter }}</td>
                            <td>{{ $item->pay_date }}</td>
                            <td>{{ $item->fy }}</td>
                           
                        </tr>
                        @endforeach

                       </tbody>

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


        </div>
        <!-- /.modal-dialog -->
      </div>
      <!-- /.create modal -->

            <!-- /.card -->
          </section>
          <!-- right col -->
        </div>

    <!-- /.content -->

    



    @include('inc.copyright')
@endsection
