// ===============
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 section_id 		= $("#section_id").val();
	var year 		    = $("#_year").val();
	var month 		    = $("#_month").val();


	var datastr = "section_id="+section_id+"&student_type_id="+student_type_id+"&department_id="+department_id+"&class_id="+class_id+"&medium_id="+medium_id+"&shift_id="+shift_id+"&year="+year+"&month="+month;
	//alert(datastr);
	//var datastr="invoice_no="+invoice_no;
	$(".section_wise_invoice").show();
	$('.section_wise_invoice').html("<span style='color:#2e8965;font-size:16px;font-weight:bold;'>Data Generating.... Please Wait.  <img src='php_crud/img/preloader.gif' /></span>");
	
	/*if(invoice_no==""){
		alert("Enter Invoice No");
		$('#invoice_no').focus();
		return false;
	}
	else if(year==""){
		alert("Select Year");
		$('#year').focus();
		$(".section_wise_invoice").hide();
		return false;
	}*/
	if(shift_id==""){
		alert("Select Shift");
		$('#shift_id').focus();
		$(".section_wise_invoice").hide();
		return false;
	}
	else if(medium_id==""){
		alert("Select Medium");
		$('#medium_id').focus();
		$(".section_wise_invoice").hide();
		return false;
	}
	else if(class_id==""){
		alert("Select Class");
		$('#class_id').focus();
		$(".section_wise_invoice").hide();
		return false;
	}
	else if(department_id==""){
		alert("Select Department");
		$('#department_id').focus();
		$(".section_wise_invoice").hide();
		return false;
	}
	else if(student_type_id==""){
		alert("Select Student Type");
		$('#student_type_id').focus();
		$(".section_wise_invoice").hide();
		return false;
	}
	else if(section_id==""){
		alert("Select Section");
		$('#section_id').focus();
		$(".section_wise_invoice").hide();
		return false;
	}
	else{
		$(".section_wise_invoice").load("module/fees/search_section_wise_invoice_list_roleback.php",datastr);
	}
}

function roleback_invoice(section_id,class_id,branchid,year,month){

    var operation = 'delete';
	//alert(invoice_no);
	//alert(1);
	if (confirm("Are You Confirmed To Continue!") == true) {
	var datastr = "section_id="+section_id+"&operation="+operation+"&class_id="+class_id+"&branchid="+branchid+"&year="+year+"&month="+month;
	//var datastr1 = "student_id="+student_id+"&month="+month+"&year="+year;
	//var datastr2="class_id="+class_id;
	//alert(datastr);
	var datastr2="section_id="+section_id+"&operation="+operation+"&class_id="+class_id+"&branchid="+branchid+"&year="+year+"&month="+month;
	
	//alert(datastr);
	$.ajax({
			type:"post",
			url:"module/fees/section_wise_fee_invoice_roleback_ajax.php",
			data:datastr ,
			success:function(result){
				
				alert(result);
				$("#second_part").load("module/fees/search_section_wise_invoice_list_roleback.php",datastr2);
				
			}
		});
	}else{
	
	}
}
