<script language="javascript">
function Calc(className){
var elements = document.getElementsByClassName(className);
var total = 0;

for(var i = 0; i < elements.length; ++i){
total += parseInt(elements[i].value);
}

document.form0.total.value = total;
}

function addone(field) {
field.value = Number(field.value) + 1;
}

function subtractone(field) {
field.value = Number(field.value) - 1;
}
</script>

<div class="panel-body">
				<form action="action-pages/account/create-receipt-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" disabled="disabled" value="<?php echo $sid; ?>"></div>
						</div>
						
						<div class="col-md-12" style="padding-top:10px">
				<div class="col-md-4">Fee Type</div><div class="col-md-6">

				<?php
				$GetSidCourse=mysql_query("SELECT * FROM `sgvu_courses` WHERE `course_id` = '$GetStDetail1[program]'");
				$GetSidCourse1=mysql_fetch_assoc($GetSidCourse);
				?>

						<table>
						<tr><td width="155"><b>Tution Fees:</b></td><td><input type="text" value="<?php echo $GetSidCourse1['course_fee']; ?>"  class="add form-control" onKeyUp="Calc('add')" onChange="updatesum()" onClick="this.focus();this.select();" required></td></tr>
						<tr><td><b>Enrollment Fees:</b></td><td><input type="text" value="3000" class="add form-control" onKeyUp="Calc('add')" onChange="updatesum()" onClick="this.focus();this.select();" required></td></tr>
						<tr><td><b>Examination Fees:</b></td><td><input type="text" value="2000" class="add form-control" onKeyUp="Calc('add')" onChange="updatesum()" onClick="this.focus();this.select();" required></td></tr>
						<tr><td><b>Community Fees:</b></td><td><input type="text"  value="100" class="add form-control" onKeyUp="Calc('add')" onChange="updatesum()" onClick="this.focus();this.select();" required></td></tr>
						<tr><td><b>Grand Total</b></td><td><input type="text" style="color:red;" id="total" name="total" class="form-control" value="100"></td></tr>
						
						</table>
 
				
		
						
						
						</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>
					
						
					
					</div>