    <div class="panel panel-default">
    <?php     
    $sl_no = 1; 
    $query = $this->main_model->freight_info($freight_id);
    foreach($query as $row): 
    ?>
        <div class="panel-heading hidden-print">
            <h6 class="panel-title"><i class="fa fa-desktop"></i> Freight Information</h6> 
            <a onclick="window.print();" style="cursor:pointer;" class="pull-right btn btn-circle btn-xs btn-default hidden-print"><i class="fa fa-print"></i> Print</a> 					
        </div>

        <div class="panel-body">

            <p class="text-center hidden-print"><strong style="font-size: 16px;"><?php echo $this->main_model->company_name(); ?></strong><br /></p> 
            
            <br />
            <p class="text-center"><strong style="font-size: 15px;"><u>FREIGHT INVOICE</u></strong></p>
            
            <div class="row" style="border-bottom: 1px solid #eee;">
                <div class="col-xs-6">
                    <strong>INV NO./<?php echo $row['invoice_no']; ?></strong> 
                </div>
                <div class="col-xs-6">
                    <strong>Date: <?php echo date('d.m.Y', strtotime($row['date'])); ?></strong> 
                </div>
            </div>            
           
            <div class="row">
                <div class="col-xs-6"><strong> 
                    To,
                    <pre><?php echo $row['to']; ?></pre> 
                    <br /><br /><br />
                    ATTN: <span style="text-transform: uppercase;"><?php echo $row['ATTN']; ?></span> 
                </strong></div>
                <div class="col-xs-6"><strong> 
                    SHIPPER: <?php echo $row['SHIPPER']; ?><br />
                    HBL: <?php echo $row['HBLNO']; ?><br />
                    <?php if(!empty($row['HAWABLNO'])): ?>HAWABL No.: <?php echo $row['HAWABLNO']; ?><br /><?php endif; ?>
                    MBL No.: <?php echo $row['MBLNO']; ?><br />
                    <?php if(!empty($row['MAWBLNO'])): ?>MAWBL No.: <?php echo $row['MAWBLNO']; ?><br /><?php endif; ?>
                    <?php echo $row['pol_pod_type']; ?>: <?php echo $row['pol_pod']; ?><br />
                    POD: <?php echo $row['SHPT_EX']; ?><br />
					VOL: <?php echo $row['vol']; ?><br />
                    GROSS WEIGHT: <?php echo $row['QTY']; ?><br />
                    CNTR: <?php echo $row['CNTR']; ?><br />
					COMMODITY: <?php echo $row['commodity']; ?><br />
                    L/C No.: <?php echo $row['LCNO']; ?><br />
                </strong></div>
            </div>

            <br />            
                       
            <div style="min-height: 300px;">
                <div class="row">
                    <div class="col-xs-12">						
                        <table class="table table-bordered">
                            <thead><tr>
                                <td align="center"><strong>SL No.</strong></td> 
                                <td align="center"><strong>Description</strong></td> 
                                <td align="center"><strong>Freight Rate</strong></td> 
                                <td align="center"><strong>Exchange Rate</strong></td> 
                                <td align="center"><strong>Unit</strong></td> 
                                <td align="center"><strong>Amount (In BDT.)</strong></td> 
                            </tr></thead>
                            <tbody> 
                                <?php 
                                $amount = '';
                                $query_fi = $this->main_model->freightinvoice_info($row['freight_id']);
                                foreach($query_fi as $row_fi): 
                                ?>
                                <tr class="item-row">
                                    <td align="center"><?php if($row_fi['freight_invoice_id']): echo $sl_no; $sl_no++; endif; ?></td> 
                                    <td><?php echo $row_fi['description']; ?></td>
                                    <td align="right">$ <?php echo $row_fi['freight_rate']; ?></td>
                                    <td align="right">$ <?php echo $row_fi['exchange_rate']; ?></td>
                                    <td align="right"><?php echo $row_fi['unit']; ?></td>
                                    <td align="right">&#2547; <?php echo $row_fi['amount']; $amount += $row_fi['amount']; ?></td>
                                </tr>
                                <?php endforeach; ?>
                                <tr class="item-row">
                                    <td></td><td></td>
                                    <td colspan="4" align="right"><strong>Total = &#2547; <?php echo number_format((float)$amount,'2','.',''); ?></strong></td> 
                                </tr>                                
                            </tbody>
                        </table> 
                    </div>
                </div>
                <br/>  
                
                <p style="text-transform: uppercase;">In Words: <?php echo $this->main_model->get_bd_amount_in_text($amount); ?></p>
                <br />
                 
            </div>
            
	    <div class="row">
                <div class="col-xs-4 text-center">______________________</br>Prepared By</div>												
                <div class="col-xs-4 text-center">______________________<br/>Checked By</div>												
                <div class="col-xs-4 text-center">______________________<br/>Approved By</div>						
            </div>
            
            <br />
            <div class="hidden-print text-center">
                <strong><?php echo $this->main_model->company_address();?></strong>
            </div>
          
            
        </div>
        
    <?php endforeach; ?>
    </div>
