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.223.172.243


Current Path : /proc/thread-self/root/var/www/oasis/js/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/js/prbillreport.js

function callPrBill() {
  $("#page_main_div").load(
    "../html_modules/prbillreport.html?v=31072017",
    function () {
      document.getElementById("display_module_name").innerHTML =
        "Practical Bill Report";
      document.getElementById("module_name_for_save").value =
        "Practical Bill Report";
      getDefaultHeadFooterLinks("Practical Bill Report");

      loadPrBillDegree();
    }
  );
}

function loadPrBillDegree() {
  $.ajax({
    type: "GET",
    url: $host_url + "loadPrBillDegree",
    success: function (res) {
      let response = JSON.parse(res);
      let opt = "";
      opt += `<option>---Select---</option>`;
      if (response.error_code === 0) {
        response.data.forEach((element) => {
          opt += `<option value='${element.fdegree}'>${element.fdegree} - ${element.fdescpn}</option>`;
        });
        document.getElementById("markentry_sub_degree_code").innerHTML = opt;
      }
    },
  });
}

function getPrBillDegSem() {
  var degree = document.getElementById("markentry_sub_degree_code").value;
  $.ajax({
    type: "GET",
    url: $host_url + "getPrBillDegSem" + "&degree=" + degree,
    success: function (res) {
      let response = JSON.parse(res);
      let option = "";

      option += `<option value = 'All'>---All---</option>`;
      if (response.error_code === 0) {
        response.data.forEach((elements) => {
          option += `<option value='${elements.fexamno}'>${elements.fexamno} - ${elements.fexamname}</option>`;
        });
        document.getElementById("markentry_sub_Examno").innerHTML = option;
      }
      getPrBillSub();
    },
  });
}

function getPrBillSub() {
  var degree = document.getElementById("markentry_sub_degree_code").value;
  var examno = document.getElementById("markentry_sub_Examno").value;
  // console.log(sem, degree);
  $.ajax({
    type: "GET",
    url: $host_url + "getPrBillSub" + "&degree=" + degree + "&examno=" + examno,
    success: function (res) {
      let response = JSON.parse(res);
      let options = "";
      options += `<option value = 'All'>---All---</option>`;
      if (response.error_code === 0) {
        response.data.forEach((elements) => {
          options += `<option value='${elements.fsubcode}'>${elements.fsubcode} - ${elements.fsubname}</option>`;
        });
        document.getElementById("markentry_sub_final_subcode").innerHTML =
          options;
      }
    },
  });
}

function GeneratePrBill() {
  var degree = document.getElementById("markentry_sub_degree_code").value;
  var examno = document.getElementById("markentry_sub_Examno").value;
  var subcode = document.getElementById("markentry_sub_final_subcode").value;

  if (degree == "") {
    alert("Select Degree");
    return;
  }

  window.location.href =
    $host_url +
    "GeneratePrBill&degree=" +
    degree +
    "&examno=" +
    examno +
    "&subcode=" +
    subcode;
}