<?php include "layouts/menu.php"; ?>
<style>
    #my_camera{
        width: 320px;
        height: 240px;
        border: 1px solid black;
    }
	</style>
 <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
 
 <script>
function ddd()
{
var x = document.getElementById("hpdate").value;
document.getElementById("hpdate2").value = x;
}
</script>

<!-- Card - 1 -->
<script>
function tgram1()
{
var x = document.getElementById("n11").value;
var y = document.getElementById("n21").value;
var z = document.getElementById("n31").value;
var u = document.getElementById("n41").value;
var v = document.getElementById("n51").value;
document.getElementById("ggm1").value =(x*1)+(y*1)+(z*1)+(u*1)+(v*1);
}
</script>
<script>
function hpamt1()
{
var x1 = document.getElementById("n11").value;
var x2 = document.getElementById("n21").value;
var x3 = document.getElementById("n31").value;
var x4 = document.getElementById("n41").value;
var x5 = document.getElementById("n51").value;
var y = document.getElementById("pgram").value;
var f = document.getElementById("grate").value;
var z = document.getElementById("lvalue").value;
var a = document.getElementById("pgramo").value;
var z1 = document.getElementById("c11").value;
var z2 = document.getElementById("c21").value;
var z3 = document.getElementById("c31").value;
var z4 = document.getElementById("c41").value;
var z5 = document.getElementById("c51").value;
var it = document.getElementById("intert").value;
var pt = document.getElementById("pinter1").value;


var b1 = (((x1*1)*(z*1)));
var b2 = (((x2*1)*(z*1)));
var b3 = (((x3*1)*(z*1)));
var b4 = (((x4*1)*(z*1)));
var b5 = (((x5*1)*(z*1)));

var bt = (b1*1)+(b2*1)+(b3*1)+(b4*1)+(b5*1);
var xt = (x1*1)+(x2*1)+(x3*1)+(x4*1)+(x5*1); 

var boost1 = document.getElementById("boost1").value;

document.getElementById("hpamtt1").value =Math.floor(((bt*1)+(boost1*1))/10)*10;
document.getElementById("hpamtt21").value =Math.floor(((bt*1)+(boost1*1))/10)*10;
var vg = document.getElementById("hpamtt1").value;
var bgt1 = (vg*1)*(1/100);
document.getElementById("pcharge1").value = Math.ceil(bgt1 / 10) * 10;
var pcharge1 = document.getElementById("pcharge1").value;
add11()
add21()
var sd = document.getElementById("txt21").value;
if (it == 'Yes') {
document.getElementById("hpam1").value =Math.floor(((vg*1)-(sd*1)-(pcharge1*1))/1)*1;
document.getElementById("pinter1").value =(sd*1);
}
else{
document.getElementById("hpam1").value =Math.floor(((vg*1)-(pcharge1*1))/1)*1;	
}
document.getElementById("val1").value =Math.floor((xt*1)*(f*1)/1)*1;
}
</script>



<script>
function pbp1()
{
var x1 = document.getElementById("pcharge1").value;
var x2 = document.getElementById("boost1").value;
var x3 = document.getElementById("pinter1").value;
var x4 = document.getElementById("hpamtt21").value;


document.getElementById("hpamtt1").value =Math.floor(((x4*1)+(x2*1))/10)*10;
document.getElementById("hpam1").value =Math.floor(((x4*1)+(x2*1)-+(x1*1)-+(x3*1))/10)*10;

}
</script>




