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 : 3.138.35.228


Current Path : /var/www/html/tadabills/js/
Upload File :
Current File : /var/www/html/tadabills/js/admin.js

if (typeof jQuery === "undefined") {
  throw new Error("jQuery plugins need to be before this file");
}

$.AdminBSB = {};
$.AdminBSB.options = {
  colors: {
    red: "#F44336",
    pink: "#E91E63",
    purple: "#9C27B0",
    deepPurple: "#673AB7",
    indigo: "#3F51B5",
    blue: "#2196F3",
    lightBlue: "#03A9F4",
    cyan: "#00BCD4",
    teal: "#009688",
    green: "#4CAF50",
    lightGreen: "#8BC34A",
    lime: "#CDDC39",
    yellow: "#ffe821",
    amber: "#FFC107",
    orange: "#FF9800",
    deepOrange: "#FF5722",
    brown: "#795548",
    grey: "#9E9E9E",
    blueGrey: "#607D8B",
    black: "#000000",
    white: "#ffffff",
  },
  leftSideBar: {
    scrollColor: "rgba(0,0,0,0.5)",
    scrollWidth: "4px",
    scrollAlwaysVisible: false,
    scrollBorderRadius: "0",
    scrollRailBorderRadius: "0",
    scrollActiveItemWhenPageLoad: true,
    breakpointWidth: 1170,
  },
  dropdownMenu: {
    effectIn: "fadeIn",
    effectOut: "fadeOut",
  },
};

/* Left Sidebar - Function =================================================================================================
 *  You can manage the left sidebar menu options
 *
 */
$.AdminBSB.leftSideBar = {
  activate: function () {
    var _this = this;
    var $body = $("body");
    var $overlay = $(".overlay");

    //Close sidebar
    $(window).click(function (e) {
      var $target = $(e.target);
      if (e.target.nodeName.toLowerCase() === "i") {
        $target = $(e.target).parent();
      }

      if (
        !$target.hasClass("bars") &&
        _this.isOpen() &&
        $target.parents("#leftsidebar").length === 0
      ) {
        if (!$target.hasClass("js-right-sidebar")) $overlay.fadeOut();
        $body.removeClass("overlay-open");
      }
    });

    $.each($(".menu-toggle.toggled"), function (i, val) {
      $(val).next().slideToggle(0);
    });

    //When page load
    $.each($(".menu .list li.active"), function (i, val) {
      var $activeAnchors = $(val).find("a:eq(0)");

      $activeAnchors.addClass("toggled");
      $activeAnchors.next().show();
    });

    //Collapse or Expand Menu
    $(".menu-toggle").on("click", function (e) {
      var $this = $(this);
      var $content = $this.next();

      if ($($this.parents("ul")[0]).hasClass("list")) {
        var $not = $(e.target).hasClass("menu-toggle")
          ? e.target
          : $(e.target).parents(".menu-toggle");

        $.each($(".menu-toggle.toggled").not($not).next(), function (i, val) {
          if ($(val).is(":visible")) {
            $(val).prev().toggleClass("toggled");
            $(val).slideUp();
          }
        });
      }

      $this.toggleClass("toggled");
      $content.slideToggle(320);
    });

    //Set menu height
    _this.setMenuHeight();
    _this.checkStatuForResize(true);
    $(window).resize(function () {
      _this.setMenuHeight();
      _this.checkStatuForResize(false);
    });

    //Set Waves
    Waves.attach(".menu .list a", ["waves-block"]);
    Waves.init();
  },
  setMenuHeight: function (isFirstTime) {
    if (typeof $.fn.slimScroll != "undefined") {
      var configs = $.AdminBSB.options.leftSideBar;
      var height =
        $(window).height() -
        ($(".legal").outerHeight() +
          $(".user-info").outerHeight() +
          $(".navbar").innerHeight());
      var $el = $(".list");

      $el.slimscroll({
        height: height + "px",
        color: configs.scrollColor,
        size: configs.scrollWidth,
        alwaysVisible: configs.scrollAlwaysVisible,
        borderRadius: configs.scrollBorderRadius,
        railBorderRadius: configs.scrollRailBorderRadius,
      });

      //Scroll active menu item when page load, if option set = true
    }
  },
  checkStatuForResize: function (firstTime) {
    var $body = $("body");
    var $openCloseBar = $(".navbar .navbar-header .bars");
    var width = $body.width();

    if (firstTime) {
      $body
        .find(".content, .sidebar")
        .addClass("no-animate")
        .delay(1000)
        .queue(function () {
          $(this).removeClass("no-animate").dequeue();
        });
    }

    if (width < $.AdminBSB.options.leftSideBar.breakpointWidth) {
      $body.addClass("ls-closed");
      $openCloseBar.fadeIn();
    } else {
      $body.removeClass("ls-closed");
      $openCloseBar.fadeOut();
    }
  },
  isOpen: function () {
    return $("body").hasClass("overlay-open");
  },
};
//==========================================================================================================================

