              <div role="tablist" class="active tab-pane" id="pending">

                <div class="card-body table-responsive p-3" id="order_full_screen">
                    <table id="payout_table" class="table table-striped">
                      <thead>
                      <tr>
                        <th>Request ID</th>
                        <th>Complete Name</th>
                        <th>Amount Deposit</th>
                        <th>Date Request</th>
                        <th width="21%">Action</th>
                      </tr>
                      </thead>
                      <tbody>
                      <?php 
                        $sql_pending_req = "SELECT * FROM tbl_stockist_repurchase WHERE request_status = 0";
                        $result_pending_req = $conn->query($sql_pending_req);
                          while($row_pending_req = mysqli_fetch_array($result_pending_req)) {
                            $stockist_id = $row_pending_req['stockist_id'];
                            $request_id = $row_pending_req['request_id'];

                            $sql_user = "SELECT * FROM tbl_user_account WHERE unique_id = '$stockist_id'";
                            $result_user = $conn->query($sql_user);
                            $row_user = mysqli_fetch_assoc($result_user);
                      ?>
                      <tr>
                        <td style="color: #ffd700;"><?php echo $row_pending_req['request_id']; ?> </td>
                        <td><?php echo $row_user['firstname'].' '.$row_user['lastname']; ?></td>
                        <td><span class="font-weight-bold text-warning">&#8369; <?php echo $row_pending_req['amount_deposit']; ?></span></td>
                        <td><?php echo date('F d Y', strtotime($row_pending_req['request_date'])); ?></td>
                        <td>
                          <a data-toggle="modal" data-target="#accept<?php echo $row_pending_req['id']; ?>" class="btn btn-sm btn-success">Approved</a>
                          <a href="repurchaseDetails.php?requestID=<?php echo $row_pending_req['id']; ?>" class="btn btn-sm btn-primary withanimation">Details</a>
                          <a data-toggle="modal" data-target="#cancel<?php echo $row_pending_req['id']; ?>" class="btn btn-sm btn-danger">Ignore</a>
                        </td>
                      </tr>


                    <div class="modal" id="accept<?php echo $row_pending_req['id']; ?>">
                      <div class="modal-dialog">
                        <div class="modal-content" style="background-color: #151e27!important;">
                          <div class="modal-header pb-0" style="border: 0px;">
                            <h5 class="modal-title text-white" style="font-weight: bold;">Approve Request</h5>
                          </div>
                          <div class="modal-body pt-0 pb-0">
                            <p class="text-muted">Are you sure you want to approve request?</p>
                          </div>
                          <div class="modal-footer pr-0 pl-0 pb-2 pt-0" style="display: block; border: 0px">
                            <div class="row">
                              <div class="col-6">
                                <button type="button" class="btn btn-default btn-lg btn-block" style="background: transparent; color: #fff;" data-dismiss="modal">Cancel</button>
                              </div>
                              <div class="col-6">
                                <form style="margin: 0;" method="POST">
                                  <input type="hidden" name="id" value="<?php echo $row_pending_req['request_id']; ?>">
                                  <input type="hidden" name="stockist_id" value="<?php echo $stockist_id; ?>">
                                  <button type="submit" name="approve" class="btn btn-warning btn-lg btn-block withanimation_submit" style="background: #FFD700; border-color: #ffd700;">Yes, Submit</button>
                                </form>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div> <!-- approve -->

                    <div class="modal" id="cancel<?php echo $row_pending_req['id']; ?>">
                      <div class="modal-dialog">
                        <div class="modal-content" style="background-color: #151e27!important;">
                          <div class="modal-header pb-0" style="border: 0px;">
                            <h5 class="modal-title text-white" style="font-weight: bold;">Ignore Request</h5>
                          </div>
                          <div class="modal-body pt-0 pb-0">
                            <p class="text-muted">Are you sure you want to ignore request?</p>
                          </div>
                          <div class="modal-footer pr-0 pl-0 pb-2 pt-0" style="display: block; border: 0px">
                            <div class="row">
                              <div class="col-6">
                                <button type="button" class="btn btn-default btn-lg btn-block" style="background: transparent; color: #fff;" data-dismiss="modal">Cancel</button>
                              </div>
                              <div class="col-6">
                                <form style="margin: 0;" method="POST">
                                  <input type="hidden" name="id" value="<?php echo $row_pending_req['id']; ?>">
                                  <button type="submit" name="cancel" class="btn btn-warning btn-lg btn-block withanimation_submit" style="background: #FFD700; border-color: #ffd700;">Yes, Submit</button>
                                </form>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div> <!-- cancel -->


                    
                      <?php } ?>
                      </tbody>
                    </table>
                  </div>

              </div> <!-- pending -->

              <div role="tablist" class="tab-pane" id="complete">
                <div class="card-body table-responsive p-3" id="order_full_screen">
                    <table id="approve_table" class="table table-striped">
                      <thead>
                      <tr>
                        <th>Request ID</th>
                        <th>Complete Name</th>
                        <th>Amount Deposit</th>
                        <th>Date Request</th>
                        <th>Date Approve</th>
                        <th>Action</th>
                      </tr>
                      </thead>
                      <tbody>
                      <?php 
                        $sql_pending_req = "SELECT * FROM tbl_stockist_repurchase WHERE request_status = 1";
                        $result_pending_req = $conn->query($sql_pending_req);
                          while($row_pending_req = mysqli_fetch_array($result_pending_req)) {
                            $stockist_id = $row_pending_req['stockist_id'];
                            $request_id = $row_pending_req['request_id'];

                            $sql_user = "SELECT * FROM tbl_user_account WHERE unique_id = '$stockist_id'";
                            $result_user = $conn->query($sql_user);
                            $row_user = mysqli_fetch_assoc($result_user);
                      ?>
                      <tr>
                        <td style="color: #ffd700;"><?php echo $row_pending_req['request_id']; ?> </td>
                        <td><?php echo $row_user['firstname'].' '.$row_user['lastname']; ?></td>
                        <td><span class="font-weight-bold text-warning">&#8369; <?php echo $row_pending_req['amount_deposit']; ?></span></td>
                        <td><?php echo date('F d Y', strtotime($row_pending_req['request_date'])); ?></td>
                        <td><?php echo date('F d Y', strtotime($row_pending_req['approve_date'])); ?></td>
                        <td>
                          <a href="repurchaseDetails.php?requestID=<?php echo $row_pending_req['id']; ?>" class="btn btn-sm btn-primary withanimation">Details</a>
                        </td>
                      </tr>

                      <?php } ?>
                      </tbody>
                    </table>
                </div>
              </div> <!-- approve -->
