// ===============================
function call_medium(id){
	var datastr="shift_id="+id;
	$("#medium_id").load("module/settings/get_medium_list_for_form.php",datastr);
}
function call_class(id){
	var datastr="medium_id="+id;
	$("#class_id").load("module/settings/get_class_list_for_form.php",datastr);
}
function call_department(id){
	var datastr="class_id="+id;
	$("#department_id").load("module/settings/get_department_list_for_form.php",datastr);
}
function call_std_type(id){
		var datastr="department_id="+id;
	$("#student_type_id").load("module/settings/get_student_type_list_for_form.php",datastr);
}
function call_section(id){
		var datastr="student_type_id="+id;
	$("#section_id").load("module/settings/get_section_list_for_form.php",datastr);
}


// ===============


function call_std_invoice(){
	// var month = $("#month").val();
	// var year = $("#year").val();
	var shift_id = $("#shift_id").val();
	var medium_id = $("#medium_id").val();
	var class_id = $("#class_id").val();
	var department_id = $("#department_id").val();
	var student_type_id = $("#student_type_id").val();
	var section_id = $("#section_id").val();
	var date = $("#id-date-range-picker").val();
	if(date !=''){
		var multi_date = new Array();
		multi_date = date.split("-");
		var from = multi_date[0];
		
		/////
		var form_arry = new Array();
		form_arry = from.split("/");
		var f_month = form_arry[0];
		var f_year = form_arry[1];
		
		
		var to =multi_date[1]; 
		///////////////
		var to_arry = new Array();
		to_arry = to.split("/");
		var to_month = to_arry[0];
		var to_year = to_arry[1];
		// alert(to_month);
		// exit();
	}

	var datastr="section_id="+section_id+"&f_month="+f_month+"&f_year="+f_year+"&to_month="+to_month+"&to_year="+to_year;
	
	 if(shift_id==""){
		alert("Select Shift");
		$('#shift_id').focus();
		return false;
	}
	else if(medium_id==""){
		alert("Select Medium");
		$('#medium_id').focus();
		return false;
	}
	else if(class_id==""){
		alert("Select Class");
		$('#class_id').focus();
		return false;
	}
	else if(department_id==""){
		alert("Select Department");
		$('#department_id').focus();
		return false;
	}
	else if(student_type_id==""){
		alert("Select Student Type");
		$('#student_type_id').focus();
		return false;
	}
	else if(section_id==""){
		alert("Select Section");
		$('#section_id').focus();
		return false;
	}
	else if(date ==""){
		alert("Select date");
		$('#date').focus();
		return false;
	}
	//alert(datastr);
	// exit();
	else{
		$(".student_fee_details").load("module/fees/get_student_fee_details_table.php",datastr);
		//alert(datastr);
	}
}






function student_fee_details(std_id,section_id,f_month,to_month,f_year,to_year){
//

var datas="std_id="+std_id+"&section_id="+section_id+"&f_month="+f_month+"&to_month="+to_month+"&f_year="+f_year+"&to_year="+to_year;
//alert(datas);
// exit();
// $('#tab11').css('display','none');
// $('#tab').css('display','none');

$.ajax({
type:"post",
url:"module/fees/student_fee_details_sum.php",
data:datas,
success:function(st){

//alert(st);
$('#first_part').remove();
$("#second_part").html(st);

}

}); 		
}





