Commit ee0bf1ee authored by cpatil's avatar cpatil

update for issue


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103632 ce508802-f39f-4f6c-b175-0d175dae99d5
parent abe20df3
......@@ -3065,13 +3065,17 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
System.out.println("itemChanged() called for DespatchManualIC.........");
String valueXmlString = "";
try {
if (xmlString != null && xmlString.trim().length() > 0) {
if (xmlString != null && xmlString.trim().length() > 0)
{
System.out.println("itemChanged() xmlString ["+xmlString+"].........");
dom = parseString(xmlString);
}
if (xmlString1 != null && xmlString1.trim().length() > 0) {
System.out.println("itemChanged() xmlString1 ["+xmlString1+"].........");
dom1 = parseString(xmlString1);
}
if (xmlString2 != null && xmlString2.trim().length() > 0) {
System.out.println("itemChanged() xmlString2 ["+xmlString2+"].........");
dom2 = parseString(xmlString2);
}
valueXmlString = itemChanged(dom, dom1, dom2, objContext,
......@@ -3088,7 +3092,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
public String itemChanged(Document dom, Document dom1, Document dom2,
String objContext, String currentColumn, String editFlag,
String xtraParams) throws RemoteException, ITMException {
String childNodeName = null;
String childNodeName = null,childNodeName1="";
String sql = "",columnValue="";
StringBuffer valueXmlString = new StringBuffer();
int ctr = 0;
......@@ -3149,6 +3153,20 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
ArrayList quantityStduomList = new ArrayList();
String lrDateStr="";
double tempTotalNetAmt=0, totalNetAmt=0;
NodeList childList = null;
NodeList parentList = null;
NodeList childList1 = null;
Node parentNode1 = null;
Node childNode1 = null;
int childNodeListLength1=0,curlineno=0;
String linenoStr="";
double quantityTemp = 0,rateStduomTemp = 0,taxAmtTemp = 0,discAmtTemp = 0,currtotalNetAmt=0;
try {
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(
......@@ -3917,7 +3935,9 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
System.out.println("IN DETAIL column name is %%%%%%%%%%%%%["+ currentColumn + "] ==> '" + columnValue + "'");
if (currentColumn.trim().equalsIgnoreCase("itm_defaultedit"))
{/*
{
System.out.println("@@@@ itm_defaultedit called............");
/*
valueXmlString.append("<qty_details protect = '1'>").append("<![CDATA[]]>").append("</qty_details>");
if dw_detbrow[ii_currformno].RowCount() > 0 then
......@@ -3928,7 +3948,74 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
end if
end if
*/}
*/
/*
String lineNoCurrent = checkNull(genericUtility.getColumnValue("line_no", dom)).trim();
double preQuantityTemp = 0,preRateStduomTemp = 0,preTaxAmtTemp = 0,preDiscAmtTemp = 0,pretotalNetAmtTemp=0;
parentList = dom.getElementsByTagName("Detail2");
int parentNodeListLength1 = parentList.getLength();
for (int prntCtr = parentNodeListLength1; prntCtr > 0; prntCtr-- )
{
parentNode1 = parentList.item(prntCtr-1);
childList1 = parentNode1.getChildNodes();
for (int ctr1 = 0; ctr1 < childList1.getLength(); ctr1++)
{
childNode1 = childList1.item(ctr1);
childNodeName1 = childNode1.getNodeName();
if (childNodeName1.equalsIgnoreCase("line_no"))
{
linenoStr = checkNull(genericUtility.getColumnValue("line_no", dom2)).trim();
System.out.println("@@@@ previous line linenoStr["+linenoStr+"] ");
}
if (childNodeName1.equalsIgnoreCase("quantity"))
{
preQuantityTemp = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("quantity", dom2)));
System.out.println("@@@@ previous line linenoStr["+linenoStr+"] preQuantityTemp["+preQuantityTemp+"]");
}
if (childNodeName1.equalsIgnoreCase("rate__stduom"))
{
preRateStduomTemp = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("rate__stduom", dom2)));
System.out.println("@@@@ previous line linenoStr["+linenoStr+"] preRateStduomTemp["+preRateStduomTemp+"]");
}
if (childNodeName1.equalsIgnoreCase("tax_amt"))
{
preTaxAmtTemp = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("tax_amt", dom2)));
System.out.println("@@@@ previous line linenoStr["+linenoStr+"] preTaxAmtTemp["+preTaxAmtTemp+"]");
}
if (childNodeName1.equalsIgnoreCase("disc_amt"))
{
preDiscAmtTemp = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("disc_amt", dom2)));
System.out.println("@@@@ previous line linenoStr["+linenoStr+"] preDiscAmtTemp["+preDiscAmtTemp+"]");
}
}
if( linenoStr!= null && linenoStr.trim().length() > 0 && ( Integer.parseInt(linenoStr) < Integer.parseInt(lineNoCurrent) ))
{
pretotalNetAmtTemp = (preQuantityTemp * preRateStduomTemp) + preTaxAmtTemp - preDiscAmtTemp ;
totalNetAmt = totalNetAmt + pretotalNetAmtTemp;
}
}
System.out.println("@@@@ previous totalNetAmt["+totalNetAmt+"]");
quantityTemp = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("quantity", dom)));
rateStduomTemp = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("rate__stduom", dom)));
taxAmtTemp = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("tax_amt", dom)));
discAmtTemp = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("disc_amt", dom)));
System.out.println("@@@@ current line quantityTemp["+quantityTemp+"]rateStduomTemp["+rateStduomTemp+"]taxAmtTemp["+taxAmtTemp+"]discAmtTemp["+discAmtTemp+"]");
currtotalNetAmt = (quantityTemp * rateStduomTemp) + taxAmtTemp - discAmtTemp ;
System.out.println("@@@@ current line currtotalNetAmt["+currtotalNetAmt+"]totalNetAmt["+totalNetAmt+"]");
totalNetAmt = totalNetAmt + currtotalNetAmt;
System.out.println("@@@@ teoal currtotalNetAmt["+currtotalNetAmt+"]");
valueXmlString.append("<total_net_amt>").append("<![CDATA["+totalNetAmt+"]]>").append("</total_net_amt>");
*/
}
else if (currentColumn.trim().equalsIgnoreCase("itm_default"))
{
......
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