<!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 View Expense</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);">ADD Expense</a></li>
                            <li class="breadcrumb-item active"><a href="javascript:void(0);"></a></li>
                        </ol>
                    </div>
                </div>
        
        <div class="row">


      <div class="col-12">
          <div class="card">
              <div class="card-header">
                
                                    
                                                
      <?php echo form_open(base_url(''),array('class'=>"form-horizontal add_qc_machine", 'id'=>"add_qc_machine")); ?>
                            
        <div class="col-xl-12 col-xxl-12 col-sm-12">
           <div class="card">
              <div class="card-header">
                  <h5 class="card-title"></h5>
              </div>
                  <div class="card-body">
                <div id='vendor_success' class='alert alert-success solid' style='display:none;'></div>
          <div class="row">

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

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

                           <div class="col-lg-3 col-md-6 col-sm-12">
                           <div class="form-group">
                                <label class="form-label">Name Of Expense:</label>
                                  <input type="text" id="name" name="name" required="required"  class="form-control name">
                             </div> 
                             
                           </div>


                           <div class="col-lg-3 col-md-6 col-sm-12">
                           <div class="form-group">
                                <label class="form-label">Amount:</label>
                                  <input type="number" id="amount" name="amount" required="required"  class="form-control amount">
                             </div> 
                             
                           </div>



                        <div class="col-lg-6 col-md-6 col-sm-12">
                            <div class="form-group">
                                <label class="form-label">Remarks:</label>
                                <textarea  class="form-control remarks" name="remarks" id="remarks"></textarea>  
                             </div>
                         </div>
                        
                 </div>
                  <button type="submit" id="dis_submit" class="btn btn-primary">Save <i class="icon-arrow-right14 position-right"></i></button>
                    </div>
                                        
                                  </div>
                              </div></div>
                    
                              <?php form_close();?>
                              <div class="card-body">
                                
                                <div class="table-responsive">
                                    <table id="example5" class="display" style="min-width: 845px;font-size: 12px;">

                                        <thead>
                                            <tr>
                                                <th>Name Of Expense</th>
                                                <th>Amount</th>
                                                <th>Remarks</th>
                                                
                                                <th>Date</th>
                                                
                                                <th>Action</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                           
                                          <?php
                                                if(!empty($get_data)){
                                             foreach($get_data as $get_expenses){ ?>
                                            <tr>
                                               
                                                <td><?php echo $get_expenses['name']; ?></td>
                                                <td><?php echo $get_expenses['amount']; ?></td>
                                                <td><?php echo $get_expenses['created']; ?></td>
                                               
                                                <td>
                                                    <a href="<?php //echo base_url('Order_qc/edit_machine_qc/'.$get_expenses['id']); ?>" class="btn btn-sm btn-primary"><i class="la la-pencil"></i></a>
                                                   
                                                </td>                                               
                                            </tr>
                                           <?php }
                                                }
                                            ?> 
                                        </tbody>
                                    </table>
                                </div>


                            </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="<?php echo base_url();?>assets/js/jjquery.min.js"></script>
        <style>
        .redborder{
            border:1px solid red;
        }
        </style>

   <script type='text/javascript'>
        
       var add_qc_machines = $('#add_qc_machine');   
    
    add_qc_machines.on('submit',function(e){
      $("#dis_submit").attr('disabled', true);
        e.preventDefault();
        
        var add_qc_machinesdata = add_qc_machines.serialize();
        
      
            $.ajax({
                type:'POST',
                url:'<?php echo base_url('Admin/add_expense'); ?>',
                data:add_qc_machinesdata,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    if(data.status === 'true'){
                        console.log('second'+data.status);
                        $('#add_qc_machines').show().html('added Successfully');
                       location.href="<?php echo base_url('Admin/add_expense'); ?>";
                    }else{
                        console.log('third'+data);          
                    }
                },
                error:function(data){console.log(data.responseText);}
            });
       // }
    });

    function delete_data(id) { 
        var id = id;
        
         $.ajax({
                type:'POST',
                url:'<?php echo base_url('Admin/delete_party/'); ?>'+id,
                data:id,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    
                        console.log('second'+data.status);
                        //debugger;
                        $('#party_danger').show().html('Party Deleted Successfully');
                       setTimeout(function(){location.href="<?php echo base_url('Admin/company'); ?>"} , 3000);
                    
                },
                error:function(data){console.log(data.responseText);}
            });
        } 


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