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.191.171.136
Current Path : /var/www/oasis/js_old/ |
| Current File : /var/www/oasis/js_old/challan_entries.js |
function CallEnableChallanEntries() {
$("#page_main_div").load("../html_modules/challan_entry.html", function() {
document.getElementById("display_module_name").innerHTML =
"Challan Entries";
document.getElementById("module_name_for_save").value = "Challan Entries";
getDefaultHeadFooterLinks("Challan Entries");
$(".ui-tabs .ui-tabs-panel").css("padding", "0px");
$(".ui-tabs .ui-tabs-panel").css("padding-top", "21px");
DisplayChallanEntryDetails();
});
}
function DisplayChallanEntryDetails() {
$.ajax({
type: "POST",
data: "",
url: $host_url + "DisplayChallanEntryDetails",
success: DisplayChallanEntryDetailsResponce
});
}
function DisplayChallanEntryDetailsResponce(responce) {
responce = eval("(" + responce + ")");
$("#challan_entry").html("");
$("#challan_entry").html(responce.data["html"]);
}
function DeleteChallanDetails(FDOCNO) {
var flag = confirm("Do you want to Delete Application");
if (flag) {
$.ajax({
type: "POST",
data: "&FDOCNO=" + FDOCNO,
url: $host_url + "DeleteChallanDetails",
success: function DeleteChallanDetailsResponce(responce) {
responce = eval("(" + responce + ")");
DisplayChallanEntryDetails();
}
});
}
}
function DeleteDocNoFromChallanDetails(FDOCNO, APPNO) {
var flag = confirm("Do you want to Delete Challan");
if (flag) {
$.ajax({
type: "POST",
data: "&APPNO=" + APPNO,
url: $host_url + "DeleteDocNoFromChallanDetails",
success: function DeleteDocNoFromChallanDetailsResponce(responce) {
responce = eval("(" + responce + ")");
ShowApplicationsForDocNo(FDOCNO);
}
});
}
}
function EnableChallanUpdateScreen(FDOCNO) {
$("#challan_entry").html("");
$("#challan_entry").load(
"../html_modules/challan_entry_update.html",
function() {
$("#doc_id").html("Document Number: " + FDOCNO);
ShowApplicationsForDocNo(FDOCNO);
$("#challan_details_update").bind("click", function() {
UpdateChallanDetailsForDoc(FDOCNO);
});
}
);
}
function UpdateChallanDetailsForDoc(FDOCNO) {
var challan_no = $("#challan_no").val();
var challan_date = date_format($("#challan_date").val());
var challan_amt = $("#challan_amt").val();
var challan_place = $("#challan_place").val();
var challan_bank = $("#challan_bank").val();
if (empty(challan_no)) {
alert("Please Enter Challan No");
$("#challan_no").focus();
return false;
} else if (empty(challan_amt)) {
alert("Please Enter Challan No");
$("#challan_amt").focus();
return false;
}
var lst_str = "&challan_no=" + challan_no;
lst_str += "&challan_date=" + challan_date;
lst_str += "&challan_amt=" + challan_amt;
lst_str += "&challan_place=" + challan_place;
lst_str += "&challan_bank=" + challan_bank;
$.ajax({
type: "POST",
data: "&FDOCNO=" + FDOCNO + lst_str,
url: $host_url + "UpdateChallanDetailsForDoc",
success: function UpdateChallanDetailsForDocResponce(responce) {
responce = eval("(" + responce + ")");
if (responce.error_code == 0) {
alert(responce.data);
CallEnableChallanEntries();
} else {
alert(responce.data);
}
}
});
}
function ShowApplicationsForDocNo(FDOCNO) {
$.ajax({
type: "POST",
data: "&FDOCNO=" + FDOCNO,
url: $host_url + "ShowApplicationsForDocNo",
success: function ShowApplicationsForDocNoResponce(responce) {
responce = eval("(" + responce + ")");
$("#challan_update_applications").html("");
$("#challan_update_applications").html(responce.data["html"]);
var data_obj = responce.data["data"];
$("#challan_no").val(data_obj["FCHALLANNO"]);
$("#challan_date").val(data_obj["FCHALLANDATE"]);
$("#challan_amt").val(data_obj["FAMOUNT"]);
$("#challan_place").val(data_obj["FCHALLANPLACE"]);
$("#challan_bank").val(data_obj["FCHALLANBANK"]);
$("#td_challan_tot").val(data_obj["FAMOUNT"]);
}
});
}
function PrintChallanEntryDetails(doc_no) {
window.location.href =
$host_url +
"PrintChallanEntryDetails&doc_no=" +
doc_no +
"&print_type=College";
}
|