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/oasis/js_old/
Upload File :
Current File : /var/www/oasis/js_old/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 if (selectedOption == "Duplicate Payment Report") {
    $("#extype").show();
    $("#exyear").show();
    $("#rtype").hide();
  } else {
    $("exam_type").hide();
    $("#exam_range").hide();
    $("#exam_year").hide();

    // console.log("notEFCW");
  }
}

function generateFeeReport() {
  $degree = document.getElementById("degree");
  //console.log($degree);
  $exam_type = $("#exam_type").val();
  $exam_year = exam_year.options[exam_year.selectedIndex].value; //$('#exam_year').val();
  $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
  console.log(
    "data",
    $etype,
    $degree_group,
    $cntr_end,
    $cntr_from,
    $degree_from,
    $degree_to,
    $exam_type,
    $exam_year
  );
  if ($etype == "Duplicate Payment Report") {
    console.log("inside duplicate");
    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 +
      "&exam_year=" +
      $exam_year +
      "&exam_type=" +
      $exam_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("");
}