<?php include "layouts/menu.php"; ?>
<script>
	function autocomplet() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#did').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: 'ajax_area.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('#country_list_id').show();
				$('#country_list_id').html(data);
			}
		});
	} else {
		$('#country_list_id').hide();
	}
}
function set_item(item) {
	// change input value
	$('#did').val(item);
	// hide proposition list
	$('#country_list_id').hide();
}
	</script>
	 <script>
	function autocomp() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#didn').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: 'ajax_color.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('#dname').show();
				$('#dname').html(data);
			}
		});
	} else {
		$('#dname').hide();
	}
}

// set_item : this function will be executed when we select an item
function set_itemm(item) {
	// change input value
	$('#didn').val(item);
	// hide proposition list
	$('#dname').hide();
}
	</script>
 <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_refreshvname.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>
 <script>
function add3()
{
var x = document.getElementById("1").value;
var y = document.getElementById("bba").value;
document.getElementById("1").value =(x*1)+(y*1);
}
</script>
 <script>
function interr()
{
var x = document.getElementById("5555").value;
var y = (x*1)/(12);
document.getElementById("2").value = (y).toFixed(2);
}
</script>

 <script>
function add11()
{
var x = document.getElementById("44").value;
var y = document.getElementById("33").value;
document.getElementById("1").value =(x*1)+(y*1);
}
</script>
  <script>
function add()
{
var x = document.getElementById("txt1").value;
var y = document.getElementById("txt2").value;
document.getElementById("tot").value =(x*1)+(y*1);
}
</script>
<script>
function add1()
{
var x1 = document.getElementById("bbb").value;
var y1 = document.getElementById("aaa").value;
document.getElementById("ttxt2").value =(x1*1)*(y1/100);
}
</script>
<script>
function add2()
{
var x1 = document.getElementById("1").value;
var y1 = document.getElementById("3").value;
document.getElementById("txt1").value =parseInt((x1*1)/(y1*1));
var x = document.getElementById("txt1").value;
var y = document.getElementById("txt2").value;
document.getElementById("tot").value =(x*1)+(y*1);
}

function due()
{
var x = document.getElementById("txt1").value;
var y = document.getElementById("tot").value;
document.getElementById("txt2").value =(y*1)-(x*1);
}

function ddate()
{
	
	var x = 1; //or whatever offset
var CurrentDate = document.getElementById("hpdate").value;
document.getElementById("hpdate2").value = CurrentDate.setMonth(CurrentDate.getMonth() + x);
}

function uch()
{
    //alert("came");
var email=$("#email").val();// value in field email
$.ajax({
    type:'post',
        url:'checkmail.php',// put your real file name 
        data:{email: email},
        success:function(msg){
        alert(msg); // your message will come here.     
        } 
 });

}



navigator.geolocation.getCurrentPosition();
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;

if (e.keyCode == 37)
   e.preventDefault();
   
</script>
<script>
$('body').on('keydown', 'input, select, textarea', function(e) {
    var self = $(this)
      , form = self.parents('form:eq(0)')
      , focusable
      , next
      ;
    if (e.keyCode == 13) {
        focusable = form.find('input,a,select,button,textarea').filter(':visible');
        next = focusable.eq(focusable.index(this)+1);
        if (next.length) {
            next.focus();
        } else {
            form.submit();
        }
        return false;
    }
});
</script>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script>
    $(document).on("keypress", "input", function(e){
        if(e.which == 13){
         event.stopPropagation();
        event.preventDefault();
        $(this).next("input").focus();
        }
    }); </script>
  <!--  page-wrapper -->
         <div class="right_col" role="main">
      <h5 class="page-header  alert alert-danger">New Registration For Finance Loan</h5>   
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        
                        <div class="panel-body">
                            <div class="row">
                               
                                   <?php
								   $idd=$_REQUEST['id'];
								   $qry=mysqli_query($conn, "select * from customerdetails where id='$idd'");
						$n=mysqli_num_rows($qry);
						$row = mysqli_fetch_array($qry);
							$qry2=mysqli_query($conn, "select * from customerdetails where mfin='$mfin' order by id DESC");
						$n2=mysqli_num_rows($qry2);
						if($n2==0)
						{
							$rty = 1;
						}
						else
					    {
						$row2=mysqli_fetch_array($qry2);
						
						$sss = $row2['hpl'];
							$hpdate = $row2['hpdate'];
						$rtyy = $sss + 1;
						$rtyt = $rtyy;
						$rty = $rtyy;
						} ?>
						
  <form role="form" name="form1" id="form1" method="post" action="finsave2.php" enctype="multipart/form-data">
	<div id="wizard" class="form_wizard wizard_horizontal">
                      <ul class="wizard_steps">
                        <li>
                          <a href="#step-1">
                            <span class="step_no">1</span>
                            <span class="step_descr">
                                              Party &  Details<br />
                                              <small>Customer</small>
                                          </span>
                          </a>
                        </li>
                        
                      </ul>
                      
                      <div id="step-1">					
  <div class="col-lg-4">
   <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Loan No *</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="email" onchange="uch()" name="hpl" value="<?php echo $rty;?>" placeholder="E.g 1008" required>
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="email" onchange="uch()" name="hplt" value="<?php echo $rtyt;?>" placeholder="E.g 1008" required>

	        <input style="text-transform:uppercase" type="hidden" class="form-control" id="idd" name="idd" value="<?php echo $row['id']; ?>" placeholder="E.g 1008" required>
