<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 class="hidden-print"><?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
            error_reporting(0);
            $query = $this->main_model->deliveryorder_info($deliveryorder_id);
            foreach ($query as $row):
                ?>
                <div class="panel-heading hidden-print">
                    <h6 class="panel-title">
                        <i class="fa fa-desktop"></i> C-2 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> 

                    <br/>

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

                    <br />
                    <?php
//                    $query_deliveryorder_info = $this->db->get_where('deliveryorder', array('deliveryorder_id' => $row['serial_no']))->result_array();
//                    foreach ($query_deliveryorder_info as $row):
                        //To get the delivery information
                        ?>
                        <p>To,<br />
                            <?php
                            $customer_id = $row['customer_id2'];
                            $query = $this->db->get_where('customer', array('customer_id' => $customer_id))->result_array();
                            foreach ($query as $row_customer) {
                                echo '<strong>'.$row_customer['name'].'</strong>'.'</br>';
                                 echo $row_customer['address'];
                            }
                            ?>
                        </p>

                        <br/>

                        <p>Subject: NOC for issue D/O consignee.</p>

                        <br/>

                        <?php if (!empty($row['HBL_no'])): ?>
                            <div class="row">
                                <div class="col-xs-3">HBL No: </div>
                                <div class="col-xs-9"><?php echo $row['HBL_no']; ?></div>
                            </div> 
                        <?php endif; ?>
                        <?php if (!empty($row['MBL_no'])): ?>
                            <div class="row">
                                <div class="col-xs-3">MB/L No.: </div>
                                <div class="col-xs-9"><?php echo $row['MBL_no']; ?></div>
                            </div> 
                        <?php endif; ?>  
                        <?php if (!empty($row['CNTR_no'])): ?>
                            <div class="row">
                                <div class="col-xs-3">CNTR No: </div>
                                <div class="col-xs-9"><?php echo $row['CNTR_no']; ?></div>
                            </div> 
                        <?php endif; ?>
                        <?php if (!empty($row['POL_POD'])): ?>
                            <div class="row">
                                <div class="col-xs-3">Loading Port: </div>
                                <div class="col-xs-9"><?php echo $row['POL_POD']; ?></div>
                            </div> 
                        <?php endif; ?>
                        
                    <br/><br/>
                    <p>Dear Sir,<br/>
                        Reference to the subject shpt which related<br/>
                        <?php if (!empty($row['MBL_no'])): ?>
                            <div class="row">
                                <div class="col-xs-3">MB/L No.: </div>
                                <div class="col-xs-9"><?php echo $row['MBL_no']; ?></div>
                            </div> 
                        <?php endif; ?>
                        the said shpt belong to notify party
                        <br/><br/>
                        <?php if (!empty($row['notify_party'])): ?>
                            <div class="row">
                                <div class="col-xs-1">Notify&nbsp;Party:&nbsp;</div>
                                <div class="col-xs-10"><?php echo $row['notify_party']; ?></div>
                            </div> 
                        <?php endif; ?>                       
                    </p>                        
                        
                        
                        
                    <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/><br/><br/><br/><br/>
                    <div class="hidden-print">
                        <p class="text-center"><?php echo $this->main_model->company_address(); ?></p>
                    </div>
                </div>

            <?php endforeach; ?>
        </div>
    </body>
</html>
