<!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>Report Bills</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);">Daily Sheet</a></li>
                            <li class="breadcrumb-item active"><a href="javascript:void(0);">Add Daily Sheet</a></li>
                        </ol>
                    </div>
                </div>
                
                <div class="row">


<div class="col-12">
    <div class="card">
        <div class="card-header">
          
   <div class="modal-body">

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

            <div class="col-xl-12 col-xxl-12 col-sm-12">
                <div class="card">
                    <div class="card-header">
                        <h5 class="card-title">Report Bill</h5>
                    </div>
                    <div class="card-body">
                            <div class="row">
                            <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="form-group">
                                        <label class="form-label">Parties:</label>
                                       <select name="parties" id="parties" data-live-search="true" class="form-control">
                                           <option value="">Select Party</option>
                                           <?php foreach ($get_company as  $value) { ?>
                                           <option value="<?php echo $value['p_id']; ?>"><?php echo $value['name']; ?></option>
                                           <?php } ?>
                                       </select>
                                    </div>
                                </div> 

                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="form-group">
                                        <label class="form-label">Sales Order #:</label>
                                       <select name="so_id" id="so_id" data-live-search="true" class="form-control">
                                           <option value="">Select S.O</option>
                                           <?php foreach ($so_data as  $value) { ?>
                                               
                                           <option value="<?php echo $value['id']; ?>"><?php echo $value['so_no']; ?></option>
                                           <?php } ?>
                                       </select>
                                    </div>
                                </div> 
                                
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="form-group">
                                        <label class="form-label">Bill #:</label>
                                       <select name="bill_no" id="bill_no" data-live-search="true" class="form-control">
                                           <option value="">Select Bill</option>
                                           <?php foreach ($bill_no as  $value) { ?>
                                               
                                           <option value="<?php echo $value['bill_no']; ?>"><?php echo $value['bill_no']; ?></option>
                                           <?php } ?>
                                       </select>
                                    </div>
                                </div> 
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="form-group">
                                        <label class="form-label">Start Date:</label>
                                       <input type="date" name="date" id="date" placeholder="Date" class="form-control">
                                    </div>
                                </div>
                              
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="form-group">
                                        <label class="form-label">End Date:</label>
                                       <input type="date" name="enddate"  id="enddate" placeholder="Date" class="form-control">
                                    </div>
                                </div>  
                            </div>
                    </div>
                </div>
            </div>
            <button type="submit" id="dis_submit" class="btn btn-primary">Submit <i class="icon-arrow-right14 position-right"></i></button>


        </div>
      
            <?php form_close();?>
   
                            </div>
                            <div class="card-body" id="filter_daily_sheet" >
                                 
                              
                                   
                            </div>
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>

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


        <!--**********************************
            Footer start
        ***********************************-->
        <div class="footer">
            <div class="copyright">
                <p>Copyright © Designed &amp; Developed by  2020</p>
            </div>
        </div>
        <!--**********************************
            Footer end
        ***********************************-->

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

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


    </div>
    <script src="<?php echo base_url();?>assets/js/jjquery.min.js"></script>
        <style>
        .redborder{
            border:1px solid red;
        }
        </style>





   <script type='text/javascript'>

    

$("#self_life_start").keyup(function() {

  var self_life = $('#self_life').val();
 var self_life_start = $('#self_life_start').val();
   var total = self_life-self_life_start;
 var output=parseInt(total).toLocaleString(); 
  $('#self_life_remain').val(output);
});



        
 var sheet = $('#filter_sheet');   

sheet.on('submit',function(e){


e.preventDefault();

var add_sheet = sheet.serialize();
 var emp_id = $('#emp_id').val();
    
    $.ajax({
        type:'POST',
        url:'<?php echo base_url('sales_order/complete_bills_reports'); ?>',
        data:add_sheet,
        dataType:'json',
        success:function(data){
            console.log('first'+data);
         $('#filter_daily_sheet').show().html(data.html);
            
             //$('#filter_daily_sheet').show(filter_data);
        },
        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>