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