
<div class="main-content">

 <div class="page-content">
   <div class="container-fluid">


     <div class="card">
       <div class="card-body"> 
        <div class="row">
          <h4 class="card-title"> Leverage Amount</h4>

        </div>
        <br>
        <div class="row">

          <?php  if($this->session->flashdata()) {
           echo Helpers::showFlash($this->session->flashdata("response"));
         } ?>
       </div>
       <table id="example" class="table table-striped table-bordered dt-responsive nowrap">
             <thead>
              <tr>
                <th>Userid</th>                
                <th>Nickame</th>                
                <th>Leverage Amount</th>
                <th>Remaining Leverage</th>
                
              </tr>
           </thead>
           <?php $key=1; ?>
           <tbody>
              <?php foreach ($data as $value) { 
                $user = Helpers::userdetails($value["user_id"]);
                $busines= Helpers::allbusiness($value["user_id"]);
                $remaining = $value["amount"]-$busines;
                ?>
                <tr>
            <td><?= $user["username"]; ?></td>
            <td><?= $user["full_name"]; ?></td>
            <td><?= $value["amount"]; ?></td>
            <td><?= $remaining; ?></td>
          </tr>
              <?php } ?>
            </tbody>
          </table>        
    </div>
  </div>

</div>
</div>
</div>



