<?php
$this->load->view ( $left );
$this->load->view ( $header );
?>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>All Payments</h2>
    </div>
    <div class="col-sm-8">
        <div class="title-action">
            <a href="<?php echo site_url("userpaybill/newpayment");?>" class="btn btn-primary addNewUser">
                <i class="fa fa-plus-square-o"></i>
                <span class="m-l-xs">New Payment</span>
            </a>
        </div>
    </div>
</div>
<div class="wrapper wrapper-content">
    <div class="row text-center animated fadeInRightBig">
        <table class="table" id="myTable">
        	<thead>
        		<tr>
        			<th>Date</th>
        			<th>Payment#</th>
                    <th>Vendor Name</th>
                    <th>Mode</th>
                    <th>Amount</th>
                    <th>Used Amount</th>
        		</tr>
        	</thead>
            <tbody>
                <?php if (count($invoice_list) > 0) {
                    foreach ($invoice_list as $key_invoice => $value_invoice) {?>
                        <tr>
                           <td><?php echo !empty($value_invoice->name) ? $value_invoice->name : '';?></td>
                           <td><?php echo !empty($value_invoice->company_name) ? $value_invoice->company_name : '';?></td>
                           <td><?php echo !empty($value_invoice->contact_email) ? $value_invoice->contact_email  : '';?></td>
                           <td><?php echo !empty($value_invoice->contact_phone ) ? $value_invoice->contact_phone : '';?></td>
                           <td>0</td>
                           <td>0</td>
                        </tr>
                <?php }
                }?>
            </tbody>
        </table>
    </div>
</div>
<?php $this->load->view($footer); ?>
<script type="text/javascript">
	$(document).ready(function(){
        $('#myTable').DataTable();
	});
</script>