0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.220.85.96


Current Path : /var/www/html/bnu/js/
Upload File :
Current File : /var/www/html/bnu/js/fee_report.js

 function enableFeeReport()
 {
    $("#page_main_div").load('html_modules/fee_report.html',function()
	{	
   	document.getElementById('display_module_name').innerHTML = 'Fee Report ';
	document.getElementById('module_name_for_save').value = 'Fee Report '; 
	getDefaultHeadFooterLinks("Fee Report "); 	
	getpopup();		 		
 	});
 
 } 
 function getpopup()
{
	$.ajax({
		type: "POST",
		url: $host_url+"getDegreeGroup",
		success: degreeDropDownMenusSuccess
	});
}
 
function degreeDropDownMenusSuccess($responce)
{
	$responce = eval('(' + $responce + ')');
	
	document.getElementById("degree").options.length = 0;
	var deg =$responce.data['deggrp'];
	
	//console.log(deg);
	$op = new Option('--SELECT--', '');
	document.getElementById("degree").options.add($op);
	for($i=0;$i < deg.length;$i++)                                  
	{            
		$op = new Option(deg[$i]['VALUE'], deg[$i]['internal_code']);
		//console.log(deg[$i]['value']);
		$op.id=deg[$i]['internal_code'];
		document.getElementById("degree").options.add($op);
		//console.log(degree);
	}

}
function showExamRange(){
	var selectedOption = $('#type').val();
	if(selectedOption == 'EFCW')
		$('#exam_range').show();
	else{
		$('#exam_range').hide();
		// console.log("notEFCW");
	}
}
function generateFeeReport()
{
	$degree=document.getElementById('degree');
	//console.log($degree);
	$degree_group=degree.options[degree.selectedIndex].value;

	if($degree_group==''){

		alert('Please Select Degree');
		$("#degree").focus();
		return;

	}
	$type=document.getElementById('type');
	$etype=type.options[type.selectedIndex].value;
	if($etype=='')
	{

		alert("Please select Report");
		return;
	}
	
	$cntr_from = document.getElementById('cntr_start').value;
	$cntr_end = trim(document.getElementById('cntr_end').value);
	if(cntr_end=='')
	{
		 cntr_end = cntr_start;
	}
	if(trim($("#cntr_start").val()) == '')
	{
		alert('Please Enter College Code');
		$("#cntr_start").focus();
		return;	  
	}	
	$degree_from = document.getElementById('degree_from').value;
	$degree_to = trim(document.getElementById('degree_to').value);
	if(degree_to=='')
	{
		 degree_to = degree_from;
	}
	if(trim($("#degree_from").val()) == '')
	{
		alert('Please Enter Degree');
		$("#degree_from").focus();
		return;	  
	}
	$examno_from = document.getElementById('exam_from').value;
	// console.log("examno_fromexamno_fromexamno_from",$examno_from);
	// checkforentry = /^[a-hA-H]/;
	// if(!$examno_from.match(checkforentry))
	// {
	// 	alert('Please Enter Exam No. between A to H');
	// 	$("#exam_from").focus();
    //    return;
	// }
	if($('#exam_range').is(":visible") && trim($("#exam_from").val()) == '')
	{
		alert('Please Enter Exam No.');
		$("#exam_from").focus();
		return;	  
	}
	$report_type1=document.getElementById('report_type');
	$report_type=$report_type1.options[$report_type1.selectedIndex].value;
	if($report_type=='')
	{

		alert("Please select Report Type");
		return;
	}
	// if($etype = 'EFCW')
	// {
	// 	window.location.href = $host_url+"generateFeeCategoryWise.demo&Screentype="+$etype+"&Degree="+$degree_group+"&cntr_from="+$cntr_from+"&cntr_end="+$cntr_end+"&degree_from="+$degree_from+"&degree_to="+$degree_to+"&ReportType="+$report_type; 
	// }
	// else
		window.location.href = $host_url+"generateFeeSummaryReport.demo&Screentype="+$etype+"&Degree="+$degree_group+"&cntr_from="+$cntr_from+"&cntr_end="+$cntr_end+"&degree_from="+$degree_from+"&degree_to="+$degree_to+"&examno_from="+$examno_from+"&ReportType="+$report_type; 
	
	
}
function clearFeeReport()
{
	$("#cntr_start").val('');
	$("#cntr_end").val('');
	$("#degree_from").val('');
	$("#degree_to").val('');
	$("#type").val('');
	$("#degree").val('');
}