<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php echo $page_title; ?> | <?php echo $this->main_model->company_name(); ?></title>
    <!-- Header -->
    <?php $this->load->view('header'); ?>            
</head>
<body>

    <div class="panel panel-default">
    <?php
    $query = $this->main_model->letter_info($letter_id);
    foreach($query as $row): 
    ?>
        <div class="panel-heading hidden-print">
            <h6 class="panel-title"><i class="fa fa-desktop"></i> Letter 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="page-setup panel-body">

            <p class="text-center hidden-print"><strong style="font-size: 16px;"><?php echo $this->main_model->company_name(); ?></strong><br /></p> 

            <p>Date: <?php echo date('F d, Y', strtotime($row['date'])); ?></p>

            <p>To<br />
            <?php echo $row['to']; ?></p>
            
            <p><strong>Sub: <?php echo $row['sub']; ?></strong></p>
            
            <br/>
            
            <?php if(!empty($row['HBL'])): ?>
            <div class="row"><div class="col-xs-2">Hbl: </div>
            <div class="col-xs-10"><?php echo $row['HBL']; ?></div></div> 
            <?php endif; ?>              
            
            <?php if(!empty($row['MBL'])): ?>
            <div class="row"><div class="col-xs-2">MB/L: </div>
            <div class="col-xs-10"><?php echo $row['MBL']; ?></div></div> 
            <?php endif; ?>  
            
            <?php if(!empty($row['CNTR_no'])): ?>
            <div class="row"><div class="col-xs-2">Cntr No.: </div>
            <div class="col-xs-10"><?php echo $row['CNTR_no']; ?></div></div> 
            <?php endif; ?>
            
            <?php if(!empty($row['port'])): ?>
            <div class="row"><div class="col-xs-2">Loading Port: </div>
            <div class="col-xs-10"><?php echo $row['port']; ?></div></div> 
            <?php endif; ?>
            
            <br/>
            
            <h6>Dear Sir,</h6>
            <p>Reference to the subject shpt which related</p>
            <?php if(!empty($row['MBL'])): ?>
            <div class="row"><div class="col-xs-2">MB/L: </div>
            <div class="col-xs-10"><?php echo $row['MBL']; ?></div></div> 
            <?php endif; ?>             
            <p>the said shpt belong to notify party</p>
            
            <?php if(!empty($row['NP'])): ?>
            <div class="row"><div class="col-xs-2">NP: </div>
            <div class="col-xs-10"><?php echo $row['NP']; ?></div></div> 
            <?php endif; ?>
            
			 <br />
                    <p>As on behalf notify party which we have no objection to issue delivery order with the original HBL by your self.</p>                         
                    <br/>    
                    <p>We need your kind cooperation & necessary action for above </p>
                    <br/><br/>
                    <p>Thanks & best rgds</p>
            
            <br />
            
            <p class="text-center"><?php echo $this->main_model->company_address(); ?></p>
            
        </div>
        
    <?php endforeach; ?>
    </div>
</body>
</html>
