<!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 Associates</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>
.loader {
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #3498db;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 2s linear infinite; /* Safari */
  animation: spin 2s linear infinite;
}

/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
</style>
     

</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>Stock</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);">All STOCK</a></li>
                          
                        </ol>
                    </div>
                </div>
                
               
            <div class="row">

                    <div class="col-12">
            
                             <?php echo form_open(base_url(''),array('class'=>"form-horizontal report_stock", 'id'=>"report_stock")); ?>   
                            
                          <div class="col-xl-12 col-xxl-12 col-sm-12">
                             <div class="card">

                               
                                <div class="card-body">
                                   <div class="row">

                                    <div class="col-lg-3 col-md-6 col-sm-12">

                                                <div class="form-group">
                                                    <label class="form-label">Report:</label>
                                                    <select  data-live-search="true" name="mode" required="required" id="mode">
                                                        <option>Select Report</option>
                                                      
                                                            <option value="1">FG</option>
                                                            <option value="2">Semi Finish</option>
                                                             <option value="3">Packing</option>
                                                             <option value="4">Raw Material</option>
                                                             <option value="5">Color</option>
                                                             <option value="6">Production Compound</option>
                                                             <option value="7">Wast </option>
                                                             <option value="8">Production Return Stock</option>
                                                    </select>
                                                 </div>
                                                </div>
                                     
                                         </div>

                                          <button type="submit" id="dis_submit" class="btn btn-primary">Filter <i class="icon-arrow-right14 position-right"></i></button>
                                         
                                       
                                        </div>

                                    <div class="col-lg-12">
                             <div class="card-body">
                                   <div id='party_danger' class='alert alert-danger solid' style='display:none;width: 25%;'></div>

                                <div class="table-responsive">
                                   
                                <div class="loader" style="display:none;"></div>


                                    <div id="filter_data">
                                           
                                        
                                </div>


                            </div>
                          </div>    

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



                   
                </div>
            </div>
       
        <!--**********************************
            Content body end
        ***********************************-->


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

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

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


    </div>
    

   


       <?php  $this->load->view('footer'); ?>
        
</body>
<script type="text/javascript">


  
 var report_stock = $('#report_stock');   
    
    report_stock.on('submit',function(e){
        $("#dis_submit").attr('disabled', true);
        e.preventDefault();
        
        
        $(".loader").css("display", "block");
        var report_stocks = report_stock.serialize();
         //var id = $('#main_product').val();
      
            $.ajax({
                type:'POST',
                url:'<?php echo base_url('Stock/stock_report'); ?>',
                data:report_stocks,
                dataType:'json',
                success:function(data){
                    $(".loader").css("display", "none");
                    $("#dis_submit").attr('disabled', false);
                  $('#filter_data').show().html(data.html);
                    
                },
                error:function(data){console.log(data.responseText);}
            });
       // }
    });


$("#btnPrint").change(function() {

                
    
                var id =  this.value;
                alert(id);
               
                $.ajax({
                            type:'POST',
                            url:'<?php echo base_url('Stock/get_pdf'); ?>',
                            data:{id:id},
                            dataType:'json',
                            success:function(data){
                            
                                    
                                    //$('#mode_select').show().html(data.html);
                               
                            },
                            error:function(data){console.log(data.responseText);}
                        });
                 });

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