   
<div class="row">
    <div class="col-sm-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h6 class="panel-title"><i class="fa fa-table"></i> Debit Note Information</h6>
                <a href="<?php echo site_url('everbright/debit_add'); ?>" class="pull-right btn btn-circle btn-xs btn-default"><i class="fa fa-plus"></i>Add</a>
            </div>
            <div class="datatable">
                <table class="table table-bordered table-hover">
                    <thead><tr>
                        <th>Date</th>                        
                        <th>INV. No</th>                        
                        <th>Shipper</th>                        
                        <th>Consignee</th>                        
                        <th>Carrier</th>
                        <th>Amount</th>                        
                        <th>Action</th>
                    </tr></thead>
                    <tbody>
                        <?php 
                        $query = $this->main_model->debit();
                        foreach($query as $row):
                        ?>
                        <tr>
                            <td><?php echo date('M d, Y', strtotime($row['date'])); ?></td>
                            <td><?php echo $row['invoice_no']; ?></td>
                            <td><?php echo $row['SHIPPER']; ?></td>
                            <td><?php echo $row['CNEE']; ?></td>
                            <td><?php echo $row['CARRIER']; ?></td>
                            <td class="text-right"><?php echo number_format((float)$this->main_model->debitcredit_invoice_amount($row['debitcredit_id']),2,'.',','); ?></td>
                            <td class="center">
                                <a href="<?php echo site_url('everbright/debit_edit/'.$row['debitcredit_id']); ?>" class="btn btn-icon"><i class="fa fa-edit"></i> Edit</a>
                                <a href="<?php echo site_url('everbright/debit_view/'.$row['debitcredit_id']); ?>" class="btn btn-icon"><i class="fa fa-desktop"></i> View</a>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
