Commit 01815b3d authored by vdhoble's avatar vdhoble

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101171 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 85d95ba6
......@@ -1224,6 +1224,7 @@ function addAndRemoveDetail(tableName, flag, field)
}
}
setCummBal();
}
if (flag == "A")
{
......@@ -1435,8 +1436,13 @@ function addAndRemoveDetail(tableName, flag, field)
document.getElementById(formId + "." + domID + ".line_no__ref").value = 1;
document.getElementById(formId + "." + (domID) + ".ref_no").value = '' ;
document.getElementById(formId + "." + domID + ".rcp_amt").value = 0.00;
/* document.getElementById(formId + "." + domID + ".cumm_bal").setAttribute("PROTECT") = '1';
document.getElementById(formId + "." + domID + ".cumm_bal").value = '1';*/
document.getElementById(formId + "." + (domID) + ".status").value = "N";
document.getElementById(formId + "." + (domID) + ".updateFlag").value = "A";
// alert(document.getElementById(formId + "." + (domID) + ".status").value);
// alert(document.getElementById(formId + "." + (domID) + ".updateFlag").value);
try
{
var tempLine_no = " " + domID;
......@@ -1448,6 +1454,7 @@ function addAndRemoveDetail(tableName, flag, field)
document.getElementById(formId + "." + domID + ".rcp_amt").value = 0.00;
document.getElementById(formId + "." + domID + ".ref_ser").value = '';
document.getElementById(formId + "." + domID + ".ref_no").value = '';
var objName = document.getElementById("OBJ_NAME").value;
// alert("OBJ NAME******"+objName)
} catch (err)
......@@ -2229,7 +2236,7 @@ function addRow()
domIDCurrent = popImgId//parseInt(popImgId.substring(first + 1, last));
//alert("DOM ID CURRENT == "+domIDCurrent);
// alert("DOM ID CURRENT == "+domIDCurrent);
// input_obj = document.getElementsByTagName('input'); //input_obj = document.getElementsByTagName('input');
......@@ -2324,13 +2331,14 @@ for(var j = 0 ;j < (global.length);j++){
maxLineNo = currLineNo;
}
//alert("insidinggggggg Addition");
// alert("insidinggggggg Addition");
// alert("Reference series *** "+refSer);
// alert("DOM ID ==== "+domID);
//alert("ref no =="+refno+"Dom iD"+domID);
if(domID == domIDCurrent)
{
//alert("ref no =="+refno);
// parent.document.getElementById(formId + "." + domID + ".line_no").value = domID;
parent.document.getElementById(formId + "." + domID + ".ref_ser").value = refSer;
......@@ -2461,7 +2469,7 @@ for(var j = 0 ;j < (global.length);j++){
pos = fieldNameImg.lastIndexOf(".");
//domID = maxLineNo + 1;
//alert("DOM ID == "+domID);
// alert("DOM ID == "+domID);
fieldNameImg = fieldNameImg.substring(pos + 1, fieldNameImg.length);
imgFields[count1].id = formId + "." + domID + "." + fieldNameImg;
//imgFields[count1].name = formId + "." + domID + "." + fieldNameImg;
......@@ -2524,13 +2532,85 @@ parent.maxlineNoMap[tableName] = domID;
/*maxlineNoMap[tableName] = '';
maxlineNoMap[tableName] = domID;
alert(maxlineNoMap[tableName]);*/
setCummBalPop();
quitBox();//calling close window
}
function setCummBalPop()
{
var rcpAmt = 0.00;
var table = parent.document.getElementById("detailTable");
tableLength = table.rows.length;
//alert("Table Length == "+tableLength);
for(cnt = 1;cnt < tableLength ; cnt++)
{
inputField = table.rows[cnt].cells[0].getElementsByTagName("input")[0];
//alert("inputField>>>>>"+inputField);
inputFieldID = inputField.id;
//alert("inputFieldID>>>>>>"+inputFieldID);
pos1 = inputFieldID.indexOf(".");
formId = inputFieldID.substring(0, pos1);
//alert("formId>>>>>>"+formId);
pos = inputFieldID.lastIndexOf(".");
domID = parseInt(inputFieldID.substring(pos1 + 1, pos));
var receiptAmt = parent.document.getElementById("Detail2" + "." + domID + ".rcp_amt").value ;
var rcpAmt = parseInt(rcpAmt) + parseInt(receiptAmt);
//alert(rcpAmt);
var cummBal = parent.document.getElementById("Detail1" + "." + "1" + ".chq_amt").value - parseInt(rcpAmt);
//alert("cummBal :::"+cummBal);
parent.document.getElementById("Detail1" + "." + "1" + ".cumm_bal").value = parseInt(cummBal);
}
}
function setCummBal()
{
var rcpAmt = 0.00;
var table = document.getElementById("detailTable");
tableLength = table.rows.length;
//alert("Table Length == "+tableLength);
for(cnt = 1;cnt < tableLength ; cnt++)
{
//alert("cnt>>>>>>>>>>"+cnt)
inputField = table.rows[cnt].cells[0].getElementsByTagName("input")[0];
//alert("inputField>>>>>"+inputField);
inputFieldID = inputField.id;
//alert("inputFieldID>>>>>>"+inputFieldID);
pos1 = inputFieldID.indexOf(".");
formId = inputFieldID.substring(0, pos1);
//alert("formId>>>>>>"+formId);
pos = inputFieldID.lastIndexOf(".");
domID = parseInt(inputFieldID.substring(pos1 + 1, pos));
//alert("DOM ID "+domID);
var receiptAmt = document.getElementById("Detail2" + "." + domID + ".rcp_amt").value ;
var rcpAmt = parseInt(rcpAmt) + parseInt(receiptAmt);
//alert(rcpAmt);
var cummBal = document.getElementById("Detail1" + "." + "1" + ".chq_amt").value - parseInt(rcpAmt);
// alert("cummBal for field :::"+cummBal);
document.getElementById("Detail1" + "." + "1" + ".cumm_bal").value = parseInt(cummBal);
}
}
/********delete row with re index***try by vishakha****/
/*
function deleteReindex(obj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment