Commit 6b878f8e authored by agaikwad's avatar agaikwad

Request_id-F15GDOS001

Amount getting seprated  in Bank statement table, if selected all  in Bank Reco. process


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98723 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6db00fd3
......@@ -653,7 +653,7 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,BankReco
}//end inner for
counter++;
}//end outer for
int loop = amountList.size();
/*int loop = amountList.size();
/* --Commented Changes below by Gulzar 15/11/06
for (int c = 0; c < loop; c++)
{
......@@ -663,13 +663,13 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,BankReco
}
*///End Comment Gulzar 15/11/06
//Added By Gulzar 15/11/06
for (int c = 0; c < loop; c++)
/*for (int c = 0; c < loop; c++)
{
amt = amt + Double.parseDouble(amountList.get(c).toString()); //Sum the original amount
amt2 = Double.parseDouble(amountList.get(c).toString()) - Double.parseDouble(amtAdjList.get(c).toString());
amountList.set(c, new Double(amt2));
amt3 = amt3 + Double.parseDouble(amountList.get(c).toString()); //Sum the amount after adjusted
}
} */
//End Addition gulzar 15/11/06
System.out.println("Sum Of Original Amount (amt) is : " + amt);
System.out.println("Sum Of Amount After adjusted (amt3) is : " + amt3);
......@@ -779,7 +779,20 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,BankReco
errCode = "VTSEQ";
return errCode;
}
int loop = amountList.size();
/* --Commented Changes below by Gulzar 15/11/06
for (int c = 0; c < loop; c++)
{
amt2 = Double.parseDouble(amountList.get(c).toString()) - Double.parseDouble(amtAdj);
amountList.add(c, new Double(amt2));
amt = amt + Double.parseDouble(amountList.get(c).toString());
}
*///End Comment Gulzar 15/11/06
//Added By Gulzar 15/11/06
for (int c = 0; c < loop; c++)
{
String xmlValues = "";
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>";
xmlValues = xmlValues + "<Detail1>";
......@@ -803,6 +816,10 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,BankReco
amtAdj = Double.toString(amt);
}*///Gulzar 15/11/06
//double amtAdj1 = Double.parseDouble(amtAdj); //Gulzar 15/11/06
amt = Double.parseDouble(amountList.get(c).toString());
System.out.println("Amount@@@@@@@@@@@@"+amt);
amt3 = Double.parseDouble(amtAdjList.get(c).toString());
System.out.println("Adj Amount@@@@@@@@@@@@"+amt3);
java.sql.Date effDate1 = java.sql.Date.valueOf(genericUtility.getValidDateString(effDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
System.out.println("effDate1 :"+effDate1);
System.out.println("refDate :"+new java.sql.Date(System.currentTimeMillis()));
......@@ -841,8 +858,8 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,BankReco
System.out.println("counter :"+counter);
if (insertCnt != 0)
{
for (int intcnt = 0; intcnt < counter; intcnt++)
{
//for (int intcnt = 0; intcnt < counter; intcnt++)
//{
/* -- Commented and Changes below by Gulzar 15/11/06
if (cnt == 1)
{
......@@ -855,16 +872,16 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,BankReco
System.out.println("amt from else :"+amt);
}*///End Comment Gulzar 15/11/06
amt = Double.parseDouble(amountList.get(intcnt).toString());
amt = Double.parseDouble(amountList.get(c).toString());
System.out.println("amt while inseting into bankreco_trace is :"+amt);
insertSql = "insert into bankreco_trace(tran_id__stat, tran_id__log, amount) values (?, ?, ?)";
System.out.println("insertSql :"+insertSql);
System.out.println("tranIdList.get(intcnt).toString() :"+tranIdList.get(intcnt).toString());
System.out.println("tranIdList.get(intcnt).toString() :"+tranIdList.get(c).toString());
PreparedStatement pstmt1 = conn.prepareStatement(insertSql);
pstmt1.setString(1, uniqueKey);
pstmt1.setString(2, tranIdList.get(intcnt).toString());
pstmt1.setString(2, tranIdList.get(c).toString());
pstmt1.setDouble(3, amt);
insertCnt = pstmt1.executeUpdate();
pstmt1.close();
......@@ -892,12 +909,11 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,BankReco
pstmt2.setDouble(2, amt);
pstmt2.setDouble(3, Double.parseDouble(exchRate));
pstmt2.setString(4, currCode);
pstmt2.setString(5, tranIdList.get(intcnt).toString());
pstmt2.setString(5, tranIdList.get(c).toString());
updateCnt = pstmt2.executeUpdate();
System.out.println("updateCnt :"+updateCnt);
pstmt2.close();
pstmt2 = null;
}//for end
conn.commit();
// 12/05/09 manoharan changed the message
......@@ -910,7 +926,9 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,BankReco
{
errCode = "VTPROCUS";
}
}
}
catch(SQLException e)
{
e.printStackTrace();
......
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