$(document).keypress(function(event) {
    var keycode = (event.keyCode ? event.keyCode : event.which);

    if(keycode == '13') {
		
    	var uniq_id =$.trim($('#uniq_id').val()); //$("#uniq_id").val();//take it trim;
		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 = "uniq_id="+uniq_id+"&f_month="+f_month+"&f_year="+f_year+"&to_month="+to_month+"&to_year="+to_year;
		
		if(uniq_id==""){
		alert("Select Student ID");
		$('#uniq_id').focus();
		return false;
	}
	else if(date ==""){
		alert("Select date");
		$('#date').focus();
		return false;
	}
		
		//$('#id_n0').css("display","none");
		else{
    	$("#call_std_invoice").load("module/fees/std_fee_details_sum.php",datastr);
		}
	
	}
});

$("#search").click(function(){
    	var uniq_id = $.trim($('#uniq_id').val());//take it trim;
		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 = "uniq_id="+uniq_id+"&f_month="+f_month+"&f_year="+f_year+"&to_month="+to_month+"&to_year="+to_year;
		
		if(uniq_id==""){
		alert("Select Student ID");
		$('#uniq_id').focus();
		return false;
	}
	else if(date ==""){
		alert("Select date");
		$('#date').focus();
		return false;
	}
		
		//$('#id_n0').css("display","none");
		else{
    	$("#call_std_invoice").load("module/fees/std_fee_details_sum.php",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/std_fee_details_sum.php",
data:datas,
success:function(st){

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

}

}); 		
} */