<?php include "layouts/menu.php"; ?> 
 <style>
  .tfoot {
      font-weight:bold;
      text-transform:uppercase;
      color:@color-footer;
      text-shadow:1px 1px 1px #fff;
    }
    
    #datatable-buttons tbody tr {
    height: 100px; 
}
	</style>

	 <script>
	function autocomplett() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#zxcvb').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: 'ajax_broker.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('#qwertyu').show();
				$('#qwertyu').html(data);
			}
		});
	} else {
		$('#qwertyu').hide();
	}
}
// set_item : this function will be executed when we select an item
function set_itemmm(item) {
	// change input value
	$('#zxcvb').val(item);
	// hide proposition list
	$('#qwertyu').hide();
}
	</script>
    <!--  page-wrapper -->
         <div class="right_col" role="main">

            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                           Document View
                        </div>
						  <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post"  enctype="multipart/form-data">
  <div class="col-md-3">  <input type="date" class="form-control thicker" id="datepicker" name="fdate" value="<?php echo date("Y-m-d"); ?>" placeholder="From Date" onfocus="insertDate(this,'DD-MM-YYYY')">
    </div>
    <div class="col-md-3">   <input type="date" class="form-control thicker" id="datepicker" name="tdate" value="<?php echo date("Y-m-d"); ?>" placeholder="To Date" onfocus="insertDate(this,'DD-MM-YYYY')">
   </div>
 
   <div class="col-md-3">      <button type="submit" class="btn btn-info" name="s15">Show It</button></div>
              
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  
                  <div class="x_content">
                    <div class="row">
                      <div class="col-sm-12">
                        <div class="card-box table-responsive">
                          
                                        <?php
		
								if(isset($_POST['s15']))
								{
									extract($_POST);
									?>
                        <div class="panel-body">
                            <div class="row">
						
								<div class="table-responsive">
  <table id="datatable-buttons" id="datatable-buttons" class="table table-striped table-bordered">
					<thead>
						<tr><th>S.NO</th>
						<th>COMPANY NAME</th>
						<th>STAFF CODE</th>
						<th>DAY</th>
						<th>DATE</th>
						
					
							
						
					
					</tr></thead><tbody> <?php $gg = 0; $fff = 0; $qw = NULL; $bbb = 0;
				$qry=mysqli_query($conn, "select * from dayclose where mfin='$mfin' && ddate between '$fdate' and '$tdate' ");
					$n=mysqli_num_rows($qry);
						?></p>
					
					<?php 
					while($row=mysqli_fetch_array($qry))
						{ $gg++; $fff++;
							$mfin2 = $row['mfin'];
							$paydate = $row['hpdate']; 
				$hpamount = $row['hpamount'];
								$dueamt = $row['dueamt'];
								$interest = $row['interest'];
								$total = $row['total'];
								$tnet = $tnet + $dueamt;
								$tnet3 = $tnet3 + $hpamount;
								$tnet4 = $tnet4 + $interest;
								$tnet5 = $tnet5 + $total;
					?>
					
				<tr>
			
						<td><?php echo $fff;?></td>
						<td><?php echo $row['mfin'];?></td>
						<td><?php echo $row['scode'];?></td>
						<td><?php echo $row['day'];?></td>
						<td><?php echo $row['ddate'];?></td>
						
	
					</tr>
					<?php
						}
				
			?></tbody>	
						<td><b></b></td>
						<td><b></b></td>
						<td><b></b></td>
						<td><b></b></td>
						<td><b></b></td>
						
					
					
					
				</table>
			<b><h4><center><?php echo "Totally ".$gg." Documents"; ?></center></b></h4>	
						<?php } ?>			
					
	  </div>
</form>




</div>

</div></div>
</div></div></div></div></div></div>
       <!-- footer content -->
        <footer>
          <div class="pull-right">
             <a href="https://infossel.com">Infossel Soft Solution</a>
          </div>
          <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
      </div>
    </div>

    <!-- jQuery -->
    <script src="vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="vendors/nprogress/nprogress.js"></script>
    <!-- iCheck -->
    <script src="vendors/iCheck/icheck.min.js"></script>
    <!-- Datatables -->
    <script src="vendors/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
    <script src="vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
    <script src="vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
    <script src="vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
    <script src="vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
    <script src="vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
    <script src="vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
    <script src="vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
    <script src="vendors/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
    <script src="vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
    <script src="vendors/datatables.net-scroller/js/dataTables.scroller.min.js"></script>
    <script src="vendors/jszip/dist/jszip.min.js"></script>
    <script src="vendors/pdfmake/build/pdfmake.min.js"></script>
    <script src="vendors/pdfmake/build/vfs_fonts.js"></script>
 


    <!-- Custom Theme Scripts -->
    <script src="build/js/custom.js"></script>
  </body>
</html>

