               
                    <?php echo form_open_multipart(base_url(''),array('class'=>"form-horizontal add_clear", 'id'=>"add_clear")); ?>
        

                      <?php if($this->session->flashdata('product_success')){ ?>
                            <div class="alert alert-success solid" style='text-align:center;'><?php echo $this->session->flashdata('product_success'); ?></div>
                        <?php } ?>           

                         <div class="col-xl-12 col-xxl-12 col-sm-12">
                            <div class="card">
                                
                                <div class="card-body">
                                    <div id='product_success' class='alert alert-success solid' style='display:none;'></div>
                                        <div class="row">
                                            <input type="hidden" name="production_id" value="<?php echo $this->uri->segment('3'); ?>">
                                             <div class="col-lg-6 col-md-6 col-sm-12">
                                                <div class="form-group">
                                                   
                                                    <input type="hidden" name="created" id="created" value="<?php echo date('Y-m-d H:i:s'); ?>" class="form-control required">
                                                </div>
                                            </div>

                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <div class="form-group">
                                                   
                                                    <input type="hidden" value="<?php echo date('Y-m-d H:i:s'); ?>" name="modified" id="modified" class="form-control required">
                                                </div>
                                            </div>
                                       


                                            
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <div class="form-group">
                                                    <label class="form-label">کیا پہرانے ائئٹم کے خام مال کو ہٹا دیا گیا ھے</label>
                                                    <select name="clear1" id="clear1"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>

                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <div class="form-group">
                                                    <label class="form-label">کیا پرانے آئیٹم کی دستاویزات ہٹادی گئی ہیں</label>
                                            <select name="clear2" id="clear2"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>

                                        
                                            <div class="col-lg-6 col-md-6 col-sm-12" id="name_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا پرانے آئیٹم کی ڈرائنگ ہٹادی ہیں</label>
                                                        <select name="clear3" id="clear3"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12" id="weight_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا پرانا تیارا ئیٹم ہٹادیا گیا ہے۔</label>
                                                      <select name="clear4" id="clear4"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>

                                            <div class="col-lg-6 col-md-6 col-sm-12" id="apperence_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا پرانے آئیٹم کی ریجیکشن کو بتادیا ہے</label>
                                                        <select name="clear5" id="clear5"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>

                                            <div class="col-lg-6 col-md-6 col-sm-12" id="engrave_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا پرانے تیار آئیٹم کی ٹیکنک کو ہٹادیا ہے</label>
                                                        <select name="clear6" id="clear6"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>
                                            

                                            <div class="col-lg-6 col-md-6 col-sm-12" id="color_code_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا  کوارنٹائن ایریا کو خالی کر دیا ہے</label>
                                                        <select name="clear7" id="clear7"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>
                                            
                                            <div class="col-lg-6 col-md-6 col-sm-12" id="color_ratio_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا نئے آئیٹم کی ڈرائنگ مل گئی ہے</label>
                                                        <select name="clear8" id="clear8"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>


                                            <div class="col-lg-6 col-md-6 col-sm-12" id="rollsize_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا مولڑ مشین پر لگ گیا ہے</label>
                                                        <select name="clear9" id="clear9"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>


                                            <div class="col-lg-6 col-md-6 col-sm-12" id="printing_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا نئے آئیٹم کی ٹیکنک مل گئی ہے</label>
                                                        <select name="clear10" id="clear10"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>


                                           

                                             <div class="col-lg-6 col-md-6 col-sm-12" id="salophine_size_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیانئے آئیٹم کا خال مال مل گیا ہے</label>
                                                        <select name="clear11" id="clear11"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>

                                             <div class="col-lg-6 col-md-6 col-sm-12" id="salophine_qty_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا خالی تھیلیاں مل گئ ہیں</label>
                                                        <select name="clear12" id="clear12"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>


                                            <div class="col-lg-6 col-md-6 col-sm-12" id="carton_div">
                                                <div class="form-group">
                                                    <label class="form-label">کیا مشین کےاطراف  صاف ہے</label>
                                                        <select name="clear13" id="clear13"  required="required"  class="form-control" tabindex="-98">
                                                        <option value="">Select Option</option>
                                                        <option value="1">Yes</option>
                                                        <option value="0">No</option>
                                                        </select>
                                                </div>
                                            </div>
                                            
                                           
                                             <div class="col-lg-6 col-md-6 col-sm-12" id="carton_div">
                                                <div class="form-group">
                                                    <label class="form-label">Remarks</label>
                                                       <textarea name="remarks" id="remarks"> </textarea>
                                                </div>
                                            </div>
                                       
                                   
                                    <input type="hidden" value="<?php echo date('Y-m-d H:i:s'); ?>" name="created" id="created" class="form-control required">
                                

                              <input type="hidden" name="user_id" id="user_id" value="<?php echo $this->session->userdata('id');?>">

                       
                        <input type="hidden" name="so_id" id="so_id" value="<?php echo $get_details_mould[0]['so_id']; ?>">

                        
                         <input type="hidden" name="product_id" id="product_id" value="<?php echo product_id($get_details_mould[0]['product_name']); ?>">
                       
                                            
                                        </div>
                                    <div class="modal-footer">
                                
                                <button type="submit" id="dis_submit" class="btn btn-primary">Submit <i class="icon-arrow-right14 position-right"></i></button>
                            </div>  
                                </div>
                            </div>
                        </div>
                         
                   
               
                                    <?php form_close();?>
                           

	<!-- Required vendors -->
              <script src="<?php echo base_url();?>assets/js/jjquery.min.js"></script>

    <script type='text/javascript'>

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

        e.preventDefault();
        
        var cleardata = clear.serialize();
        if (confirm('Are you sure you want to Add Line Clearence.?')) {

      
            $.ajax({
                type:'POST',
                url:'<?php echo base_url('Requisition/add_production_machine_status'); ?>',
                data:cleardata,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    if(data.status === 'true'){
                        console.log('second'+data.status);
                        $('#product_success').show().html('Line Clearence added Successfully');
                       setTimeout(function(){location.href="<?php echo base_url('Requisition/line_clerence'); ?>"} , 3000);
                    }else{
                        console.log('third'+data);          
                    }
                },
                error:function(data){console.log(data.responseText);}
            });
        }
    });

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