<?php include "layouts/menu.php"; ?> 


	 <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>
                        <div class="panel-body">
                            <div class="row">
							<a href="lview5.php">Reg No Range Wise</a>
   
    <form name="form155" class="form-horizontal" method="post" action="" enctype="multipart/form-data">

 <div class="form-group has-success has-feedback">
    <label for="inputPassword3" class="col-sm-2 control-label">Start Date</label>
    <div class="col-sm-4">
      <input type="date" class="form-control" id="inputPassword3" name="fdate" value="<?php echo date("Y-m-d"); ?>" placeholder="dd-mm-yyyy" data-inputmask="'mask': '99-99-9999'" required>
	  <span class="glyphicon glyphicon-chevron-left form-control-feedback"></span>
    </div>
  </div>
   <div class="form-group has-success has-feedback">
    <label for="inputPassword3" class="col-sm-2 control-label">End Date</label>
    <div class="col-sm-4">
      <input type="date" class="form-control" id="inputPassword3" name="tdate" value="<?php echo date("Y-m-d"); ?>" placeholder="dd-mm-yyyy" data-inputmask="'mask': '99-99-9999'" required>
	  <span class="glyphicon glyphicon-chevron-right form-control-feedback"></span>
    </div>
  </div>
  <div class="form-group has-success has-feedback">
    <label for="inputPassword3" class="col-sm-2 control-label">Broker</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="zxcvb" name="bname" value="" placeholder="" onkeyup="autocomplett()">
	    <ul id="qwertyu"></ul>
	  <span class="glyphicon glyphicon-chevron-right form-control-feedback"></span>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-primary" name="s288">Search It</button>
    </div>
  </div>
      <div>
      <?php
								if(isset($_POST['s288']))
								{
								extract($_POST); ?>
								<div class="table-responsive">
  <table id="datatable-buttons" id="datatable-buttons" class="table table-striped table-bordered">
					<thead>
						<tr><th>S.No</th>
						<th>FD NO</th>
						<th>Name</th>
					
						<th>Int</th>
						<th>User Image</th>
					
							<th>-</th>
						<th>Status</th>
						
						<th>Phone No</th>
						
						<th>FD Date</th>
						<th>FD Amount</th>
							<!--<th>Prin</th>-->
							<th>Interest</th>
								<th>Created By</th>
								<th>Create Date</th>
								<th>Alt By</th>
								<th>Alt Date</th><th>Payment Mode</th>
					</tr></thead><tbody> <?php $gg = 0; $fff = 0; $qw = NULL;
					if($bname==$qw){
	$qry=mysqli_query($conn, "select * from fincust where mfin='$mfin' && hpdate5 between '$fdate' and '$tdate' order by hpl asc");
					}
else{
	$qry=mysqli_query($conn, "select * from fincust where mfin='$mfin' && bname='$bname' && hpdate5 between '$fdate' and '$tdate' order by hpl asc");
					}
					$n=mysqli_num_rows($qry);
						?></p>
					
					<?php 
					while($row=mysqli_fetch_array($qry))
						{ $gg++; $fff++;
							$mfin2 = $row['mfin'];
							$paydate = $row['hpdate'];
							$mfin2 = $row['mfin'];
							$paydate = $row['hpdate']; 
				$hpamount = $row['hpamount'];
								$dueamt = $row['dueamt'];
								$interest = $row['interest'];
								$total = $row['total'];
						
								$tnet3 = $tnet3 + $hpamount;
								$tnet4 = $tnet4 + $interest;
								$tnet5 = $tnet5 + $total;
					?>
					
				<tr>
				<td><?php echo $fff;?></td>
						<td><?php echo $row['hpl'];?></td>
						<td><?php echo $row['name']; ?></td>
						<td><?php $ffft = $row['inter']; $drd = $ffft * 12; echo round($drd,2); ?></td>
					<?php $dddd = $row['uimg']; if($dddd!= NULL) { ?>	<td><img src="user/<?php echo $row['uimg'];?>" width="40" height="40"/></td> <?php } else { ?>
					<td><img src="111.png" width="40" height="40"/></td> <?php } ?>
					
							<?php		$ss = $row['status'];
	if($ss == 'Closed') {
						?>
				<td><button class="btn btn-warning"><b>Closed</b></button></td>
	<td>
<!--<a href="finregisterf2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><i class="fa fa-print fa-2x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;-->
<!--<a href="fineditled.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;-->
<!--<a href="finfullsettle2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Full Settlement!"><i class="fa fa-close fa-2x" style="color:red;"  aria-hidden="true"></i></a>&nbsp;&nbsp;	-->
<a href="finclone.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;

<a href="finudelete.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:navi;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
				<?php }
elseif($ss == 'Reloan') { ?>
				
				<td><button class="btn btn-warning"><b>Closed-R</b></button></td> 
	<td>
<a href="finregisterf2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><i class="fa fa-print fa-2x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="fineditled.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="finfullsettle2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Full Settlement!"><i class="fa fa-close fa-2x" style="color:red;"  aria-hidden="true"></i></a>&nbsp;&nbsp;	
<a href="finclone.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;

<a href="finudelete.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:navi;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
				<?php }
				elseif($ss == 'Sized') { ?>
				
				<td><button class="btn btn-danger"><b>Seized</b></button></td>
			<td>
<a href="finregisterf2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><i class="fa fa-print fa-2x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="fineditled.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="finfullsettle2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Full Settlement!"><i class="fa fa-close fa-2x" style="color:red;"  aria-hidden="true"></i></a>&nbsp;&nbsp;	
<a href="finclone.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;

<a href="finudelete.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:navi;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
				<?php } else {?>
				<td><button class="btn btn-success"><b>Active</b></button>
				
                            
				</td> 
				
					<td>
<a href="finregisterf2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><i class="fa fa-print fa-2x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="fineditled.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="finfullsettle2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Full Settlement!"><i class="fa fa-close fa-2x" style="color:red;"  aria-hidden="true"></i></a>&nbsp;&nbsp;	
<a href="finclone.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;

<a href="finudelete.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:navi;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
</td>
				<?php }?>
	
	
	
								
						
						<td><?php echo $row['pno'];?></td>
						
						<td><?php echo $row['hpdate'];?></td>
						<td><?php echo $row['hpamount'];?></td>
						<!--<td><?php echo $row['dueamt'];?></td>-->
						<td><?php echo $row['interest'];?></td>
						<td><?php echo $row['scode'];?></td>
	<td><?php echo $row['createdate'];?></td>
		<td><?php echo $row['altby'];?></td>
			<td><?php echo $row['altdate'];?></td><td><?php echo $row['pmode'];?></td>
					</tr>
					<?php
						}
				
			?></tbody>
		<td><b></b></td>
					
						<td><b></b></td>
						<td><b></b></td>
				<td><b></b></td>
						<td><b></b></td>
							<td><b></b></td>
					
		
		<td><font size="4" color="red"><b>Total</b></font></b></td>
						<td><b><?php echo $tnet3;?></b></td>
							<!--<td></td>-->
					
							<td><b><?php echo $tnet4;?></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>

