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

    <!--*******************
        Preloader start
    ********************-->
        <div id="preloader">
        <div class="sk-three-bounce">
            <div class="sk-child sk-bounce1"></div>
            <div class="sk-child sk-bounce2"></div>
            <div class="sk-child sk-bounce3"></div>
        </div>
    </div>
    <!--*******************
        Preloader end
    ********************-->

    <!--**********************************
        Main wrapper start
    ***********************************-->
    <div id="main-wrapper">

      <?php  $this->load->view('header'); ?>
        
        <!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body">
            <!-- row -->
            <div class="container-fluid">
            
                <div class="row page-titles mx-0">
                    <div class="col-sm-6 p-md-0">
                        <div class="welcome-text">
                            <h4>Add Raw Material Mixing Order Form</h4>
                        </div>
                    </div>
                    <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="index.html">Home</a></li>
                            <li class="breadcrumb-item active"><a href="javascript:void(0);">Mixing Order</a></li>
                            <li class="breadcrumb-item active"><a href="javascript:void(0);">Add </a></li>
                        </ol>
                    </div>
                </div>
        
        <div class="row">
          <div class="col-xl-12 col-xxl-12 col-sm-12">
                        <div class="card">
                            <div class="card-header">
                <!-- <h5 class="card-title">Basic Info</h5> -->
              </div>
              <div class="card-body">
                 <form action="#" method="post">
                  <div class="row">
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Area Clearance</label>
                        <select name="area_clearance" id="area_clearance" class="form-control">
                          <option value="">Select Option</option>
                          <option value="Yes">ہاں</option>
                          <option value="No">نہیں</option>
                          </select>
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Item</label>
                        <input type="text" name="item_id" id="item_id" class="form-control">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Machine</label>
                        <input type="text" id="machine" name="machine" class="form-control">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Time</label>
                        <input type="time" name="time" id="time" class="datepicker-default form-control" id="datepicker">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Lot No</label>
                        <input type="text" name="grn_id" id="grn_id" class="form-control">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Powder of Bags-Kg</label>
                        <input type="text" name="powder_of_begs" id="powder_of_begs" class="form-control">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Crush-Kg</label>
                        <input type="text" id="crush_kg" name="crush_kg" class="form-control">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Colour Ratio/Bags grm</label>
                        <input type="text" name="colour_ratio" id="colour_ratio" class="form-control">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Total Weight Kg</label>
                        <input type="text" name="total_weight" id="total_weight" class="form-control">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">Store Incharge</label>
                      <input type="text" name="store_incharge" id="store_incharge" class="form-control">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">کام مکمل کرنے والے کا نام</label>
                        <input name="text" class="form-control" name="work_complete_process" id="work_complete_process">
                      </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-12">
                      <div class="form-group">
                        <label class="form-label"> کے مطابق ہے SOPکام</label>
                        <input type="text" class="form-control" name="work_in_sop" id="work_in_sop">
                      </div>
                    </div>
                    <div class="col-lg-12 col-md-12 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">مال کے کتنے بورے بنے</label>
                        <input type="text" class="form-control" id="item_complete_begs" name="item_complete_begs"> 
                      </div>
                    </div>

                    <div class="col-lg-12 col-md-12 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">تمام بیگ پر سٹیکر لگا دے</label>
                        <input type="text" class="form-control" id="sticker_in_begs" name="sticker_in_begs" >
                      </div>
                    </div>

                    <div class="col-lg-12 col-md-12 col-sm-12">
                      <div class="form-group">
                        <label class="form-label">دانا مشین پر پوھنچا دیا ہے</label>
                        <input type="text" name="material_in_machine" id="material_in_machine" class="form-control">
                      </div>
                    </div>
                    
                    <div class="col-lg-12 col-md-12 col-sm-12">
                      <button type="submit" class="btn btn-primary">Submit</button>
                      <button type="submit" class="btn btn-light">Cencel</button>
                    </div>
                  </div>
                </form>
                            </div>
                        </div>
                    </div>
        </div>
            </div>
        </div>
            </div>
       
        <!--**********************************
            Content body end
        ***********************************-->


        <!--**********************************
            Footer start
        ***********************************-->
        
        <!--**********************************
            Footer end
        ***********************************-->

        <!--**********************************
           Support ticket button start
        ***********************************-->

        <!--**********************************
           Support ticket button end
        ***********************************-->


    </div>
    <!--**********************************
        Main wrapper end
    ***********************************-->

    <!--**********************************
        Scripts
    ***********************************-->
    <!-- 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'>
        
    var add_order = $('#add_sales_order');   
    
    add_order.on('submit',function(e){

        e.preventDefault();
        
        var add_add_order = add_order.serialize();
         //var id = $('#main_product').val();
      
            $.ajax({
                type:'POST',
                url:'<?php echo base_url('Sales_order/all_sales_order'); ?>',
                data:add_add_order,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    if(data.status === 'true'){
                        console.log('second'+data.status);
                        $('#sales_order_success').show().html('Sales Order added Successfully');
                       setTimeout(function(){location.href="<?php echo base_url('Sales_order/all_sales_order/'); ?>"} , 2000);
                    }else{
                        console.log('third'+data);          
                    }
                },
                error:function(data){console.log(data.responseText);}
            });
       // }
    });

    function delete_data(id) { 
        var id = id;
        if (confirm('Are you sure you want to Delete.?')) {
  

        var pro_id = $('#product_id').val();
         $.ajax({
                type:'POST',
                url:'<?php echo base_url('Masterlist/bom_delete_material/'); ?>'+id,
                data:id,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    
                        console.log('second'+data.status);
                        //debugger;
                        $('#material_bom_danger').show().html('Bom Component Deleted Successfully');
                       setTimeout(function(){location.href="<?php echo base_url('Masterlist/boms_details/'); ?>"+pro_id} , 2000);
                    
                },
                error:function(data){console.log(data.responseText);}
            });

         } else {
  
            }
        } 



        $("#party_id").change(function() {
    
        var id =  this.value;

        $.ajax({
                    type:'POST',
                    url:'<?php echo base_url('Sales_order/parties_code'); ?>',
                    data:{id:id},
                    dataType:'json',
                    success:function(data){
                        //console.log(data[0].material_code);
                        $('.party_code').val(data[0].party_code);
                        //$('.code').val(data[0].pro_code);
                       
                       //$('.weight').val(data[0].weight);
                       
                    },
                    error:function(data){console.log(data.responseText);}
                });

    });



 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> 