<html>
    <script>
    <!-- <div class="col-md-2">
                            <select name="transport_mode" id="transport_mode" class="form-control freeze">
                                <option value="">--Select Transport Mode --</option>
                                <?php                                   
                                    $sql_stmt = "SELECT * FROM transport_mode";                                    
                                    $result = mysqli_query($con,$sql_stmt);
                                    while($row = mysqli_fetch_array($result))
                                    {
                                ?>
                                <option value="<?php echo $row['id']; ?>"><?php echo $row['type']; ?></option>
                                <?php } ?>
                            </select>   
                            <p class="pull-left" style="font-size:10px;">Transport Mode </p>                               
                        </div> -->
                        <!-- <div class="col-md-2">
                            <select name="cargo_type" id="cargo_type" class="form-control freeze">
                                <option value="">--Select Cargo Type--</option>
                                <?php
                                    $sql_stmt = "SELECT * FROM cargo_type";
                                    $result = mysqli_query($con,$sql_stmt);
                                    while($row = mysqli_fetch_array($result))
                                    {
                                ?>
                                <option value="<?php echo $row['id']; ?>"><?php echo $row['type']; ?></option>
                                <?php } ?>
                            </select>
                            <p class="pull-left" style="font-size:10px;">Cargo Type</p>
                        </div>         -->
                        <!-- <div class="col-md-2">
                            <input type="text" name="importer_name" id="importer_name" class="form-control freeze" value="<?php echo $r['importer_name']; ?>"> 
                            <p class="pull-left" style="font-size:10px;">Consignee Name  </p>                               
                        </div>              
                        <div class="col-md-2">
                            <input type="text" name="importer_address" id="importer_address" class="form-control freeze" value="<?php echo $r['importer_address']; ?>"> 
                            <p class="pull-left" style="font-size:10px;">Consignee Address  </p>                               
                        </div>   
                        <div class="col-md-2">
                            <input type="text" name="importer_country" id="importer_country" class="form-control freeze" value="<?php echo $r['importer_country']; ?>"> 
                            <p class="pull-left" style="font-size:10px;">Consignee Country </p>                               
                        </div>
                        <div class="col-md-2">
                            <input type="text" name="importer_city" id="importer_city" class="form-control freeze" value="<?php echo $r['importer_city']; ?>"> 
                            <p class="pull-left" style="font-size:10px;">Consignee City </p>                                -->
                        <!-- </div>  -->       
                        <!-- <div class="col-md-2">
                            <input type="text" name="batch_type" id="batch_type" class="form-control freeze" value=""> 
                            <p class="pull-left" style="font-size:10px;">Batch Type </p>                               
                        </div> -->
                        <!-- <div class="col-md-2">
                            <input type="text" name="consignment_no" id="consignment_no" class="form-control freeze" value=""> 
                            <p class="pull-left" style="font-size:10px;">No. of Consignment (?) </p>                               
                        </div> -->
                        <div class="col-md-2">
                            <select name="declaration_type" id="declaration_type" class="form-control freeze">
                                <option value="">--Select Declaration Type--</option>
                                <?php
                                    if($regime_type == 1)
                                    {
                                        $sql_stmt = "SELECT * FROM declaration_type where declaration_type like '%IM%'";
                                    }
                                    else if($regime_type == 2)
                                    {
                                        $sql_stmt = "SELECT * FROM declaration_type where declaration_type like '%EX%'";
                                    }
                                    $result = mysqli_query($con,$sql_stmt);
                                    while($row = mysqli_fetch_array($result))
                                    {
                                ?>
                                <option value="<?php echo $row['id']; ?>"><?php echo $row['regime_type']; ?></option>
                                <?php } ?>
                            </select>                            
                            <p class="pull-left" style="font-size:10px;">Declaration Type</p>
                        </div> 

                        <div class="col-md-3">                    
                    <select name="status" id="stat1" class="form-control freeze">';
                            $sql_stmt = "SELECT * FROM availability_status";
                            $result = mysqli_query($con,$sql_stmt); 
                            while($row = mysqli_fetch_array($result))
                            {
                                $echo .='<option value=' .$row["id"]. '>' .$row["description"] .'</option>';
                            }

                            $echo .='    </select>
                    <p class="pull-left" style="font-size:13px;">Invoice</p>
                </div>
                <div class="col-md-3">                    
                    <select name="status" id="stat2" class="form-control freeze">';
                            $sql_stmt = "SELECT * FROM availability_status";
                            $result = mysqli_query($con,$sql_stmt);
                            while($row = mysqli_fetch_array($result))
                            {
                                $echo .='<option value=' .$row["id"]. '>' .$row["description"] .'</option>';
                            }

                            $echo .='   
                        </select>
                    <p class="pull-left" style="font-size:13px;">AWB/BOL</p>
                </div>
                <div class="col-md-3">                    
                    <select name="status" id="stat3" class="form-control freeze">';
                            $sql_stmt = "SELECT * FROM availability_status";
                            $result = mysqli_query($con,$sql_stmt);
                            while($row = mysqli_fetch_array($result))
                            {
                                $echo .='<option value=' .$row["id"]. '>' .$row["description"] .'</option>';
                            }
                            $echo .='    
                        </select>
                    <p class="pull-left" style="font-size:13px;">Packing List</p>
                </div>
                <div class="col-md-3">                    
                    <select name="status" id="stat4" class="form-control freeze">';
                            $sql_stmt = "SELECT * FROM availability_status";
                            $result = mysqli_query($con,$sql_stmt);
                            while($row = mysqli_fetch_array($result))
                            {
                                $echo .='<option value=' .$row["id"]. '>' .$row["description"] .'</option>';
                            }

                            $echo .='
                        </select>
                    <p class="pull-left" style="font-size:13px;">Cert. of Origin</p>
                </div>
        // function add_tr_hdr()
            // {
            //     [].forEach.call(document.querySelectorAll('tr'), function (element)
            //     {
            //         var newElement = document.createElement('tr');
            //         // var new_hdr_td = document.createElement('td');
            //         newElement.className = "hdr";
            //         element.parentNode.insertBefore(newElement, element.nextSibling);
            //         for (var i = 0; i < 21; i++)
            //         {
            //             var td = document.createElement("td"); // TABLE HEADER.
            //             newElement.appendChild(td);
            //             newElement.firstChild.innerHTML = "HDR";
            //             // newElement.secondChild.innerHTML = regime;
            //         }
        
            //     });
            //     add();
            //     add_tr_dld();                
            // }

            // function add_tr_dld()
            // {
            //     [].forEach.call(document.querySelectorAll('.hdr'), function (element)
            //     {
            //         var newElement = document.createElement('tr');
            //         // var new_hdr_td = document.createElement('td');
            //         newElement.className = "dld";
            //         element.parentNode.insertBefore(newElement, element.nextSibling);
            //         for (var i = 0; i < 41; i++)
            //         {
            //             var td = document.createElement("td"); // TABLE HEADER.
            //             newElement.appendChild(td);
            //             newElement.firstChild.innerHTML = "DLD";

            //         }        
            //     });
            //     add();
            //     add_tr_pyd();
            // }

            // function add_tr_pyd()
            // {            
            //     [].forEach.call(document.querySelectorAll('.dld'), function (element)
            //     {
            //         var newElement = document.createElement('tr');
            //         newElement.className = "pyd";
            //         element.parentNode.insertBefore(newElement, element.nextSibling);
            //         for (var i = 0; i < 4; i++)
            //         {
            //             var td = document.createElement("td"); // TABLE HEADER.
            //             newElement.appendChild(td);
            //             newElement.firstChild.innerHTML = "PYD";
            //         }        
            //     });
            //     add();
            //     add_tr_tdd();
            // }

            // function add_tr_tdd()
            // {            
            //     [].forEach.call(document.querySelectorAll('.pyd'), function (element)
            //     {
            //         var newElement = document.createElement('tr');
            //         newElement.className = "tdd";
            //         element.parentNode.insertBefore(newElement, element.nextSibling);
            //         for (var i = 0; i < 11; i++)
            //         {
            //             var td = document.createElement("td"); // TABLE HEADER.
            //             newElement.appendChild(td);
            //             newElement.firstChild.innerHTML = "TDD";
            //         }        
            //     });
            //     add();
            //     add_tr_pkd();
            // }

            // function add_tr_pkd()
            // {            
            //     [].forEach.call(document.querySelectorAll('.tdd'), function (element)
            //     {
            //         var newElement = document.createElement('tr');
            //         newElement.className = "pkd";
            //         element.parentNode.insertBefore(newElement, element.nextSibling);
            //         for (var i = 0; i < 5; i++)
            //         {
            //             var td = document.createElement("td"); // TABLE HEADER.
            //             newElement.appendChild(td);
            //             newElement.firstChild.innerHTML = "PKD";
            //         }        
            //     });
            //     add();
            //     add_tr_inv();
            // }

            // function add_tr_inv()
            // {            
            //     [].forEach.call(document.querySelectorAll('.pkd'), function (element)
            //     {
            //         var newElement = document.createElement('tr');
            //         newElement.className = "inv";
            //         element.parentNode.insertBefore(newElement, element.nextSibling);
            //         for (var i = 0; i < 17; i++)
            //         {
            //             var td = document.createElement("td"); // TABLE HEADER.
            //             newElement.appendChild(td);
            //             newElement.firstChild.innerHTML = "INV";
            //         }        
            //     });
            //     add();
            //     add_tr_iid();
            // }

            // function add_tr_iid()
            // {            
            //     [].forEach.call(document.querySelectorAll('.inv'), function (element)
            //     {
            //         var newElement = document.createElement('tr');
            //         newElement.className = "iid";
            //         element.parentNode.insertBefore(newElement, element.nextSibling);
            //         for (var i = 0; i < 21; i++)
            //         {
            //             var td = document.createElement("td"); // TABLE HEADER.
            //             newElement.appendChild(td);
            //             newElement.firstChild.innerHTML = "IID";
            //         }        
            //     });
            //     add();
            // }
            // if( j == 23)
                            // {                                
                            //     td.innerHTML = document.getElementById("doc_no").value;                                                                
                            // }
                            // if( j == 24)
                            // {                                
                            //     td.innerHTML = document.getElementById("importer_doc_type").value;                                                                
                            // }
                            // if( j == 25)
                            // {                                
                            //     td.innerHTML = document.getElementById("identification_doc").value;                                                                
                            // }
                            // if( j == 26)
                            // {                                
                            //     td.innerHTML = document.getElementById("importer_name").value;                                                                
                            // }
                            // if( j == 27)
                            // {                                
                            //     td.innerHTML = document.getElementById("importer_address").value;                                                                
                            // }
                            // if( j == 28)
                            // {                                
                            //     td.innerHTML = document.getElementById("importer_phone").value;                                                                
                            // }
                            // if( j == 29)
                            // {                                
                            //     td.innerHTML = document.getElementById("importer_country").value;                                                                
                            // }
                            // if( j == 30)
                            // {                                
                            //     td.innerHTML = document.getElementById("importer_city").value;                                                                
                            // }
                            // if( j == 31)
                            // {                                
                            //     td.innerHTML = document.getElementById("importer_national_id").value;                                                                
                            // }
    </script>