/* Right Sidebar - Function ================================================================================================
 *  You can manage the right sidebar menu options
 *
 */
$.AdminBSB.rightSideBar = {
  activate: function () {
    var _this = this;
    var $sidebar = $("#rightsidebar");
    var $overlay = $(".overlay");

    //Close sidebar
    $(window).click(function (e) {
      var $target = $(e.target);
      if (e.target.nodeName.toLowerCase() === "i") {
        $target = $(e.target).parent();
      }

      if (
        !$target.hasClass("js-right-sidebar") &&
        _this.isOpen() &&
        $target.parents("#rightsidebar").length === 0
      ) {
        if (!$target.hasClass("bars")) $overlay.fadeOut();
        $sidebar.removeClass("open");
      }
    });

    $(".js-right-sidebar").on("click", function () {
      $sidebar.toggleClass("open");
      if (_this.isOpen()) {
        $overlay.fadeIn();
      } else {
        $overlay.fadeOut();
      }
    });
  },
  isOpen: function () {
    return $(".right-sidebar").hasClass("open");
  },
};
//==========================================================================================================================

/* Searchbar - Function ================================================================================================
 *  You can manage the search bar
 *
 */
var $searchBar = $(".search-bar");
$.AdminBSB.search = {
  activate: function () {
    var _this = this;

    //Search button click event
    $(".js-search").on("click", function () {
      _this.showSearchBar();
    });

    //Close search click event
    $searchBar.find(".close-search").on("click", function () {
      _this.hideSearchBar();
    });

    //ESC key on pressed
    $searchBar.find('input[type="text"]').on("keyup", function (e) {
      if (e.keyCode == 27) {
        _this.hideSearchBar();
      }
    });
  },
  showSearchBar: function () {
    $searchBar.addClass("open");
    $searchBar.find('input[type="text"]').focus();
  },
  hideSearchBar: function () {
    $searchBar.removeClass("open");
    $searchBar.find('input[type="text"]').val("");
  },
};
//==========================================================================================================================

/* Navbar - Function =======================================================================================================
 *  You can manage the navbar
 *
 */
$.AdminBSB.navbar = {
  activate: function () {
    var $body = $("body");
    var $overlay = $(".overlay");

    //Open left sidebar panel
    $(".bars").on("click", function () {
      $body.toggleClass("overlay-open");
      if ($body.hasClass("overlay-open")) {
        $overlay.fadeIn();
      } else {
        $overlay.fadeOut();
      }
    });

    //Close collapse bar on click event
    $('.nav [data-close="true"]').on("click", function () {
      var isVisible = $(".navbar-toggle").is(":visible");
      var $navbarCollapse = $(".navbar-collapse");

      if (isVisible) {
        $navbarCollapse.slideUp(function () {
          $navbarCollapse.removeClass("in").removeAttr("style");
        });
      }
    });
  },
};
//==========================================================================================================================

/* Input - Function ========================================================================================================
 *  You can manage the inputs(also textareas) with name of class 'form-control'
 *
 */
$.AdminBSB.input = {
  activate: function () {
    //On focus event
    $(".form-control").focus(function () {
      $(this).parent().addClass("focused");
    });

    //On focusout event
    $(".form-control").focusout(function () {
      var $this = $(this);
      if ($this.parents(".form-group").hasClass("form-float")) {
        if ($this.val() == "") {
          $this.parents(".form-line").removeClass("focused");
        }
      } else {
        $this.parents(".form-line").removeClass("focused");
      }
    });

    //On label click
    $("body").on("click", ".form-float .form-line .form-label", function () {
      $(this).parent().find("input").focus();
    });

    //Not blank form
    $(".form-control").each(function () {
      if ($(this).val() !== "") {
        $(this).parents(".form-line").addClass("focused");
      }
    });
  },
};
//==========================================================================================================================

