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

</head>

<body>

 <?php $material_type = material_type_po($condition[0]['material_id']); ?>

 <?php if($material_type==1){?>
<div class="col-xl-12 col-xxl-12 col-lg-12">
                        <div class="card">
                            <div class="card-header">
                                <p>Remarks by QC: Please refer to the product/material specifications provided by the supplier.</p>
                            </div>
                              <?php echo form_open(base_url(''),array('class'=>"form-horizontal add_dc_raw_material", 'id'=>"add_dc_raw_material")); ?>
                            <div class="card-body">
                           
                            <h3>Raw Material</h3>
                                <div class="basic-form">
                                    <?php if($this->session->flashdata('add_raw_material_success')){ ?>
                            <div class="alert alert-success solid" style='text-align:center;'><?php echo $this->session->flashdata('add_raw_material_success'); ?></div>
                        <?php } ?>
                                    <div id='add_raw_material_success' class='alert alert-success solid' style="display: none;">
                                      
                                    </div>  

                                        
                                        <div class="form-row">
                                            <div class="form-group col-md-3">
                                                <label><strong>Size</strong></label>
                                                <div class="">
                                                	<select id="size" name="size" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Weight</strong></label>
                                                <div class=""><select id="weight" name="weight" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Color</strong></label>
                                                <div class=""><select id="color" name="color" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Brand /Grade</strong></label>
                                                <div class=""><select id="brand_grade" name="brand_grade" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>
                                           
                                        </div>
                                        

                                         <div class="form-row">
                                            <div class="form-group col-md-3">
                                                <label><strong>Bag Condition</strong></label>
                                                <div class=""><select id="bag_condition" name="bag_condition" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Oil,Grease,Stains</strong></label>
                                                <div class=""><select name="oil_grease" id="oil_grease" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Insects</strong></label>
                                                <div class=""><select id="insects" name="insects" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Quantity</strong></label>
                                                <div class=""><select id="quantity" name="quantity" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>
                                           
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label><strong>Consignment:</strong></label>
                                            </div>
                                                
                                        </div>

                                        <div class="form-row">
                                         <div class="form-group col-md-4">
                                           
                                                    <div class=""><select id="consignment" name="consignment" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="3">Reject</option>
                                                    <option value="4">Hold</option>
                                                    </select>
                                            </div>
                                            </div>
                                        </div>

                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label>The Products conform to the Specification:</label>
                                            </div>
                                                
                                        </div>
                                        <div class="form-row">
                                         <div class="form-group col-md-4">
                                           
                                                    <div class="">
                                                        <select id="conform_spec" name="conform_spec" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">Yes</option>
                                                    <option value="2">No</option>
                                                    </select>
                                            </div>
                                            </div>
                                        </div>


                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label>Remarks:</label>
                                            <textarea class="form-control" name="remarks" rows="4" id="remarks"></textarea>
                                        </div>
                                    </div>
                                    <!-- <input type="hidden" name="po_id" id="po_id" value="<?php echo $get_qc_view[0]['po_id']; ?>">
                                    <input type="hidden" name="dc_id" id="dc_id" value="<?php echo $get_qc_view[0]['dc_id']; ?>">
                                    <input type="hidden" name="material_id" id="material_id" value="<?php echo $get_qc_view[0]['material_id']; ?>">
                                    <input type="hidden" name="qty" id="qty" value="<?php echo $get_qc_view[0]['qty']; ?>">
                                    <input type="hidden" name="user_id" id="user_id" value="<?php echo $this->session->userdata('id');?>">
                                    
                                        <input type="hidden" name="created" id="created" value="<?php echo date('Y-m-d H:i:s'); ?>" class="form-control required">
                                         <input type="hidden" value="<?php echo date('Y-m-d H:i:s'); ?>" name="modified" id="modified" class="form-control required">
                                        <button type="submit" class="btn btn-primary">Submit QC & Print</button> -->
                                    
                                       
                                </div>
                             <?php form_close();?>
                            </div>
                        </div>
                    </div>

                    <?php }else if($material_type==2){?> 

                        

                    	<div class="col-xl-12 col-xxl-12 col-lg-12">
                        <div class="card">
                            <div class="card-header">
                                <p>Remarks by QC: Please refer to the product/material specifications provided by the supplier.</p>
                            </div>
                            
                            <div class="card-body">
                              <?php echo form_open(base_url(''),array('class'=>"form-horizontal add_dc_packing_material", 'id'=>"add_dc_packing_material")); ?>
                                        
                            <h3>Packing Material</h3>
                                <div class="basic-form">
                                 
                             <?php if($this->session->flashdata('add_dc_packing_material123')){ ?>
                            <div class="alert alert-success solid" style='text-align:center;'><?php echo $this->session->flashdata('add_dc_packing_material123'); ?></div>
                                <?php } ?>
                                    <div id='add_dc_packing_material123' class='alert alert-success solid' style="display: none;">
                                      
                                    </div>  
                                        <div class="form-row">
                                            <div class="form-group col-md-3">
                                                <label><strong>Dimensions</strong></label>
                                                <div class="">
                                                	<select id="dimensions" name="dimensions" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Thickness</strong></label>
                                                <div class=""><select id="thickness" name="thickness" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Printing</strong></label>
                                                <div class=""><select id="printing" name="printing" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Burst Strength</strong></label>
                                                <div class=""><select id="burst_strength" name="burst_strength" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>
                                           
                                        </div>
                                        

                                         <div class="form-row">
                                            <div class="form-group col-md-3">
                                                <label><strong>Crush Strength</strong></label>
                                                <div class=""><select id="crush_strength" name="crush_strength" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Oil,Grease,Stain</strong></label>
                                                <div class=""><select id="oil_grease" name="oil_grease" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Insects</strong></label>
                                                <div class=""><select id="insects" name="insects" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Smell</strong></label>
                                                <div class=""><select id="smell" name="smell" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>
                                           
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label><strong>Consignment:</strong></label>
                                            </div>
                                                
                                        </div>

                                        <div class="form-row">
                                         <div class="form-group col-md-4">
                                           
                                                    <div class=""><select id="consignment" name="consignment" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="3">Reject</option>
                                                    <option value="4">Hold</option>
                                                    </select>
                                            </div>
                                            </div>
                                        </div>

                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label>The Products conform to the Specification:</label>
                                            </div>
                                                
                                        </div>
                                        <div class="form-row">
                                         <div class="form-group col-md-4">
                                           
                                                    <div class=""><select id="conform_spec" name="conform_spec" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">Yes</option>
                                                    <option value="2">No</option>
                                                    </select>
                                            </div>
                                            </div>
                                        </div>


                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label>Remarks:</label>
                                            <textarea class="form-control" rows="4" id="remarks" name="remarks"></textarea>
                                        </div>
                                    </div>
                                       <!--  <input type="hidden" name="po_id" id="po_id" value="<?php echo $get_qc_view[0]['po_id']; ?>">
                                    <input type="hidden" name="dc_id" id="dc_id" value="<?php echo $get_qc_view[0]['dc_id']; ?>">
                                    <input type="hidden" name="material_id" id="material_id" value="<?php echo $get_qc_view[0]['material_id']; ?>">
                                    <input type="hidden" name="qty" id="qty" value="<?php echo $get_qc_view[0]['qty']; ?>">
                                    <input type="hidden" name="user_id" id="user_id" value="<?php echo $this->session->userdata('id');?>">
                                    
                                        <input type="hidden" name="created" id="created" value="<?php echo date('Y-m-d H:i:s'); ?>" class="form-control required">
                                         <input type="hidden" value="<?php echo date('Y-m-d H:i:s'); ?>" name="modified" id="modified" class="form-control required"> -->

                                        <button type="submit" class="btn btn-primary">Submit QC & Print</button>
                                    <?php form_close();?>
                                </div>
                            
                            </div>
                        </div>
                    </div>


                    <?php }else{?>

                        <div class="col-xl-12 col-xxl-12 col-lg-12">
                        <div class="card">
                            <div class="card-header">
                                <p>Remarks by QC: Please refer to the product/material specifications provided by the supplier.</p>
                            </div>
                            
                            <div class="card-body">
                           <?php echo form_open(base_url(''),array('class'=>"form-horizontal add_dc_product", 'id'=>"add_dc_product")); ?>
                                   
                            <h3>Products</h3>
                                <div class="basic-form">
                                   <?php if($this->session->flashdata('add_dc_product123')){ ?>
                            <div class="alert alert-success solid" style='text-align:center;'><?php echo $this->session->flashdata('add_dc_product123'); ?></div>
                                <?php } ?>
                                    <div id='add_dc_product123' class='alert alert-success solid' style="display: none;">
                                      
                                    </div>  
                                        
                                       <div class="form-row">
                                            <div class="form-group col-md-3">
                                                <label><strong>Dimensions</strong></label>
                                                <div class="">
                                                    <select id="dimensions" name="dimensions" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Thickness</strong></label>
                                                <div class=""><select id="thickness" name="thickness" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Printing</strong></label>
                                                <div class=""><select id="printing" name="printing" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Burst Strength</strong></label>
                                                <div class=""><select id="burst_strength" name="burst_strength" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>
                                           
                                        </div>
                                        

                                         <div class="form-row">
                                            <div class="form-group col-md-3">
                                                <label><strong>Crush Strength</strong></label>
                                                <div class=""><select id="crush_strength" name="crush_strength" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Oil,Grease,Stain</strong></label>
                                                <div class=""><select id="oil_grease" name="oil_grease" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Insects</strong></label>
                                                <div class=""><select id="insects" name="insects" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>

                                            <div class="form-group col-md-3">
                                                <label><strong>Smell</strong></label>
                                                <div class=""><select id="smell" name="smell" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="2">Not OK</option>
                                                    </select>
                                            </div>
                                            </div>
                                           
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label><strong>Consignment:</strong></label>
                                            </div>
                                                
                                        </div>

                                        <div class="form-row">
                                         <div class="form-group col-md-4">
                                           
                                                    <div class=""><select id="consignment" name="consignment" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">OK</option>
                                                    <option value="3">Reject</option>
                                                    <option value="4">Hold</option>
                                                    </select>
                                            </div>
                                            </div>
                                        </div>

                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label>The Products conform to the Specification:</label>
                                            </div>
                                                
                                        </div>
                                        <div class="form-row">
                                         <div class="form-group col-md-4">
                                           
                                                    <div class=""><select id="conform_spec" name="conform_spec" class="form-control" tabindex="-98">
                                                    <option selected="">Choose Option</option>
                                                    <option value="1">Yes</option>
                                                    <option value="2">No</option>
                                                    </select>
                                            </div>
                                            </div>
                                        </div>


                                        <div class="form-row">
                                            <div class="form-group col-md-8">
                                                <label>Remarks:</label>
                                            <textarea class="form-control" rows="4" id="remarks" name="remarks"></textarea>
                                        </div>
                                    </div>
                                    <!--  <input type="hidden" name="po_id" id="po_id" value="<?php echo $get_qc_view[0]['po_id']; ?>">
                                    <input type="hidden" name="dc_id" id="dc_id" value="<?php echo $get_qc_view[0]['dc_id']; ?>">
                                    <input type="hidden" name="product_id" id="product_id" value="<?php echo $get_qc_view[0]['product_id']; ?>">
                                    <input type="hidden" name="qty" id="qty" value="<?php echo $get_qc_view[0]['qty']; ?>">
                                    <input type="hidden" name="user_id" id="user_id" value="<?php echo $this->session->userdata('id');?>">
                                    
                                        <input type="hidden" name="created" id="created" value="<?php echo date('Y-m-d H:i:s'); ?>" class="form-control required">
                                         <input type="hidden" value="<?php echo date('Y-m-d H:i:s'); ?>" name="modified" id="modified" class="form-control required"> -->

                                        <button type="submit" class="btn btn-primary">Submit QC & Print</button>
                                   <?php form_close();?>
                                </div>
                            
                            </div>
                        </div>
                    </div>
</body>
                     <?php  $this->load->view('footer'); ?>
        

                        <?php } ?>

                        <script type="text/javascript">
                 
             

                           var add_dc_raw_material = $('#add_dc_raw_material');   
    
                                add_dc_raw_material.on('submit',function(e){

                                    e.preventDefault();
                                    var dc_id = $("#dc_id").val();
                                    var add_dc_raw_materialdata = add_dc_raw_material.serialize();
                                    $.ajax({
                                            type:'POST',
                                            url:'<?php echo base_url('order_qc/add_qc_dc_check_raw_material'); ?>',
                                            data:add_dc_raw_materialdata,
                                            dataType:'json',
                                            success:function(data){
                                                console.log('first'+data);
                                                  if(data.status === 'true'){
                                                    console.log('second'+data.id);
                                                    $('#add_raw_material_success').show().html('Check List added Successfully');
                                                   setTimeout(function(){location.href="<?php echo base_url('order_qc/active_in_store_print/'); ?>"+dc_id} , 3000);
                                                }else{
                                                    console.log('third'+data);          
                                                }
                                            },
                                            error:function(data){console.log(data.responseText);}
                                        });
                                    //}
                                });



                           var add_dc_packing_material = $('#add_dc_packing_material');   
    
                                add_dc_packing_material.on('submit',function(e){

                                    e.preventDefault();
                                    
                                    var add_dc_packing_materialdata = add_dc_packing_material.serialize();
                                  
                                        $.ajax({
                                            type:'POST',
                                            url:'<?php echo base_url('order_qc/add_dc_packing_material'); ?>',
                                            data:add_dc_packing_materialdata,
                                            dataType:'json',
                                            success:function(data){
                                                console.log('first'+data.status);
                                                if(data.status !=''){
                                                    console.log('second'+data.id);
                                                    $('#add_dc_packing_material123').show().html('Check List added Successfully');
                                                   setTimeout(function(){location.href="<?php echo base_url('order_qc/active_in_store_print/'); ?>"+data} , 3000);
                                                }else{
                                                    console.log('third'+data);          
                                                }
                                            },
                                            error:function(data){console.log(data.responseText);}
                                        });
                                    //}
                                });



                                var add_dc_product = $('#add_dc_product');   
    
                                add_dc_product.on('submit',function(e){

                                    e.preventDefault();
                                    
                                    var add_dc_productdata = add_dc_product.serialize();
                                  
                                        $.ajax({
                                            type:'POST',
                                            url:'<?php echo base_url('order_qc/add_dc_product'); ?>',
                                            data:add_dc_productdata,
                                            dataType:'json',
                                            success:function(data){
                                                if(data.status !=''){
                                                    console.log('second'+data.id);
                                                    $('#add_dc_product123').show().html('Check List added Successfully');
                                                   setTimeout(function(){location.href="<?php echo base_url('order_qc/active_in_store_print/'); ?>"+data} , 3000);
                                                }else{
                                                    console.log('third'+data);          
                                                }
                                            },
                                            error:function(data){console.log(data.responseText);}
                                        });
                                    //}
                                });

                                
             </script>
</html> 