<script>
function gwt11()
{
var x1 = document.getElementById("t11").value;
var y1 = document.getElementById("s11").value;
document.getElementById("g11").value =(x1*1)-(y1*1);
nw11();
}
</script>
<script>
function gwt21()
{
var x1 = document.getElementById("t21").value;
var y1 = document.getElementById("s21").value;
document.getElementById("g21").value =(x1*1)-(y1*1);
nw21();
}
</script>
<script>
function gwt31()
{
var x1 = document.getElementById("t31").value;
var y1 = document.getElementById("s31").value;
document.getElementById("g31").value =(x1*1)-(y1*1);
nw31();
}
</script>
<script>
function gwt41()
{
var x1 = document.getElementById("t41").value;
var y1 = document.getElementById("s41").value;
document.getElementById("g41").value =(x1*1)-(y1*1);
nw41();
}
</script>
<script>
function gwt51()
{
var x1 = document.getElementById("t51").value;
var y1 = document.getElementById("s51").value;
document.getElementById("g51").value =(x1*1)-(y1*1);
nw51();
}
</script>
<script>
function nw11()
{
var x1 = document.getElementById("g11").value;
var y1 = document.getElementById("pgram").value;
var z1 = document.getElementById("c11").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
if (z1 == 'H') {
	var q1 = ((x1*1)*((100-h1)/100));
}
else{
	var q1 = ((x1*1)*((100-o1)/100));
}
document.getElementById("n11").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1();
}
</script>
<script>
function nw21()
{
var x1 = document.getElementById("g21").value;
var y1 = document.getElementById("pgram").value;
var z1 = document.getElementById("c21").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
if (z1 == 'H') {
	var q1 = ((x1*1)*((100-h1)/100));
}
else{
	var q1 = ((x1*1)*((100-o1)/100));
}
document.getElementById("n21").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1();
}
</script>
<script>
function nw31()
{
var x1 = document.getElementById("g31").value;
var y1 = document.getElementById("pgram").value;
var z1 = document.getElementById("c31").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
if (z1 == 'H') {
	var q1 = ((x1*1)*((100-h1)/100));
}
else{
	var q1 = ((x1*1)*((100-o1)/100));
}
document.getElementById("n31").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1();
}
</script>
<script>
function nw41()
{
var x1 = document.getElementById("g41").value;
var y1 = document.getElementById("pgram").value;
var z1 = document.getElementById("c41").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
if (z1 == 'H') {
	var q1 = ((x1*1)*((100-h1)/100));
}
else{
	var q1 = ((x1*1)*((100-o1)/100));
}
document.getElementById("n41").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1();
}
</script>
<script>
function nw51()
{
var x1 = document.getElementById("g51").value;
var z1 = document.getElementById("c51").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
if (z1 == 'H') {
	var q1 = ((x1*1)*((100-h1)/100));
}
else{
	var q1 = ((x1*1)*((100-o1)/100));
}
document.getElementById("n51").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1(); 
}
</script>
<script>
function add11()
{
var x1 = document.getElementById("hpamtt1").value;
var y1 = document.getElementById("intt21").value;
var g = (x1*1)*(y1/100);
document.getElementById("txt21").value =Math.round(g);
//var y = (x*1)/(12);
//document.getElementById("2").value =Math.round(y);
}
</script>
<script>
function add21()
{
var x1 = document.getElementById("hpamtt1").value;
var y1 = document.getElementById("duemnt31").value;
document.getElementById("txt11").value =parseInt((x1*1)/(y1*1));
var x = document.getElementById("txt11").value;
var y = document.getElementById("txt21").value;
document.getElementById("tot1").value =(x*1)+(y*1);
}
function getUsers(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name").val(data.userData.name);
                $("#fname").val(data.userData.fname);
				$("#address").val(data.userData.address);
				$("#address1").val(data.userData.address1);
				$("#address2").val(data.userData.address2);
				$("#lmark").val(data.userData.lmark);
				$("#pnoresi").val(data.userData.pnoresi);
				$("#gg1").val(data.userData.gg1);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#pno").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
</script>

<?php $sch=$_REQUEST['sch'];?>

  <!--  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">
                   New Registration For Auto Due Loan
                        </div>
                        <div class="panel-body">
                            <div class="row">
                               
                                   <?php		   $qry=mysqli_query($conn, "select * from customerdetails where mfin='$mfin' order by id DESC");
								   $qry234=mysqli_query($conn, "select * from abc where mfin='$mfin'");
								   $row234 = mysqli_fetch_array($qry234);
								   $pre = $row234['pref'];
								   $def = $row234['def'];
								   $intt = $row234['intt'];
								    $gdays = $row234['gdays'];
								    $intt55 = $intt/12;
								
								   $intt1 = $row234['intt1'];
								   $intt2 = $row234['intt2'];
								   
								   $qry29=mysqli_query($conn, "select * from msch where name='$sch'");
								   $row29 = mysqli_fetch_array($qry29);
								   	$intt5 = $row29['a60'];
						$n=mysqli_num_rows($qry);
						if($n==0)
						{
							$rty = 1;
							$rtyt = 1;
						}
						else
					    {
						$row=mysqli_fetch_array($qry);
						
						$sss = $row['hplt'];
						$hhh = $row['hpl'];
						if(($sss==NULL) || ($pre==NULL)) {
							$sss = $hhh;
						}
							$hpdate5 = $row['hpdate5'];
						$rtyy = $sss + 1;
						$rtyt = $rtyy;
						$rty = $pre."".$rtyy;
						}
$hh = $row29['hh'];
$oo = $row29['oo'];
$gtyp = $row29['details'];
$pros = $row29['pros'];
$pg = $row29['pgram'];
$pg2 = $row29['pgram2'];
$dumn = $row29['edate'];

$inter = $row29['inter'];
$intert = $row29['intert'];
$gdays11 = round(($gdays*($pg/100)),0);

$gdays1 = floor($gdays11/10)*10;
$gdays2 = round(($gdays*($pg2/100)),0);
						?>
      <?php
								   $idd=$_REQUEST['id'];
								   $qry=mysqli_query($conn, "select * from customerdetails where id='$idd'");
						$n=mysqli_num_rows($qry);
						$row = mysqli_fetch_array($qry);
						 ?>
						
  <form role="form" name="form1" id="form1" method="post" action="update.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
                                          </span>
                          </a>
                        </li>
                        <li>
                          <a href="#step-2">
                            <span class="step_no">2</span>
                            <span class="step_descr">
                                             Card Details
                                          </span>
                          </a>
                        </li>
                       
						
                      </ul>
                      
                      <div id="step-1">					
  <div class="col-lg-6">
   
		<input type="hidden" class="form-control" id="pgram3" name="pgram3" value="<?php echo $gdays;?>" placeholder="" required>
	<input type="hidden" class="form-control" id="pgramo" name="pgramo" value="<?php echo $gdays2;?>" placeholder="" required>
	
<input type="hidden" class="form-control" id="intert" name="intert" value="<?php echo $intert;?>" placeholder="" required>	
<input type="hidden" class="form-control" id="hh" name="hh" value="<?php echo $hh;?>" placeholder="" required>
	<input type="hidden" class="form-control" id="oo" name="oo" value="<?php echo $oo;?>" placeholder="" required>
	<input type="hidden" class="form-control" id="pros" name="pros" value="<?php echo $pros;?>" placeholder="" required>	
	<input type="hidden" class="form-control" id="pgram" name="pgram" value="<?php echo $gdays1;?>" placeholder="" required>
	<input type="hidden" class="form-control" id="pgram2" name="pgram2" value="<?php echo $gdays2;?>" placeholder="" required>
<input type="hidden" class="form-control" id="color" name="color" value="Gold" placeholder="" required>
      <input type="hidden" class="form-control" id="" name="fin" readonly   value="<?php echo $row['mfin']; ?>" placeholder="" >
	        <input type="hidden" class="form-control" id="" name="idd" readonly   value="<?php echo $row['id']; ?>" placeholder="" >
<input type="hidden" class="form-control" id="" name="mfin" readonly   value="<?php echo $row['mfin']; ?>" placeholder="" >
   <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Scheme <font color="red">*</font></label>
      <select type="text" class="form-control" id="1" name="sch" readonly  value="<?php echo $row['sch']; ?>" placeholder="" onChange="add1()">
	  <option><?php echo $row['sch']; ?></option>
	  <?php $qrye=mysqli_query($conn, "select * from msch where mfin='$mfin'");
	  while($rowe = mysqli_fetch_array($qrye)){ ?>
	  <option><?php echo $rowe['name']; ?></option>
	  
	  <?php } ?>
	  </select>
	  <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
      <input style="text-transform:uppercase" type="hidden" class="form-control" id="email"  name="hplt" value="<?php echo $rtyt;?>" placeholder="E.g 1008" required>

   <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Phone Number <font color="red">*</font></label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="pno" name="pno" value="<?php echo $row['pno']; ?>" onkeyup(getUsers(this)) required 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" >Name <font color="red">*</font></label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="name" style="text-transform:uppercase" name="name" required 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="fname" name="fname" value="<?php echo $row['fname']; ?>" placeholder="Name">
 <span class="glyphicon glyphicon-user 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="address" name="address" value="<?php echo $row['address']; ?>" placeholder="Line 1">
 <input style="text-transform:uppercase" type="text" class="form-control" id="address1" name="address1" value="<?php echo $row['address1']; ?>" placeholder="Line 2">
 <input style="text-transform:uppercase" type="text" class="form-control" id="address2" name="address2" value="<?php echo $row['address2']; ?>" placeholder="Line 3 + Pincode"> 

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

  </div>
  <div class="col-lg-6">
      <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Land Mark</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="lmark" name="lmark" value="<?php echo $row['lmark']; ?>" placeholder="">
 <span class="glyphicon glyphicon-home form-control-feedback"></span>
  </div>
  <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >House Phone No</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="pnoresi" name="pnoresi" value="<?php echo $row['pnoresi']; ?>" 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" >Area <font color="red">*</font></label>
      <select style="text-transform:uppercase" type="text" required class="form-control" id="didd" name="area" value="<?php echo $row['area']; ?>" placeholder="Area">
<option><?php echo $row['area']; ?></option>
<?php $sql11 = mysqli_query($conn, "select * from msarea order by name asc");
while($row11 = mysqli_fetch_array($sql11)) { ?>
<option><?php echo $row11['name']; ?></option>
<?php } ?>
</select>
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
   <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Date of Birth</label>
      <input style="text-transform:uppercase" type="date" class="form-control" id="inputPassword3" name="dob" value="<?php echo $row['dob']; ?>" placeholder="">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
	 <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Govt ID <font color="red">*</font></label>
      <input readonly type="text" class="form-control" required id="inputPassword3" name="gi1" value="Aadhar" placeholder="">
	  
    <span class="glyphicon glyphicon-plane form-control-feedback"></span>
	
		<input style="text-transform:uppercase" type="text" class="form-control" id="gg1" name="gg1"  value="<?php echo $row['gg1']; ?>" placeholder="Govt ID No" >

    </div>
		   
  </div>

 </div>
 <!--  //////////////////////////// -->
 
 <?php 
 $ij = 1;
 $mmt = 1;
 while($ij<=1){
	 $mmt++;
	?>
  <div id="step-<?php echo $mmt; ?>">
  
   <div class="col-lg-4">
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Card No(Loan NO)</label>
      <input style="background-color:#6495ED;font-weight: bold;color: white;font-size:20px;" readonly type="text" class="form-control" id="email"  name="hp" value="<?php echo $row['hpl']; ?>" placeholder="E.g 1008" required>
<span class="glyphicon glyphicon-pencil form-control-feedback"></span> 
 </div>   
   </div>
   
    <div class="col-lg-4">
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Gold Rate</label>
      <input  style="background-color:#FF00FF;font-weight: bold;color: white;font-size:20px;" readonly type="text" class="form-control" id="grate"  name="grate" value="<?php echo $row['grate']; ?>" placeholder="E.g 1008" required>
<span class="glyphicon glyphicon-pencil form-control-feedback"></span> 
 </div>   
   </div>
   
    <div class="col-lg-4">
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Loan Value</label>
      <input style="background-color:#800080;font-weight: bold;color: white;font-size:20px;" readonly type="text" class="form-control" id="lvalue"  name="lvalue" value="<?php echo $row['lvalue']; ?>" placeholder="E.g 1008" required>
<span class="glyphicon glyphicon-pencil form-control-feedback"></span> 
 </div>   
   </div>
             <div class="col-lg-12">
	
	    <div class="form-group has-success has-feedback col-lg-1">
	</div>	
	  <div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >N/w Grams</label>
      <input type="text" class="form-control" id="ggm<?php echo $ij; ?>" name="netgram" readonly value="<?php echo $row['netgram']; ?>" placeholder="E.g 10.1" >
    </div>
	<div class="form-group has-success has-feedback col-lg-5">
    <label for="inputEmail3" >VALUE OF JEWEL</label>
      <input style="background-color:#E74C3C;font-weight: bold;color: white;font-size:20px;" type="text" class="form-control" id="val<?php echo $ij; ?>" required name="val" value="<?php echo $row['val']; ?>" placeholder="">
    </div>
	
  	  	    <div class="form-group has-success has-feedback col-lg-1">
	</div>
	</div>
	<div class="col-lg-12">
	
	    <div class="form-group has-success has-feedback col-lg-1">
	</div>	
	 <div class="form-group has-success has-feedback col-lg-4">
    <label for="inputPassword3" >Jewel Fault</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="jft"  name="jft" value="<?php echo $row['jft']; ?>" placeholder="" >
  </div>
 <div class="form-group has-success has-feedback col-lg-3">
    <label for="inputPassword3" >Loan Date</label>
      <input style="text-transform:uppercase" type="date" class="form-control" id="hpdate<?php echo $ij; ?>"  name="hpdate" value="<?php echo $row['hpdate5']; ?>" placeholder="Loan Date" onclick="ddd()" >
  </div>
  <div class="form-group has-success has-feedback col-lg-3">
    <label for="inputPassword3" >Due Date</label>
      <input style="text-transform:uppercase" type="date" class="form-control" id="hpdate2<?php echo $ij; ?>"  name="hpdate2" value="<?php echo $row['hpdate2']; ?>" placeholder="Due Date" onclick="dchange()" >
  </div>
  
	
	  	    <div class="form-group has-success has-feedback col-lg-1">
	</div>
	</div>
	<div class="col-lg-12">
	
	    <div class="form-group has-success has-feedback col-lg-1">
	</div>	
	 <div class="form-group has-success has-feedback col-lg-3">
    <label for="inputPassword3" >Processesing Charges</label>
      <input style="background-color:#9B59B6;font-weight: bold;color: white;font-size:20px;" type="text" class="form-control" id="pcharge<?php echo $ij; ?>" name="pcharge" required value="<?php echo $row['pcharge']; ?>" placeholder="" onkeyup="pbp<?php echo $ij; ?>()">
  </div>
	  <div class="form-group has-success has-feedback col-lg-3">
    <label for="inputPassword3" >Boostup Amount</label>
      <input style="background-color:#5499C7;font-weight: bold;color: white;font-size:20px;" type="text" class="form-control" id="boost<?php echo $ij; ?>" name="boost" required value="<?php echo $row['boost']; ?>" placeholder="" onkeyup="pbp<?php echo $ij; ?>()">
  </div>
  <div class="form-group has-success has-feedback col-lg-4">
    <label for="inputPassword3" >Pre-Interest</label>
      <input style="background-color:#85929E;font-weight: bold;color: white;font-size:20px;" type="text" class="form-control" id="pinter<?php echo $ij; ?>" name="pinter" required value="<?php echo $row['pinter']; ?>" placeholder="" onkeyup="pbp<?php echo $ij; ?>()">
  </div>
	
	  	    <div class="form-group has-success has-feedback col-lg-1">
	</div>
	</div>
	
	
	<div class="col-lg-12">
	
	    <div class="form-group has-success has-feedback col-lg-1">
	</div>	
	
	  <div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >Loan Amount</label>
	     <input type="hidden" class="form-control" id="hpamtt2<?php echo $ij; ?>" name="hpamountff" required value="<?php echo $row['hpl']; ?>" placeholder="">
      <input style="background-color:#28B463;font-weight: bold;color: white;font-size:20px;" type="text" class="form-control" id="hpamtt<?php echo $ij; ?>" name="hpamount" required value="<?php echo $row['hpamount']; ?>" placeholder="Loan Amount">
  </div>

   <div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >Given Amount</label>
      <input style="background-color:#E67E22;font-weight: bold;color: white;font-size:20px;" type="text" class="form-control" id="hpam<?php echo $ij; ?>" name="totalhp" required value="<?php echo $row['totalhpamt']; ?>" placeholder="">
  </div>
	
	  	    <div class="form-group has-success has-feedback col-lg-1">
	</div>
	</div>
	
   <div class="col-lg-12">
	
	    <div class="form-group has-success has-feedback col-lg-1">
	</div>	
   <div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >Interest %</label>
	      <input style="text-transform:uppercase" type="text" class="form-control" id="intt2<?php echo $ij; ?>" name="inter"  value="<?php echo $row['inter']; ?>" placeholder="" Onkeyup="add1<?php echo $ij; ?>()">

   <span class="glyphicon glyphicon-usd form-control-feedback"></span>
  </div> 
   <div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >Interest Part</label>
	      <input  style="background-color:#40E0D0;font-weight: bold;color: white;font-size:20px;"  type="text" class="form-control" id="txt2<?php echo $ij; ?>"  name="interest" value="<?php echo $row['interest']; ?>" placeholder="Interest"  >

   <span class="glyphicon glyphicon-usd form-control-feedback"></span>
  </div>
  
  <div class="form-group has-success has-feedback col-lg-1">
	</div>
	</div>
    <div class="col-lg-12">
	
	    <div class="form-group has-success has-feedback col-lg-1"> 
	</div>
<div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >Type</label>
      <select style="text-transform:uppercase" type="text" class="form-control" id="model" name="model" value="<?php echo $row['model']; ?>" placeholder="Due Month" onkeyup="add2()";>
<option value="1"><?php echo $row['model']; ?></option>
<option value="1">Interest Type</option>
<option value="2">EMI</option></select> 

 <span class="glyphicon glyphicon-time form-control-feedback"></span>
  </div>
  
    	<div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >Pay mode</label>
      <select type="text" class="form-control" id="pmode" name="pmode" value="<?php echo $row['pmode']; ?>">
	  <option><?php echo $row['pmode']; ?></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>
   <span class="glyphicon glyphicon-usd form-control-feedback"></span>
  </div>
  
	
   <div class="form-group has-success has-feedback col-lg-1">
	</div> </div> 
	
                 
	  <div class="col-lg-12">
	
	    <div class="form-group has-success has-feedback col-lg-1"> IF EMI
	</div>
<div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >Penalty %</label>
      <input style="text-transform:uppercase" type="text" class="form-control" name="defamt" value="<?php echo $row['defamt']; ?>" >


 <span class="glyphicon glyphicon-time form-control-feedback"></span>
  </div>
  
	  <div class="form-group has-success has-feedback col-lg-5">
    <label for="inputPassword3" >Due Month</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="duemnt3<?php echo $ij; ?>" name="duemnt" value="<?php echo $row['duemnt']; ?>" placeholder="Due Month" onkeyup="add2<?php echo $ij; ?>()";>
  <span class="glyphicon glyphicon-time form-control-feedback"></span>
  </div>
   <div class="form-group has-success has-feedback col-lg-1">
	</div> </div> 
  
  
  
  
     <div class="col-lg-12">
	
	    <div class="form-group has-success has-feedback col-lg-1">
	</div>	
	  <div class="form-group has-success has-feedback col-lg-5">
    <label for="txt1" >Principle part</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="txt1<?php echo $ij; ?>"  name="dueamt" value="<?php echo $row['dueamt']; ?>" placeholder="Due Amount" onChange="add<?php echo $ij; ?>()">
   <span class="glyphicon glyphicon-usd form-control-feedback"></span>
  </div>
  <div class="form-group has-success has-feedback col-lg-5">
    <label for="txt2" >Total Due Amount</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="tot<?php echo $ij; ?>"  name="total" value="<?php echo $row['total']; ?>" placeholder="Interest"  >
   <span class="glyphicon glyphicon-usd form-control-feedback"></span>
  </div> <div class="form-group has-success has-feedback col-lg-1">
	</div>
	
	
	 </div> 
  </div>
 
 <?php 
  $ij++;
 } ?>           <!-----   card 2   -   -->


   
</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 type="text/javascript" src="webcamjs/webcam.min.js"></script>

	<!-- Configure a few settings and attach camera -->
	<script language="JavaScript">
		Webcam.set({
			width: 320,
			height: 240,
			image_format: 'jpeg',
			jpeg_quality: 90
		});
		Webcam.attach( '#my_camera' );
	</script>
	
	
	
	<!-- A button for taking snaps -->
	
	<!-- Code to handle taking the snapshot and displaying it locally -->
	<script language="JavaScript">

		function take_snapshot() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				$(".image-tag").val(data_uri);
				document.getElementById('results').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	<script language="JavaScript">

		function take_snapshot2() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				
				document.getElementById('results2').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	
	<script language="JavaScript">

		function take_snapshot1() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				$(".image-tag2").val(data_uri);
				document.getElementById('results1').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	<script language="JavaScript">

		function take_snapshot3() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				document.getElementById('results3').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	<script language="JavaScript">

		function take_snapshot4() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				document.getElementById('results4').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	<script language="JavaScript">

		function take_snapshot5() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				document.getElementById('results5').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
    <script src="vendors/jQuery-Smart-Wizard/js/jquery.smartWizard.js"></script>
    <!-- Custom Theme Scripts -->
    <script src="build/js/custom.min.js"></script>
</body></html>
