													<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
 
  
    $('#sid').change(function(e){
		  $.post('module/insert4-receipt.php',{sid:$(this).val()},function(data){
			
			   $('#detail').html(data);
			  });
		});
		
     $('#sem').change(function(e){
		  $.post('module/insert.php',{subject:$(this).val()},function(data){
		  		
			   $('#subject').html(data);
			  });
		});		
});
</script>
			

<?php

//$sid=$_REQUEST['sid'];

$sql=mysql_query("SELECT * FROM `finance_student_list` WHERE `sid` = '$sid'") or die(mysql_error());
$sql1=mysql_fetch_assoc($sql);


?>


<form action="action-pages/account/create-card-recept-action.php" method="post"  name="form0" id="form0">
						<div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">SID</div><div class="col-md-4"><input type="text" class="form-control" required name="" value="<?php echo $sid; ?>" disabled="disabled">
                <input type="hidden" class="form-control" name="sid" value="<?php echo $sid; ?>" >
                </div>
						</div><div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Student Name</div><div class="col-md-4"><input type="text" class="form-control" value="<?php echo $sql1['student_name']; ?>" disabled="disabled">
                <input type="hidden" name="student_name" value="<?php echo $sql1['student_name']; ?>"></div>
						</div>
						<div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Father's Name</div><div class="col-md-4"><input type="text" class="form-control" value="<?php echo $sql1['father_name']; ?>" disabled="disabled">
                <input type="hidden" name="father_name" value="<?php echo $sql1['father_name']; ?>">
                
                </div>
						</div>
                        <div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Mobile No</div><div class="col-md-4"><input type="text" class="form-control" required name="mobile"  placeholder="Enter Mobile No"  ></div>
						</div>
						<div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Invoice No.</div><div class="col-md-4"><input type="text" class="form-control" required name="invoice_no" placeholder="Invoice Number"></div>
						</div>
						<div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Invoice Amount</div><div class="col-md-4"><input type="text" class="form-control" required name="amount" placeholder="Invoice Amount" ></div>
						</div>
						
						
						<div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Select Course</div><div class="col-md-4">
				<select class="form-control" id="source" name="course" >
				<option value="">SELECT COURSE</option>		
				<?php
				$GetCourse = mysql_query("SELECT * FROM `sgvu_courses` ORDER BY `sgvu_courses`.`coursename` ASC");
				while($GetCourse1 = mysql_fetch_assoc($GetCourse))
				{
				?>
				<option value="<?php echo $GetCourse1['course_id']; ?>"
				<?php
				if($GetCourse1['course_id']==$sql1['course'])
				{
				echo 'selected="selected"';
				}
				?>
				
				 ><?php echo $GetCourse1['coursename']; ?></option>
				<?php
				}
				?>
						</select>
                        </div>
						</div>
                        <div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Select Sem</div><div class="col-md-4"><select class="form-control" id="source" name="sem">
				<option value="">SELECT SEM</option>	
				<?php  
				for ($x = 1; $x <= 10; $x++) 
				{
                ?>
                <option value="<?php echo $x; ?>"><?php echo $x; ?> Sem</option>
                <?php
				}
				?>
                </select></div>
						</div>
                        <div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Fee Type</div><div class="col-md-6">

				
				
						    <script language="javascript">function addRow(tableID){var table=document.getElementById(tableID);var rowCount=table.rows.length;var row=table.insertRow(rowCount);var colCount=table.rows[0].cells.length;for(var i=0;i<colCount;i++){var newcell=row.insertCell(i);newcell.innerHTML=table.rows[0].cells[i].innerHTML;switch(newcell.childNodes[0].type){case"text":newcell.childNodes[0].value="";break;case"checkbox":newcell.childNodes[0].checked=false;break;case"select-one":newcell.childNodes[0].selectedIndex=0;break;}}}
function deleteRow(tableID){try{var table=document.getElementById(tableID);var rowCount=table.rows.length;for(var i=0;i<rowCount;i++){var row=table.rows[i];var chkbox=row.cells[0].childNodes[0];if(null!=chkbox&&true==chkbox.checked){if(rowCount<=1){alert("Cannot delete all the rows.");break;}
table.deleteRow(i);rowCount--;i--;}}}catch(e){alert(e);}}</script>

						<table id="dataTable"><tr><td><input type="checkbox" name="chk"></td><td><select class="form-control" id="fee" name="fee_type[]" required>
							<option value="">Select Fees</option>
							<?php
							$GetFeeType = mysql_query("SELECT * FROM `sgvu_fee_type` WHERE `finance_show` = '1' ORDER BY `sgvu_fee_type`.`id` ASC");
							while($GetFeeType1 = mysql_fetch_assoc($GetFeeType))
							{
							?>
							<option value="<?php echo $GetFeeType1['id']; ?>"><?php echo $GetFeeType1['fees_type']; ?></option>
<?php
}
?>							
		    </select></td><td><input type="text" name="fee_amount[]" id="box1" class="add form-control" value="0" onKeyUp="Calc('add')" onChange="updatesum()" onClick="this.focus();this.select();" required/></td></tr></table>
						<a onclick="addRow('dataTable')">Add</a>&nbsp;&nbsp; <a onclick="deleteRow('dataTable')">Delete</a>
 
				
		
						
						
						</div></div>
                        <div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Grand Total</div><div class="col-md-4"> <input type="text" style="color:red;" id="total" name="total" class="form-control"></div>
						</div>
						<div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Date</div><div class="col-md-4"><input type="text" class="form-control" disabled="disabled" value="<?php echo date('d-m-Y'); ?>"></div>
						</div>
						<div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4"></div><div class="col-md-4"><button class="btn-primary btn" type="submit">Submit</button>&nbsp;&nbsp;<button class="btn-primary btn" type="reset">Reset</button></div>
						</div>
						
						
				</form>