/* Form - Select - Function ================================================================================================
 *  You can manage the 'select' of form elements
 *
 */
$.AdminBSB.select = {
  activate: function () {
    if ($.fn.selectpicker) {
      $("select:not(.ms)").selectpicker();
    }
  },
};
//==========================================================================================================================

/* DropdownMenu - Function =================================================================================================
 *  You can manage the dropdown menu
 *
 */

$.AdminBSB.dropdownMenu = {
  activate: function () {
    var _this = this;

    $(".dropdown, .dropup, .btn-group").on({
      "show.bs.dropdown": function () {
        var dropdown = _this.dropdownEffect(this);
        _this.dropdownEffectStart(dropdown, dropdown.effectIn);
      },
      "shown.bs.dropdown": function () {
        var dropdown = _this.dropdownEffect(this);
        if (dropdown.effectIn && dropdown.effectOut) {
          _this.dropdownEffectEnd(dropdown, function () {});
        }
      },
      "hide.bs.dropdown": function (e) {
        var dropdown = _this.dropdownEffect(this);
        if (dropdown.effectOut) {
          e.preventDefault();
          _this.dropdownEffectStart(dropdown, dropdown.effectOut);
          _this.dropdownEffectEnd(dropdown, function () {
            dropdown.dropdown.removeClass("open");
          });
        }
      },
    });

    //Set Waves
    Waves.attach(".dropdown-menu li a", ["waves-block"]);
    Waves.init();
  },
  dropdownEffect: function (target) {
    var effectIn = $.AdminBSB.options.dropdownMenu.effectIn,
      effectOut = $.AdminBSB.options.dropdownMenu.effectOut;
    var dropdown = $(target),
      dropdownMenu = $(".dropdown-menu", target);

    if (dropdown.length > 0) {
      var udEffectIn = dropdown.data("effect-in");
      var udEffectOut = dropdown.data("effect-out");
      if (udEffectIn !== undefined) {
        effectIn = udEffectIn;
      }
      if (udEffectOut !== undefined) {
        effectOut = udEffectOut;
      }
    }

    return {
      target: target,
      dropdown: dropdown,
      dropdownMenu: dropdownMenu,
      effectIn: effectIn,
      effectOut: effectOut,
    };
  },
  dropdownEffectStart: function (data, effectToStart) {
    if (effectToStart) {
      data.dropdown.addClass("dropdown-animating");
      data.dropdownMenu.addClass("animated dropdown-animated");
      data.dropdownMenu.addClass(effectToStart);
    }
  },
  dropdownEffectEnd: function (data, callback) {
    var animationEnd =
      "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";
    data.dropdown.one(animationEnd, function () {
      data.dropdown.removeClass("dropdown-animating");
      data.dropdownMenu.removeClass("animated dropdown-animated");
      data.dropdownMenu.removeClass(data.effectIn);
      data.dropdownMenu.removeClass(data.effectOut);

      if (typeof callback == "function") {
        callback();
      }
    });
  },
};
//==========================================================================================================================

/* Browser - Function ======================================================================================================
 *  You can manage browser
 *
 */
var edge = "Microsoft Edge";
var ie10 = "Internet Explorer 10";
var ie11 = "Internet Explorer 11";
var opera = "Opera";
var firefox = "Mozilla Firefox";
var chrome = "Google Chrome";
var safari = "Safari";

