@extends('layouts.app')

@section('content')
    <section class="page-header row">
        <h2> Users Balance Check </h2>
        <ol class="breadcrumb">
            <li><a href="{{ url('') }}"> Dashboard </a></li>
            <li><a href="{{ url('/manage/usersdata') }}"> Users </a></li>
            <li class="active"> Users Balance Check </li>
        </ol>
    </section>

    <div class="page-content row">
        <div class="page-content-wrapper no-margin">
            @if ($rows)
                <h3 class="section-title">All Records</h3>
                <div class="sbox">
                    <div class="sbox-content">
                        <div class="table-responsive">
                            <table class="table table-striped table-hover " id="users_balance_check_Table">
                                <thead>
                                <tr>
                                    <th class="number"> User ID </th>
                                    <th class="number"> First Name </th>
                                    <th class="number"> Last Name </th>
                                    <th class="number"> Email </th>
                                    <th class="number"> Pending Amount </th>
                                    <th class="number"> Confirmed Amount </th>
                                    <th class="number"> Pending Balance </th>
                                    <th class="number"> Confirmed Balance </th>
                                    <th class="number"> Is Merchant? </th>
                                </tr>
                                </thead>

                                <tbody>
                                @foreach ($rows as $row)
                                    <tr>
                                        <td>{{ $row->user_id }}</td>
                                        <td>{{ $row->first_name }}</td>
                                        <td>{{ $row->last_name }}</td>
                                        <td>{{ $row->email }}</td>
                                        <td>{{ $row->pendingAmount }}</td>
                                        <td>{{ $row->confirmedAmount }}</td>
                                        <td>{{ $row->pendingBalance }}</td>
                                        <td>{{ $row->confirmedBalance }}</td>
                                        <td>{{ $row->is_merchant }}</td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            @else
                <h3 class="section-title">No Variance in Users Balances</h3>
            @endif
        </div>
    </div>
@stop
