<!DOCTYPE html>
<html lang="en">


<!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
<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>Rizwan </title>
	<!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="<?php echo base_url();?>assets/images/favicon.png">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/bootstrap-select/dist/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/css/style.css">
	<!-- Pick date -->
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.css">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.date.css">
     <link href="<?php echo base_url();?>assets/vendor/datatables/css/jquery.dataTables.min.css" rel="stylesheet">
    <!-- Custom Stylesheet -->
   <style type="text/css">
     @media print
{
  .button
  {
    display: none;
  }
}

 </style>   

</head>

<body>

    <!--*******************
        Preloader start
    ********************-->

    <!--*******************
        Preloader end
    ********************-->

    <!--**********************************
        Main wrapper start
    ***********************************-->
	    
          
				
				<div class="row">


                    <div class="col-12">
                        <div class="card">
                           
                            <div class="card-body">
                               
                               
                            <div class="row">
                                    <div class="col-xl-2">
                                        <!-- Tab panes -->
                                        <div class="tab-content">
                                            <div role="tabpanel" class="tab-pane fade active show" id="first">
                                                <img class="img-fluid" src="http://localhost/new_portal//assets/logo.png" alt="">
                                            </div>
                                           
                                        </div>
                                        
                                    </div>
                                    <?php if(!empty($get_data)){ ?>
                                    <!--Tab slider End-->
                                    <div class="col-xl-9 col-sm-12">
                                        <div class="product-detail-content">
                                            <!--Product details-->
                                            <div class="new-arrival-content pr">
                                                <h4><?php echo partyname($get_data[0]['party_id']); ?></h4>
                                                <div class="star-rating">
                                                    
                                                <span class="review-text">
                                                    <?php echo date("d-m-Y", strtotime($get_data[0]['so_date'])); ?></span>
                                                </div>
                                                <p class="price"><?php echo $get_data[0]['so_no']; ?></p>
                                                
                                                <p>Product Name: <span class="item"><?php echo product_name($get_data[0]['product_id']); ?></span> </p>
                                                <p>Qty: <span class="item"><?php echo $get_data[0]['quantity']; ?></span></p>
                                                <p>Ref Code: <span class="item"><?php echo  $get_data[0]['ref_code']; ?></span></p>
                                               
                                                                     <div class="card">
                            <div class="card-header">
                                <h4 class="card-title">Production Plan Details</h4>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive">
                                    <table class="table table-bordered table-responsive-sm">
                                        <thead>
                                            <tr>
                                                <th>Code</th>
                                                <th>Items</th>
                                                <th>QTY</th>
                                                <th>PC-W</th>
                                                <th>Spec-Ref</th>
                                                <th>Material</th>
                                                <th>Color</th>
                                                <th>B-QTY</th>
                                                <th>Mould</th>
                                                <th>Machine</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            

                                            <?php if(!empty($get_data)) {?>
                                            <?php foreach ($get_data as $value) { 
                                                $condition = get_child_pro_type($value['child_product']);
                                             if($condition==1)
                                                 {  
                                                ?>

                                        <tr style="text-align: center;">


                                            <td><?php $bom_products_id =  get_bom_product_id($value['child_id']); 
                                               echo  product_code($bom_products_id); 
                                            ?></td> 

                                           <td><?php $bom_products =  get_bom_product_id($value['child_id']); ?>
                                               
                                               <?php echo  product_name($bom_products); ?>
                                           </td> 

                                           <td><?php echo $value['total']; ?></td>





                                           <td><?php $pc_weight =  get_bom_product_id($value['child_id']); ?>
                                               
                                                <?php echo  product_weight($pc_weight); ?>
                                           </td>
                                            
                                           <td><?php $pc_specs = get_bom_product_id($value['child_id']); ?>
                                               
                                                <?php echo  product_ref_code($pc_specs); ?>
                                           </td>

                                           <td>
                                            <?php  $material_id = get_material_id($value['material_id']); ?>
                                               
                                               <?php echo material_name($material_id); ?>
                                           </td>

                                           <td><?php echo $value['color']; ?></td>

                                           <td><?php echo $value['qty']; ?></td>
                                           <td><?php echo mold_name($value['mold']); ?></td>
                                           <td><?php echo machine_name($value['machine']); ?></td>
                                        </tr>
                                        <?php }
                                                }
                                         ?>
                                    <?php } ?>
                                            
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                                                 <!--Quanatity End-->
                                                <div class="shopping-cart mt-3">
                                                     <input style="padding:5px;" value="Print Document" type="button" onclick="myFunction()" class="button"></input>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                <?php } ?>
                                </div>

                            </div>
                        </div>
                    </div>





					
				</div>
            </div>
        </div>


          <div class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true">
                                        <div class="modal-dialog modal-lg">
                                            <div class="modal-content">
                                                
                                                <div class="modal-header">
                                                   <h5 class="card-title">Production Plan </h5>
                                                    <button type="button" class="close" data-dismiss="modal"><span>&times;</span>
                                                    </button>
                                                </div>
                                                <div class="modal-body">
                                              
                                                   
                                            <div id="bom_details" >
                                                        
                                            </div>
                                                
                                        
                                    </div>
                                    
                                    </div>
                                      


                             </div>        </div>
                                    
	<!-- Required vendors -->
         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
        <style>
        .redborder{
            border:1px solid red;
        }
        </style>

    <script type='text/javascript'>

        function myFunction()
        {
             var mywindow = window.open('', 'PRINT', 'height=400,width=600');
            window.print();
        }    
    
     function btnExport_monthly()
{
    
    var tab_text="<table border='2px'><tr bgcolor='#ebebeb'>";
    var textRange; var j=0;
    tab = document.getElementById('example5'); // id of table

    for(j = 0 ; j < tab.rows.length ; j++) 
    {     
        tab_text=tab_text+tab.rows[j].innerHTML+"</tr>";
        //tab_text=tab_text+"</tr>";
    }

    tab_text=tab_text+"</table>";
    tab_text= tab_text.replace(/<A[^>]*>|<\/A>/g, "");//remove if u want links in your table
    tab_text= tab_text.replace(/<img[^>]*>/gi,""); // remove if u want images in your table
    tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params


    var ua = window.navigator.userAgent;
    var msie = ua.indexOf("MSIE "); 

    if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))      // If Internet Explorer
    {
        txtArea2.document.open("txt/html","replace");
        txtArea2.document.write(tab_text);
        txtArea2.document.close();
        txtArea2.focus(); 
        sa=txtArea2.document.execCommand("SaveAs",true,"Generation_School_Report");
    }  
    else                 //other browser not tested on IE 11
        sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));  

    return (sa);
}
    </script>   

	   <?php  $this->load->view('footer'); ?>
        
</body>

<!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
</html>