$.AdminBSB.browser = {
  activate: function () {
    var _this = this;
    var className = _this.getClassName();

    if (className !== "") $("html").addClass(_this.getClassName());
  },
  getBrowser: function () {
    var userAgent = navigator.userAgent.toLowerCase();

    if (/edge/i.test(userAgent)) {
      return edge;
    } else if (/rv:11/i.test(userAgent)) {
      return ie11;
    } else if (/msie 10/i.test(userAgent)) {
      return ie10;
    } else if (/opr/i.test(userAgent)) {
      return opera;
    } else if (/chrome/i.test(userAgent)) {
      return chrome;
    } else if (/firefox/i.test(userAgent)) {
      return firefox;
    } else if (!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)) {
      return safari;
    }

    return undefined;
  },
  getClassName: function () {
    var browser = this.getBrowser();

    if (browser === edge) {
      return "edge";
    } else if (browser === ie11) {
      return "ie11";
    } else if (browser === ie10) {
      return "ie10";
    } else if (browser === opera) {
      return "opera";
    } else if (browser === chrome) {
      return "chrome";
    } else if (browser === firefox) {
      return "firefox";
    } else if (browser === safari) {
      return "safari";
    } else {
      return "";
    }
  },
};
//==========================================================================================================================

$(function () {
  $.AdminBSB.browser.activate();
  $.AdminBSB.leftSideBar.activate();
  $.AdminBSB.rightSideBar.activate();
  $.AdminBSB.navbar.activate();
  $.AdminBSB.dropdownMenu.activate();
  $.AdminBSB.input.activate();
  $.AdminBSB.select.activate();
  $.AdminBSB.search.activate();

  setTimeout(function () {
    $(".page-loader-wrapper").fadeOut();
  }, 50);
});

function nexttada() {
  var adharno = document.getElementById("tadaadhar").value;
  var mobno = document.getElementById("tadamob").value;
  var email = document.getElementById("tadaemail").value;
  var name = document.getElementById("tadaname").value;
  var designation = document.getElementById("tadadesignation").value;
  var faculty = document.getElementById("tadafaculty").value;
  var department = document.getElementById("tadadept").value;
  var colloruniv = document.getElementById("tadacolluniv").value;
  var city = document.getElementById("tadacity").value;
  var panno = document.getElementById("tadapan").value;
  var bankaccno = document.getElementById("tadabank").value;
  var ifsc = document.getElementById("tadaifsc").value;
  var teachtype = document.getElementById("tadateachtype").value;

  if (adharno == "") {
    alert("Enter Aadhar No.");
    document.getElementById("tadaadhar").focus();
    return;
  }
  if (mobno == "") {
    alert("Enter Mobile No.");
    document.getElementById("tadamob").focus();
    return;
  }
  if (email == "") {
    alert("Enter Email");
    document.getElementById("tadaemail").focus();
    return;
  }
  if (name == "") {
    alert("Enter Name");
    document.getElementById("tadaname").focus();
    return;
  }
  if (designation == "") {
    alert("Enter designation");
    document.getElementById("tadadesignation").focus();
    return;
  }
  if (faculty == "") {
    alert("Select faculty");
    document.getElementById("tadafaculty").focus();
    return;
  }
  if (department == "") {
    alert("Select department");
    document.getElementById("tadadept").focus();
    return;
  }
  if (colloruniv == "") {
    alert("Enter College / University Name");
    document.getElementById("tadacolluniv").focus();
    return;
  }
  if (city == "") {
    alert("Enter city");
    document.getElementById("tadacity").focus();
    return;
  }
  if (panno == "") {
    alert("Enter PAN No.");
    document.getElementById("tadapan").focus();
    return;
  }
  if (bankaccno == "") {
    alert("Enter Bank Account No.");
    document.getElementById("tadabank").focus();
    return;
  }
  if (ifsc == "") {
    alert("Enter IFSC Code");
    document.getElementById("tadaifsc").focus();
    return;
  }
  if (teachtype == "") {
    alert("Select Teacher Type");
    document.getElementById("tadabank").focus();
    return;
  }

  var parameterts =
    "&adharno=" +
    adharno +
    "&mobno=" +
    mobno +
    "&email=" +
    email +
    "&name=" +
    name +
    "&designation=" +
    designation +
    "&faculty=" +
    faculty +
    "&department=" +
    department +
    "&colloruniv=" +
    colloruniv +
    "&city=" +
    city +
    "&panno=" +
    panno +
    "&bankaccno=" +
    bankaccno +
    "&ifsc=" +
    ifsc +
    "&teachtype=" +
    teachtype;

  //   console.log($host_url);

  var host = "https://universitysolutions.in/tadabills/app.php?a=";

  $.ajax({
    type: "POST",
    data: parameterts,
    url: host + "savenexttada",
    success: function (response) {
      res = JSON.parse(response);
      //   console.log(res.data);
      //   return;
      if (res.error_code == 0) {
        console.log(res.data.data);
        $("#tadabillfirst").hide();
        $("#tadabillsecond").show();
        $("#aadhar").val(res.data.FAADHARNO);
        $("#teachcode").val(res.data.FTEACHCODE);
      } else {
        alert(res.msg);
        return;
      }
    },
  });
}

