   
<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> Freight Info.</h6>
                <a href="<?php echo site_url('everbright/freight_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>Invoice No.</th>                        
                        <th>Date</th>                        
                        <th>Job No.</th> 
                        <th>Consignee</th>   
                        <th>HBL No.</th>
                        <th>Amount</th>
                        <th>Action</th>
                    </tr></thead>
                    <tbody>
                        <?php 
                        $query = $this->main_model->freight();
                        foreach($query as $row):
                        ?>
                        <tr>
                            <td><?php echo $row['invoice_no']; ?></td>
                            <td><?php echo date('M d, Y', strtotime($row['date'])); ?></td>
                            <td><?php echo $row['job_no']; ?></td>
                            <td><pre><?php echo $row['to']; ?></pre></td>
                            <td><?php echo $row['HBLNO']; ?></td>
                            <td class="text-right"><?php echo number_format((float)$this->main_model->freight_amount($row['freight_id']),2,'.',','); ?></td>
                            <td class="center">
                                <a href="<?php echo site_url('everbright/freight_edit/'.$row['freight_id']); ?>" class="btn btn-icon"><i class="fa fa-edit"></i> Edit</a>
                                <a href="<?php echo site_url('everbright/freight_view/'.$row['freight_id']); ?>" class="btn btn-icon"><i class="fa fa-desktop"></i> View</a>
                                <a href="<?php echo site_url('everbright/freight_doc/'.$row['freight_id']); ?>" class="btn btn-icon"><i class="fa fa-download"></i> Download</a>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>