<table>
    <tr class="table table-striped">
        <td>
            <button class="btn btn-success pull-right" data-bs-toggle="modal" data-bs-target="#adduniusr"><i class="fa fa-plus"></i></button>
            <button class="btn btn-success pull-right BtnLstPayUni" data-bs-toggle="modal" data-bs-target="#ListPymnt"><i class="fa fa-list"></i></button>
        </td>
    </tr>
</table>
<br />
<table class="table table-hover">
    <thead>
        <tr>
            <th scope="col">Date</th>
            <th scope="col">Payer</th>
            <th scope="col">Description</th>
            <th scope="col">Total</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <input class="form-control" size="15" type="date" id="TxtuniPayDate" name="uniPayDate">
            </td>
            <td>
                <select class="form-control select2" id="TxtSlctUsrUni" style="width: 100%;" required>
                    <option></option>
                    <?php
                    $sql = "SELECT id,name FROM rent.uni_tenant;";
                    $res = mysqli_query($sqldb, $sql);
                    while ($row = mysqli_fetch_assoc($res)) {
                        unset($name);
                        $id = $row['id'];
                        $name = $row['name'];
                        echo '<option value=" ' . $name . '" >' . $name . '</option>';
                    }
                    ?>
                </select>
            </td>
            <td><input class="form-control" type="text" name="desc" id="Txtdesc"></td>
            <td>
                <div class="col-xs-4"><input class="form-control" type="text" name="byr" id="Txtbyran"></div>
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <div class="text-center"><button type="button " class="btn btn-default" data-bs-dismiss="modal" id="BtnAddPayUsrUni" onClick="AddPayUsrUni()">Add</button>
                    <button type="button" class="btn btn-default" data-bs-dismiss="modal" id="BtnEdtPayUsrUni" onClick="AddNameUsrUni()">Edit</button>
                </div>
            </td>
        </tr>
    </tbody>
</table>


<!-- Modal add Unifi User-->
<div class="modal fade" id="adduniusr" tabindex="-1" role="dialog" aria-labelledby="Mdladduniusr" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <h8 class="modal-title" id="Mdladduniusr">Add User Unifi</h8>
                <button type="button" class="close" data-bs-dismiss="modal">&times;</button>
            </div>
            <div class="modal-body">
                <form id="FrmAddNameUsrUni" class="was-validated">
                    <label for="AddNameUsrUni">Name : &nbsp;</label> <input type="text" name="name" id="TxtAddNameUsrUni"></p>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-bs-dismiss="modal" id="BtnAddNameUsrUni" onClick="AddNameUsrUni()">Add</button>
                <button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div><!-- ./Modal add Unifi User-->

<!-- Modal List User Payment -->
<div id="ListPymnt" class="modal fade"  tabindex="-1"  role="dialog" aria-labelledby="Mdladduniusr" aria-hidden="true">
    <div class="modal-dialog modal-dialog-scrollable">
        <div class="modal-content bg-secondary">
            <div class="modal-header">
                <h5 class="modal-title">List Payment</h5>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <div id="dispLstUniPayTbl"></div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-bs-dismiss="modal">Close </button>
                </div>
            </div>
        </div>
    </div>
    <!-- End Modal List User Payment -->
</div> <!-- ./ id=unifi -->