function batches() {
  var tadanatwork = document.getElementById("tadanatwork").value;

  if (tadanatwork == "Examiner (Practical Exams)") {
    $("#nobatch").show();
    $("#nostud").show();
  } else {
    $("#nobatch").hide();
    $("#nostud").hide();
  }

  if (tadanatwork == "Invigilation Duty") {
    $("#session").show();
    document.getElementById("tadadaysclaim").disabled = true;
  } else {
    $("#session").hide();
    document.getElementById("tadadaysclaim").disabled = false;
  }

  if (tadanatwork == "Paper Setting") {
    $("#desc").hide();
    $("#dates").hide();
    $("#dist").hide();
    $("#totdaily").hide();
    $("#travelallow").hide();
    $("#noofdays").hide();
    $("#noquespaper").show();
    $("#totpaper").show();
    $("#postage").show();
  } else {
    $("#desc").show();
    $("#dates").show();
    $("#dist").show();
    $("#totdaily").show();
    $("#travelallow").show();
    $("#noofdays").show();
    $("#noquespaper").hide();
    $("#totpaper").hide();
    $("#postage").hide();
  }
}

function nopaperset() {
  var noquestionpaper = document.getElementById("questionpaper").value;

  var totalqustionremuneration = parseInt(noquestionpaper) * 800;

  $("#totquespap").val(totalqustionremuneration);
}

function postagepaperset() {
  var totquespap = document.getElementById("totquespap").value;
  var postprint = document.getElementById("postprint").value;

  var totalquestion = parseInt(totquespap) + parseInt(postprint);
  $("#tadatotal").val(totalquestion);
}

function noofbatches() {
  var tadabatch = document.getElementById("tadabatch").value;

  var batchamt = parseInt(tadabatch) * 50;

  $("#tadatotal").val(batchamt);
}

function noofstudents() {
  var tadanobatch = document.getElementById("tadabatstud").value;
  var tadatotal = document.getElementById("tadatotal").value;

  var studamt = parseInt(tadanobatch) * 15;
  var batchstud = parseInt(tadatotal) + parseInt(studamt);

  $("#tadatotal").val(batchstud);
}

function noofdays() {
  var teachtype = document.getElementById("tadateachtype").value;
  var natwork = document.getElementById("tadanatwork").value;
  var nodays = document.getElementById("tadadaysclaim").value;
  var tadatotal = document.getElementById("tadatotal").value;

  var session = document.getElementById("tadasession").value;
  var tadanatwork = document.getElementById("tadanatwork").value;

  var parameters =
    "&teachtype=" + teachtype + "&natwork=" + natwork + "&nodays=" + nodays;

  var host = "https://universitysolutions.in/tadabills/app.php?a=";

  $.ajax({
    type: "POST",
    data: parameters,
    url: host + "getallowance",
    success: function (response) {
      var res = JSON.parse(response);

      var amt1 = "";

      if (tadanatwork == "Invigilation Duty") {
        amt1 = parseInt(session) * parseInt(res.data.amt);
      } else {
        amt1 = parseInt(nodays) * parseInt(res.data.amt);
      }

      var batchstudallow = parseInt(amt1) + parseInt(tadatotal);

      $("#tadatotdaily").val(amt1);
      $("#tadatotal").val(batchstudallow);
    },
  });
}