<span class="glyphicon glyphicon-pencil form-control-feedback"></span> 
 </div>
 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="geo"  name="geo" value="<?php echo $row['hpl']; ?>" placeholder="E.g 1008" required>

  <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Party Name *</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="inputPassword3" style="text-transform:uppercase" name="name" value="<?php echo $row['name']; ?>" placeholder="Name">
 <span class="glyphicon glyphicon-user form-control-feedback"></span>
  </div>
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Father's Name</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="inputPassword3" name="fname" value="<?php echo $row['fname']; ?>" placeholder="Name">
 <span class="glyphicon glyphicon-user form-control-feedback"></span>
  </div>
   
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" style="text-transform:uppercase" name="hname" value="<?php echo $row['hname']; ?>" placeholder="Name">
 
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Phone Number</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="inputPassword3" name="pno" value="<?php echo $row['pno']; ?>" placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
     
  <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Address</label>
 <input style="text-transform:uppercase" type="text" class="form-control" id="inputPassword3" name="address" value="<?php echo $row['address']; ?>" placeholder="Line 1">
 <input style="text-transform:uppercase" type="text" class="form-control" id="inputPassword3" name="address1" value="<?php echo $row['address1']; ?>" placeholder="Line 2">
 <input style="text-transform:uppercase" type="text" class="form-control" id="inputPassword3" name="address2" value="<?php echo $row['address2']; ?>" placeholder="Line 3"> 

  <span class="glyphicon glyphicon-home form-control-feedback"></span>
  </div>
  
  </div>
  <div class="col-lg-4">

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="lmark" value="" placeholder="">

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="pnooffice" value="" placeholder="Eg: 9876543210">

 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="oaddress" value="" placeholder="Line 1">
 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="oaddress1" value="" placeholder="Line 2">
 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="oaddress2" value="" placeholder="Line 3">

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="pnoresi" value="" placeholder="Eg: 9876543210">

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="didd" name="area" value="" placeholder="Area">

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="profession" value="" placeholder="Eg: 9876543210">


 <div class="form-group has-error has-feedback">
    <label for="inputPassword3" >Loan Amount</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="44" name="totalhpamt"  value="" placeholder="H.P Amount" >
   <span class="glyphicon glyphicon-usd form-control-feedback"></span>
  </div>
    <div class="form-group has-error has-feedback">
    <label for="inputPassword3" >Re Enter Loan Amount</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="bbb" name="hpamount"  value="" placeholder="H.P Amount" onChange="add1()">
   <span class="glyphicon glyphicon-usd form-control-feedback"></span>
  </div>
   <div class="form-group has-error has-feedback">
    <label for="inputPassword3" >Interest in %</label>
	 <input style="text-transform:uppercase" type="text" class="form-control" id="5555" name="inter2"  value="30" placeholder="" Onkeyup="interr()">
      <input style="text-transform:uppercase" type="text" class="form-control" id="aaa" name="inter"  value="2.5" placeholder="2" Onkeyup="add1()">
    <span class="glyphicon glyphicon-info-sign form-control-feedback"></span>
  </div>
   <div class="form-group has-error has-feedback">
    <label for="inputPassword3" class="control-label">Loan Date</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="hpdate"  name="hpdate" value="" placeholder="H.P Date" onfocus="insertDate(this,'DD-MM-YYYY')">
 <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
    </div> 