</html>
<!-- <div class="col-md-2">
                            <input type="text" name="seller_name" id="seller_name" class="form-control freeze"> 
                            <p class="pull-left" style="font-size:10px;">Seller's Name </p>                               
                        </div> -->
                        <!-- <div class="col-md-2">
                            <select name="payment_instrument" id="payment_instrument" class="form-control freeze">
                                <option value="">--Select Payment instrument--</option>
                                <?php
                                    $sql_stmt = "SELECT * FROM payment_mode";
                                    $result = mysqli_query($con,$sql_stmt);
                                    while($row = mysqli_fetch_array($result))
                                    {
                                ?>
                                <option value="<?php echo $row['id']; ?>"><?php echo $row['type']; ?></option>
                                <?php } ?>
                            </select>
                            <p class="pull-left" style="font-size:10px;"> Payment instrument  </p>
                        </div> --> 
                         <!-- <div class="col-md-2">                    
                            <select name="status" id="status1" class="form-control freeze">
                                <option value="">--Availability Status--</option>
                                <?php
                                    $sql_stmt = "SELECT * FROM availability_status";
                                    $result = mysqli_query($con,$sql_stmt);
                                    while($row = mysqli_fetch_array($result))
                                    {
                                ?>
                                <option value="<?php echo $row['id']; ?>"><?php echo $row['description']; ?></option>
                                <?php } ?>
                            </select>
                            <p class="pull-left" style="font-size:10px;">Invoice </p>
                        </div> -->
                        <!-- <div class="col-md-2">                    
                            <select name="status" id="status2" class="form-control freeze">
                                <option value="">--Availability Status--</option>
                                <?php
                                    $sql_stmt = "SELECT * FROM availability_status";
                                    $result = mysqli_query($con,$sql_stmt);
                                    while($row = mysqli_fetch_array($result))
                                    {
                                ?>
                                <option value="<?php echo $row['id']; ?>"><?php echo $row['description']; ?></option>
                                <?php } ?>
                            </select>
                            <p class="pull-left" style="font-size:10px;"> AWB/BOL</p>
                        </div> -->
                        <!-- <div class="col-md-2">                    
                            <select name="status" id="status3" class="form-control freeze">
                                <option value="">--Availability Status--</option>
                                <?php
                                    $sql_stmt = "SELECT * FROM availability_status";
                                    $result = mysqli_query($con,$sql_stmt);
                                    while($row = mysqli_fetch_array($result))
                                    {
                                ?>
                                <option value="<?php echo $row['id']; ?>"><?php echo $row['description']; ?></option>
                                <?php } ?>
                            </select>
                            <p class="pull-left" style="font-size:10px;"> Packing List  </p>
                        </div>     -->
                        <!-- <div class="col-md-2">                    
                            <select name="status" id="status4" class="form-control freeze">
                                <option value="">--Availability Status--</option>
                                <?php
                                    $sql_stmt = "SELECT * FROM availability_status";
                                    $result = mysqli_query($con,$sql_stmt);
                                    while($row = mysqli_fetch_array($result))
                                    {
                                ?>
                                <option value="<?php echo $row['id']; ?>"><?php echo $row['description']; ?></option>
                                <?php } ?>
                            </select>
                            <p class="pull-left" style="font-size:10px;"> Cert. of Origin</p>
                        </div>   -->