function distancetravell() {
  var tadadistance = document.getElementById("tadadistance").value;

  var travellallowance = "";

  if (tadadistance >= 15) {
    travellallowance = tadadistance * 6;
  } else {
    travellallowance = 0;
  }

  $("#tadatravell").val(travellallowance);

  var amtdailyallowance = document.getElementById("tadatotdaily").value;
  var amttravell = document.getElementById("tadatravell").value;
  var tadabatch = document.getElementById("tadabatch").value;
  var tadabatstud = document.getElementById("tadabatstud").value;
  var tadanatwork = document.getElementById("tadanatwork").value;
  var batch = "";
  var batchstud = "";
  if (tadanatwork == "Examiner (Practical Exams)") {
    batch = tadabatch * 50;
    batchstud = tadabatstud * 15;
  } else {
    batch = 0;
    batchstud = 0;
  }
  var totalamt =
    parseInt(amtdailyallowance) +
    parseInt(amttravell) +
    parseInt(batch) +
    parseInt(batchstud);

  $("#tadatotal").val(totalamt);
}

function submittada() {
  var aadharno = document.getElementById("aadhar").value;
  var teachcode = document.getElementById("teachcode").value;
  var tadaorderid = document.getElementById("tadaorderid").value;
  var tadanatwork = document.getElementById("tadanatwork").value;
  var tadawrkdespn = document.getElementById("tadawrkdespn").value;
  var tadadatefrm = document.getElementById("tadadatefrm").value;
  var tadadateto = document.getElementById("tadadateto").value;
  var tadadaysclaim = document.getElementById("tadadaysclaim").value;
  var tadatotdaily = document.getElementById("tadatotdaily").value;
  var tadadistance = document.getElementById("tadadistance").value;
  var tadatravell = document.getElementById("tadatravell").value;
  var tadatotal = document.getElementById("tadatotal").value;

  var nobatch = document.getElementById("tadabatch").value;
  var nostud = document.getElementById("tadabatstud").value;
  var session = document.getElementById("tadasession").value;

  var noquestionpaper = document.getElementById("questionpaper").value;
  var totquespap = document.getElementById("totquespap").value;
  var postprint = document.getElementById("postprint").value;

  if (tadanatwork == "Paper Setting") {
    if (noquestionpaper == "") {
      alert("Enter Number of Question Papers Set");
      document.getElementById("questionpaper").focus();
      return;
    }

    if (totquespap == "") {
      alert("Total Remuneration Claimed");
      document.getElementById("totquespap").focus();
      return;
    }

    if (postprint == "") {
      alert("Enter Postage / Printing Charged");
      document.getElementById("postprint").focus();
      return;
    }
  } else {
    if (tadaorderid == "") {
      alert("Enter Order ID");
      document.getElementById("tadaorderid").focus();
      return;
    }
    if (tadanatwork == "") {
      alert("Select Nature of Work");
      document.getElementById("tadanatwork").focus();
      return;
    }
    if (tadadatefrm == "") {
      alert("Enter From Date");
      document.getElementById("tadadatefrm").focus();
      return;
    }
    if (tadadateto == "") {
      alert("Enter To Date");
      document.getElementById("tadadateto").focus();
      return;
    }
    if (
      tadanatwork == "Examiner (Practical Exams)" ||
      tadanatwork == "Invigilation Duty"
    ) {
    } else {
      if (tadadaysclaim == "") {
        alert("Enter Number of Days for which the Allowance is claimed");
        document.getElementById("tadadaysclaim").focus();
        return;
      }
    }

    if (tadadistance == "") {
      alert("Enter Distance between Kalaburagi and your city");
      document.getElementById("tadadistance").focus();
      return;
    }

    if (tadanatwork == "Examiner (Practical Exams)") {
      if (document.getElementById("tadabatch").value == "") {
        alert("Enter Number of Batches");
        return;
      } else if (document.getElementById("tadabatstud").value == "") {
        alert("Enter Number of Students");
        return;
      }
    }
  }

  var parameterts =
    "&tadaorderid=" +
    tadaorderid +
    "&tadanatwork=" +
    tadanatwork +
    "&tadawrkdespn=" +
    tadawrkdespn +
    "&tadadatefrm=" +
    tadadatefrm +
    "&tadadateto=" +
    tadadateto +
    "&tadadaysclaim=" +
    tadadaysclaim +
    "&tadatotdaily=" +
    tadatotdaily +
    "&tadadistance=" +
    tadadistance +
    "&tadatravell=" +
    tadatravell +
    "&tadatotal=" +
    tadatotal +
    "&aadharno=" +
    aadharno +
    "&teachcode=" +
    teachcode +
    "&nobatch=" +
    nobatch +
    "&nostud=" +
    nostud +
    "&session=" +
    session +
    "&noquestionpaper=" +
    noquestionpaper +
    "&totquespap=" +
    totquespap +
    "&postprint=" +
    postprint;

  //   console.log($host_url);

  var host = "https://universitysolutions.in/tadabills/app.php?a=";

  $.ajax({
    type: "POST",
    data: parameterts,
    url: host + "submittadabill",
    success: function (response) {
      res = JSON.parse(response);
      //   console.log(res.data.FAADHARNO);
      //   return;
      if (res.error_code == 0) {
        // alert("Saved Successfully");
        tadareport(res.data.aadhar, res.data.orderid);
      } else {
        alert(res.data.msg);
        return;
      }
    },
  });
}

