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


Current Path : /var/www/oasis/js_old/
Upload File :
Current File : /var/www/oasis/js_old/challan_preparation.js

function CallEnableChallanPreparation() {
  $("#page_main_div").load(
    "../html_modules/challan_preparation.html",
    function() {
      document.getElementById("display_module_name").innerHTML =
        "Challan Preparation ";
      document.getElementById("module_name_for_save").value =
        "Challan Preparation ";
      getDefaultHeadFooterLinks("Challan Preparation ");
      $(".ui-tabs .ui-tabs-panel").css("padding", "0px");
      $(".ui-tabs .ui-tabs-panel").css("padding-top", "21px");
    }
  );
}
function DisplayChallanPreparationDetails() {
  $.ajax({
    type: "POST",
    data: "&up_to=" + date_format($("#up_to").val()),
    url: $host_url + "DisplayChallanPreparationDetails",
    success: DisplayChallanPreparationDetailsResponce
  });
}
function DeleteAckowledgedApplications(APPNO) {
  var flag = confirm("Do you want to Delete Ackowledgement");
  if (flag) {
    $.ajax({
      type: "POST",
      data: "&APPNO=" + APPNO,
      url: $host_url + "DeleteAckowledgedApplications",
      success: function DeleteAckowledgedApplicationsResponce(responce) {
        responce = eval("(" + responce + ")");
        DisplayChallanPreparationDetails();
      }
    });
  }
}
function DisplayChallanPreparationDetailsResponce(responce) {
  responce = eval("(" + responce + ")");
  $("#ack_rv_rt_application_details").html("");
  $("#ack_rv_rt_application_details").html(responce.data["html"]);
}
function SelectAllChallanPreparationCheckBox() {
  var obj = $("input[id*='ack_check_box_']");
  jQuery.each(obj, function(k, v) {
    $(this).attr("checked", true);
  });
}
function PrepareChallanDetailsForRvRT() {
  checked_app_nos = new Array();
  var obj = $("input[id*='ack_check_box_']");
  jQuery.each(obj, function(k, v) {
    row_id = v["id"].split("_")[3];
    if ($(this).is(":checked")) checked_app_nos.push(row_id);
  });
  if (empty(checked_app_nos)) {
    alert("Please select minumum one application to Prepare Challan.");
    return false;
  }
  $.ajax({
    type: "POST",
    data: "checked_app_nos=" + checked_app_nos,
    url: $host_url + "PrepareChallanDetailsForRvRT",
    success: PrepareChallanDetailsForRvRTResponce
  });
}
function PrepareChallanDetailsForRvRTResponce(responce) {
  responce = eval("(" + responce + ")");
  //alert(responce.data);
  $("#challan_dialog").remove();
  $(".contents").append(
    "  <div id='challan_dialog' title='Challan Prepared Successfully'></div>"
  );
  $("#challan_dialog").dialog({
    autoOpen: false,
    modal: true,
    width: 400,
    buttons: {
      Ok: function() {
        $(this).dialog("close");
      },
      Cancel: function() {
        $(this).dialog("close");
      }
    }
  });
  $("#challan_dialog").dialog("open");
  $("#challan_dialog").html(responce.data["html"]);
  //DisplayAllAckApplications();
}
function CloseChallanDialog() {
  $("#challan_dialog").dialog("close");
  DisplayChallanPreparationDetails();
}