
<table id="myTable" class="table table-bordered table-striped">
    <thead>
        <tr>
                 <th> <label class="pos-rel"><input type="checkbox" class="selectall" /><span class="lbl"></span> All</label></th>
                  <th>S.No</th>
                  <th>User</th>
                  <th>Amount</th>
                  <th>From Date</th>
                  <th>To Date</th>
                  <th>Approved By</th>
                  <th>Approved Status</th>
                  <th>Status</th>
                  <th>Created Date</th>
                  <th>Action</th>
                </tr>
    </thead>
    <tbody>



        <?php

        if($creditLimitListing>0){
                $i=1;
        foreach($creditLimitListing as $listing){
            $userName   =   $this->mainMenu()->fetchUserName($listing['user_id']);
            $approvedBy   =   $this->mainMenu()->fetchUserName($listing['approved_by']);

            ?>
        <tr>
            <td class="center"><label class="pos-rel">
                        <input type="checkbox" rel="<?php echo $listing['id']; ?>" class="check" />
                            <span class="lbl"></span> </label>
            </td>

            <td><?php echo $i;?></td>
            <td><?php echo $userName; ?></td>
            <td><?php echo $listing['credit_limit_amount']; ?></td>
            <td><?php echo date('d-m-Y',strtotime($listing['from_date'])); ?></td>
            <td><?php echo date('d-m-Y',strtotime($listing['to_date'])); ?></td>
            <td><?php echo $approvedBy; ?></td>
            <td><div id="changestatus1"  class="<?php if($listing['approved_status']==1){ echo "aprovestatus";} else{echo "unaprovestatus"; } ?>  iconsize" name="ChangeStatus"> </div></td>
            <td><div id="changestatus1"  class="<?php if($listing['status']==1){ echo "aprovestatus";} else{echo "unaprovestatus"; } ?>  iconsize" name="ChangeStatus"> </div></td>
            <td><?php echo date('d-m-Y',strtotime($listing['created_date'])); ?></td>
            <td>

        <div class="hidden-sm hidden-xs action-buttons">
                    <a class="red " title="Approved" href="<?php echo $this->url('credit-limit', array('action'=>'approve'),['query'=>['id'=>$listing['id']]]);?>"> <i class="ace-icon fa fa-check-square-o"></i> </a>
                    <a class="red " title="Edit" href="<?php echo $this->url('credit-limit', array('action'=>'edit'),['query'=>['id'=>$listing['id']]]);?>"> <i class="ace-icon fa fa-edit bigger-130"></i> </a>
                    <a class="red" href="<?php echo $this->url('credit-limit', array('action'=>'delete'),['query'=>['id'=>$listing['id']]]);?>" title="Delete"> <i class="ace-icon fa fa-trash-o bigger-130"></i> </a>
        </div></td>
        </tr>
        <?php $i++;} }else{?>
                <tr><td colspan="7" style="text-align: center;">No Records Found</td></tr>
        <?php }?>


    </tbody>
</table>
