<?php $this->load->view('theme/include/header'); ?>

<!--Start Main Content-->
<section>
<div class="main-content">
<div class="row">
<div class="inner-contatier">    
<div class="col-md-12 col-lg-12 col-sm-12 content-title"><h4>FACTURES</h4></div>
<div class="col-md-12 col-lg-12 col-sm-12">
<!--Start Panel-->
<div class="panel panel-default">
    <!-- Default panel contents -->
    <div class="panel-heading">FACTURES</div>
    <div class="panel-body manage-client">
       <table class="table table-bordered" style="width:100%;" id="invoice-list">
	      <thead>
            <th>Facture#</th>
			<th>Code</th>
            <th>Date</th>
			<th>Emetteur</th>
			<th>Beneficiaire</th>
			<th>Montant</th>
			<th>Action</th>
	      </thead>	
          <tbody> 		  
			<?php foreach($invoices as $invoice){ ?>
            <tr>
                <td><?php echo $invoice->id+1000; ?></td>
				<td><?php echo $invoice->sending_code; ?></td>
                <td><?php echo $invoice->sending_date; ?></td>
				<td><?php echo $invoice->sender_fullname; ?></td>
				<td><?php echo $invoice->recipent_fullname; ?></td>
				<td><?php echo decimalPlace($invoice->sending_amount); ?></b></td>
				<td>
				<a href="<?php echo site_url('Transfer/view_invoice/'.$invoice->id); ?>" class="btn btn-info btn-xs"><i class="fa fa-search"></i>&nbsp;&nbsp;Afficher</a>
				<?php if(user_type()=="admin"){ ?>
				<a href="<?php echo site_url('Transfer/remove_invoice/'.$invoice->id); ?>" class="btn btn-danger btn-xs remove-btn"><i class="fa fa-trash-o"></i>&nbsp;&nbsp;SUPPRIMER</a>
				<?php } ?>
				</td>
            </tr>
           <?php } ?>
		   </tbody>
        </table>
    </div>
    <!--End Panel Body-->
</div>
<!--End Panel-->    
    
</div>


</div><!--End Inner container--->
</div><!--End Row-->
</div><!--End Main-content DIV-->
</section><!--End Main-content Section-->

<?php $this->load->view('theme/include/footer'); ?>

<script type="text/javascript">
$(document).ready(function() {


$('#invoice-list').DataTable( {
    responsive: true,
	"bAutoWidth":false
});

});

</script>
</body>

</html>