<div class="form-group has-error has-feedback">
    <label for="txt2">Interest</label>
      <input type="text" class="form-control" id="ttxt2"  name="interest" value="" placeholder="Interest">
	     <span class="glyphicon glyphicon-usd form-control-feedback"></span>
    </div>
  <div class="form-group has-error has-feedback">
    <label for="txt2">Pay Mode</label>
     <select type="text" class="form-control" required id="inputPassword3" name="pmode" width="48" value="" placeholder=""  required>  
 <option></option>
 <option>Cash A/C</option>

<?php $abank = mysqli_query($conn, "select * from ledger where under='Bank Accounts'");
	while($bbank = mysqli_fetch_array($abank)) { ?>
	<option><?php echo $bbank['ledger']; ?></option>
	<?php } ?>
	  </select>   
   </div>	
  </div>
  <div class="col-lg-4">
     <div class="form-group has-error has-feedback">
    <label for="inputPassword3" class="control-label">PAN CARD NO</label>
      <input style="text-transform:uppercase" type="text" class="form-control"  name="pan" value="<?php echo $row['pan']; ?>" placeholder="" >
 <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
    </div> 
	 <div class="form-group has-error has-feedback">
    <label for="inputPassword3" class="control-label">Account Holder Name</label>
      <input style="text-transform:uppercase" type="text" class="form-control" name="accname" value="<?php echo $row['accname']; ?>" placeholder="" >
 <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
    </div> 
	<div class="form-group has-error has-feedback">
    <label for="inputPassword3" class="control-label">Bank Name</label>
      <input style="text-transform:uppercase" type="text" class="form-control" name="bankname" value="<?php echo $row['bankname']; ?>" placeholder="" >
 <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
    </div> 
	 <div class="form-group has-error has-feedback">
    <label for="inputPassword3" class="control-label">Account No</label>
      <input style="text-transform:uppercase" type="text" class="form-control" name="bankno" value="<?php echo $row['bankno']; ?>" placeholder="" >
 <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
    </div> 
	 <div class="form-group has-error has-feedback">
    <label for="inputPassword3" class="control-label">IFSC CODE</label>
      <input style="text-transform:uppercase" type="text" class="form-control"  name="ifsc" value="<?php echo $row['ifsc']; ?>" placeholder="" >
 <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
    </div> 
	 <div class="form-group has-error has-feedback">
    <label for="inputPassword3" class="control-label">BRANCH NAME</label>
      <input style="text-transform:uppercase" type="text" class="form-control"  name="branch" value="<?php echo $row['branch']; ?>" placeholder="" >
 <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
    </div> 
	
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="hpdate2"  name="hpdate2" value="" placeholder="H.P Date" onfocus="insertDate(this,'DD-MM-YYYY')">

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="3" name="duemnt" value="" placeholder="Due Month" onkeyup="add2()";>

      <input style="text-transform:uppercase" type="hidden" class="form-control" name="defamt" value="75" >

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="txt1"  name="dueamt" value="" placeholder="Due Amount" onChange="add()">

    <input style="text-transform:uppercase" type="hidden" class="form-control" id="tot" name="total" value="" placeholder="Total Amount" onkeyup="due()">
  
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputEmail3" name="vno" value="TN " placeholder="E.g TN 21 S 2676">
  
       <input style="text-transform:uppercase" type="hidden" class="form-control" id="zxcvb" name="vname" value=""  onkeyup="autocomplett()" placeholder="Vehicle Name">
	 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="model" value="" placeholder="Vehicle Model">
  
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="didn" name="color" value="" onkeyup="autocomp()" placeholder="E.g RED">
	 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="eno" name="eno" value=""  placeholder="">
	 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="cno" name="cno" value=""  placeholder="">
	  

    </div> </div>
                     
      <input style="text-transform:uppercase" type="hidden" class="form-control" name="irr" value="" >
  
      <input style="text-transform:uppercase" type="hidden" class="form-control" name="hlamt" value="" >
  
      <input style="text-transform:uppercase" type="hidden" class="form-control" name="hlreturn" value="" >
       <input style="text-transform:uppercase" type="hidden" class="form-control" name="mfin55" value="<?php echo $row['mfin']; ?>" >
       <input style="text-transform:uppercase" type="hidden" class="form-control" name="mfin2" value="<?php echo $row['mfin']; ?>" >

	 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="chqamt" name="chqamt" value="">
  

   
      <input type="hidden" class="form-control" id="inputPassword3" name="bname" value="" placeholder="Broker Name">
       <input style="text-transform:uppercase" type="hidden" class="form-control" id="gfjghgf" name="document"  value="" onchange="add11()"  placeholder="Documentation Charge" >
  
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="txtgh3" name="bcommission"  value="" placeholder="Boker Commission" >
   
  
      <input type="hidden" class="form-control" id="inputPassword3" name="dealer" value="" placeholder="Broker Name">
   
      <input   style="text-transform:uppercase" type="hidden" class="form-control" rows="1" name="remarks" value="" placeholder="">
  
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cobname" value="" placeholder="Co-Obligant Name">
 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cobpno" value="" placeholder="Co-Obligant Phone">
 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cofname" value="" placeholder="Co-Obligant Name">

   <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="co" value="" placeholder="Line 1">
 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="co01" value="" placeholder="Line 2">
 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="co02" value="" placeholder="Line 3"> 
    
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="TTT" name="coaland"  value="" placeholder="Boker Commission" >
   
  
	 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cow" value="" placeholder="Line 1">
 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cow01" value="" placeholder="Line 2">
 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cow02" value="" placeholder="Line 3"> 
 
 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cobname2" value="" placeholder="Co-Obligant Name">
 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cofname2" value="" placeholder="Co-Obligant Name">
 
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="cobpno2" value="" placeholder="Co-Obligant Phone">
 
     <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="co2" value="" placeholder="Line 1">
 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="co201" value="" placeholder="Line 2">
 <input style="text-transform:uppercase" type="hidden" class="form-control" id="inputPassword3" name="co202" value="" placeholder="Line 3"> 
   
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="TTT" name="coaland2"  value="" placeholder="Boker Commission" >
   
      <input   style="text-transform:uppercase" type="hidden"  class="form-control" rows="5" cols="5" name="cow2" value="" placeholder=""></textarea>
  
    <input style="text-transform:uppercase" type="hidden"  id="exampleInputFile" name="imgveh" >
   
    <input style="text-transform:uppercase" type="hidden"  id="exampleInputFile" name="uimg" >
   
    <input style="text-transform:uppercase" type="hidden"  id="exampleInputFile" name="img" >
   
  <input style="text-transform:uppercase" type="hidden" class="form-control" id="lat" name="lat" value="" onclick="getLocation()" placeholder="">
  <input style="text-transform:uppercase" type="hidden" class="form-control" id="lang" name="lang" value="" placeholder="" >
    
	 
	
      <input readonly type="hidden" class="form-control" id="inputPassword3" name="gi1" value="Aadhar" placeholder="">
	  
 
	
		<input style="text-transform:uppercase" type="hidden" class="form-control" id="1" name="g1"  value="" placeholder="Govt ID No" >

    
		
      <input type="hidden" class="form-control" id="inputPassword3" name="gi2" value="" placeholder="">

		<input style="text-transform:uppercase" type="hidden" class="form-control" id="1" name="g2"  value="" placeholder="Govt ID No" >

    	   
      <input type="hidden" class="form-control" id="inputPassword3" name="gi3" value="" placeholder="">
	  
  
		<input style="text-transform:uppercase" type="hidden" class="form-control" id="1" name="g3"  value="" placeholder="Govt ID No" >

    
	  
	 
    	    
       <input readonly type="hidden" class="form-control" id="inputPassword3" name="bi1" value="Aadhar" placeholder="">
	  


		<input style="text-transform:uppercase" type="hidden" class="form-control" id="1" name="b1"  value="" placeholder="Govt ID No" >

    
		    
      <input type="hidden" class="form-control" id="inputPassword3" name="bi2" value="" placeholder="">

		<input style="text-transform:uppercase" type="hidden" class="form-control" id="1" name="b2"  value="" placeholder="Govt ID No" >

    	    
	
      <input type="hidden" class="form-control" id="inputPassword3" name="bi3" value="" placeholder="">
	  
   
<input style="text-transform:uppercase" type="hidden" class="form-control" id="1" name="b3"  value="" placeholder="Govt ID No" >
    	   
   <input style="text-transform:uppercase" type="hidden" class="form-control" id="balance"  name="nnamef" value="" placeholder=""  onclick="sum()">
   
	 
	


 </div>
                 

</form>
    </div>
   
</div> 
</div>
</div></div>
</div></div></div><?php include "layouts/footer2.php"; ?>
 <script src="vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->

    <!-- NProgress -->

    <script src="vendors/jQuery-Smart-Wizard/js/jquery.smartWizard.js"></script>
    <!-- Custom Theme Scripts -->
    <script src="build/js/custom.min.js"></script>
</body></html>