function gettadadetails() {
  var adharno = document.getElementById("tadaadhar").value;

  var host = "https://universitysolutions.in/tadabills/app.php?a=";

  $.ajax({
    type: "GET",
    data: "&adharno=" + adharno,
    url: host + "gettadadet",
    success: function (response) {
      var responce = JSON.parse(response);
      if (responce.error_code == 0) {
        $("#tadamob").val(responce.data.fmobile);
        $("#tadaemail").val(responce.data.femail);
        $("#tadaname").val(responce.data.fteachname);
        $("#tadadesignation").val(responce.data.fdegncode);
        $("#tadafaculty").val(responce.data.ffaculty);
        $("#tadadept").val(responce.data.fdeptcode);
        $("#tadacolluniv").val(responce.data.fcollunivname);
        $("#tadacity").val(responce.data.fcity);
        $("#tadapan").val(responce.data.fpanno);
        $("#tadabank").val(responce.data.faccno);
        $("#tadaifsc").val(responce.data.fifsccode);
        $("#tadateachtype").val(responce.data.ftechtype);

        // $("#tadaorderid").val(responce.data.forderid);
        // $("#tadanatwork").val(responce.data.fnatwrk);
        // $("#tadawrkdespn").val(responce.data.fdespnwrk);
        // $("#tadadatefrm").val(responce.data.fclaimfrm);
        // $("#tadadateto").val(responce.data.fclaimto);
        // $("#tadadaysclaim").val(responce.data.fdayallow);
        // $("#tadatotdaily").val(responce.data.ftotdaily);
        // $("#tadadistance").val(responce.data.fdist);
        // $("#tadatravell").val(responce.data.ftravel);
        // $("#tadatotal").val(responce.data.ftotal);
      }
    },
  });
}

function orderiddetails() {
  var orderid = document.getElementById("tadaorderid").value;

  var host = "https://universitysolutions.in/tadabills/app.php?a=";

  $.ajax({
    type: "GET",
    data: "&orderid=" + orderid,
    url: host + "getorderiddet",
    success: function (response) {
      var responce = JSON.parse(response);
      if (responce.error_code == 0) {
        $("#tadaorderid").val(responce.data.forderid);
        $("#tadanatwork").val(responce.data.fnatwrk);
        $("#tadawrkdespn").val(responce.data.fdespnwrk);
        $("#tadadatefrm").val(responce.data.fclaimfrm);
        $("#tadadateto").val(responce.data.fclaimto);
        $("#tadadaysclaim").val(responce.data.fdayallow);
        $("#tadatotdaily").val(responce.data.ftotdaily);
        $("#tadadistance").val(responce.data.fdist);
        $("#tadatravell").val(responce.data.ftravel);
        $("#tadatotal").val(responce.data.ftotal);

        $("#questionpaper").val(responce.data.fnoqust);
        $("#totquespap").val(responce.data.ftotqust);
        $("#postprint").val(responce.data.fpostchrg);
      }
    },
  });
}

function tadareport(aadhar, orderid) {
  var host = "https://universitysolutions.in/tadabills/app.php?a=";
  window.location.href =
    host + "tadabillReport" + "&aadhar=" + aadhar + "&orderid=" + orderid;
}

// noofstudents();
// noofbatches();
// noofdays();
// distancetravell();

// var batch = document.getElementById("tadabatch").value;
// var stud = document.getElementById("tadabatstud").value;
// var daily = document.getElementById("tadatotdaily").value;
// var travel = document.getElementById("tadatravell").value;