<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> 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> 

                    <br />
                    <p class="text-center"><strong style="font-size: 15px;"><u>DELIVERY ORDER</u></strong></p>
                    <br />

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

                    <br />

                    <p>To,<br />
					The Deputy Traffic Manager (OPS)<br />
					ICD, Kamalapur, Dhaka-1000

                        <?php
                        //$customer_id = $row['customer_id'];
                        //$query = $this->db->get_where('customer', array('customer_id' => $customer_id))->result_array();
                        //foreach ($query as $row_customer) {
                          //  echo $row_customer['name'];
                        //}
                        ?></p>

                    <br/>

                    <p>Please deliver to <strong><?php echo $row['deliver_to']; ?></strong> realization of all charges under noted package landed ex.</p>

                    <br/>

    <?php if (!empty($row['MBL_no'])): ?>
                        <div class="row"><div class="col-xs-2">MB/L No.: </div>
                            <div class="col-xs-10"><?php echo $row['MBL_no']; ?></div></div> 
                    <?php endif; ?>  

    <?php if (!empty($row['againts_HBL_no'])): ?>
                        <div class="row"><div class="col-xs-2">Againts HBL No: </div>
                            <div class="col-xs-10"><?php echo $row['againts_HBL_no']; ?></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['Seal_No'])): ?>
                        <div class="row"><div class="col-xs-2">Seal No: </div>
                            <div class="col-xs-10"><?php echo $row['Seal_No']; ?></div></div> 
                    <?php endif; ?>

    <?php if (!empty($row['PLTS'])): ?>
                        <div class="row"><div class="col-xs-2">PLTS: </div>
                            <div class="col-xs-10"><?php echo $row['PLTS']; ?></div></div> 
                    <?php endif; ?>

    <?php if (!empty($row['CNEE'])): ?>
                        <div class="row"><div class="col-xs-2">CNEE: </div>
                            <div class="col-xs-10"><?php echo $row['CNEE']; ?></div></div> 
                    <?php endif; ?>

    <?php if (!empty($row['FVSL_VOY_no'])): ?>
                        <div class="row"><div class="col-xs-2">FVSL & VOY No: </div>
                            <div class="col-xs-10"><?php echo $row['FVSL_VOY_no']; ?></div></div> 
                    <?php endif; ?>

    <?php if (!empty($row['import_rotation'])): ?>
                        <div class="row"><div class="col-xs-2">Import Rotation: </div>
                            <div class="col-xs-10"><?php echo $row['import_rotation']; ?></div></div> 
                    <?php endif; ?>

    <?php if (!empty($row['GW'])): ?>
                        <div class="row"><div class="col-xs-2">GW: </div>
                            <div class="col-xs-10"><strong><?php echo $row['GW']; ?></strong></div></div> 
                    <?php endif; ?>

    <?php if (!empty($row['cargo_description'])): ?>
                        <div class="row"><div class="col-xs-2">Cargo Description: </div>
                            <div class="col-xs-10"><?php echo $row['cargo_description']; ?></div></div> 
                    <?php endif; ?>

                    <br/>

                    <?php if (!empty($row['BE_AC'])): ?>
                        <div class="row"><div class="col-xs-2">B/E, A/C: </div>
                            <div class="col-xs-10"><?php echo $row['BE_AC']; ?></div></div> 
                    <?php endif; ?>            
                    <?php if (!empty($row['date2'])): ?>
                        <div class="row"><div class="col-xs-2">Date: </div>
                            <div class="col-xs-10"><?php echo date('F d, Y', strtotime($row['date2'])); ?></div></div> 
                    <?php endif; ?>            

                    <br />

                    <p>For,<br />
                        Original B/L Letter of Guarantee held by us.</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>
