
@extends('layouts.dashboard', ['title' => 'Expense List Requested By'.$summary->requested_by])

@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">
                  All Expenses
                </h3>
                <!-- card tools -->

                <!-- /.card-tools -->
              </div>
              <div class="card-body">
                <h2>Requested Amount: {{ number_format($summary->amount) }} UGX. Requested By: {{ $summary->requested_by }}. Date: {{ $summary->created_at }}</h2>

                 <br>
              <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>Value Date</th>
                        <th>Name</th>
                        <th>Account Number</th>
                        <th>Amount</th>
                        <th>Bank</th>

                      </tr>
                      </thead>
                      <tbody>
                        @foreach($entries as $item)
                        <tr>
                            <td>{{ $loop->iteration }}</td>
                            <td>{{ $item->value_date }}</td>
                            <td>{{ $item->account_details }}</td>
                            <td>{{ $item->account_number }}</td>
                            <td>{{ number_format($item->amount) }}</td>
                            <td>{{ $item->bank }}</td>


                        </tr>

                        @endforeach
                        <tr>
                            <td><b>Total</b></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>

                            <td><b>{{ number_format($total) }} UGX</b></td>

                        </tr>

                       </tbody>

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


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

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

    <!-- /.content -->


    @include('inc.copyright')
@endsection
