Commit 3b9f81f4 authored by ngadkari's avatar ngadkari

Provision needed to transfer positive payable to negative receivables and...

Provision needed to transfer positive payable to negative receivables and similarly provision needed to transfer positive receivables to negative paya

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184110 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a4569e3a
...@@ -68,19 +68,17 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -68,19 +68,17 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
String errCode = ""; String errCode = "";
String errString = ""; String errString = "";
String resultString = "";; String resultString = "";;
String getDataSql1= "",getDataSql2="",getDataSql3=""; String getDataSql1= "";
String tempString = null; String tempString = null;
Connection conn = null; Connection conn = null;
ResultSet rs = null; ResultSet rs = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
Statement st = null;
StringBuffer retTabSepStrBuff = new StringBuffer("<?xml version = \"1.0\"?>"); StringBuffer retTabSepStrBuff = new StringBuffer("<?xml version = \"1.0\"?>");
retTabSepStrBuff.append("<DocumentRoot>"); retTabSepStrBuff.append("<DocumentRoot>");
retTabSepStrBuff.append("<description>").append("Datawindow Root").append("</description>"); retTabSepStrBuff.append("<description>").append("Datawindow Root").append("</description>");
retTabSepStrBuff.append("<group0>"); retTabSepStrBuff.append("<group0>");
retTabSepStrBuff.append("<description>").append("Group0 description").append("</description>"); retTabSepStrBuff.append("<description>").append("Group0 description").append("</description>");
retTabSepStrBuff.append("<Header0>"); retTabSepStrBuff.append("<Header0>");
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
System.out.println("xtraParams $$$$$$$$$$$$$$$$$$$$$$$$ "+xtraParams); System.out.println("xtraParams $$$$$$$$$$$$$$$$$$$$$$$$ "+xtraParams);
String userId = ""; String userId = "";
...@@ -187,7 +185,6 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -187,7 +185,6 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
errString = itmDBAccessEJB.getErrorString("","VTBLNKPRD","","",conn); errString = itmDBAccessEJB.getErrorString("","VTBLNKPRD","","",conn);
return errString; return errString;
} }
st = conn.createStatement();
try try
{ {
...@@ -263,7 +260,8 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -263,7 +260,8 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
} }
//while //while
rs.close();rs = null;
pstmt.close();pstmt = null;
retTabSepStrBuff.append("</Header0>\r\n"); retTabSepStrBuff.append("</Header0>\r\n");
retTabSepStrBuff.append("</group0>\r\n"); retTabSepStrBuff.append("</group0>\r\n");
retTabSepStrBuff.append("</DocumentRoot>\r\n"); retTabSepStrBuff.append("</DocumentRoot>\r\n");
...@@ -376,10 +374,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -376,10 +374,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
Node childNode = null; Node childNode = null;
boolean flag = false; boolean flag = false;
Timestamp tranDate = null; Timestamp tranDate = null;
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
//HashMap<String, String> hdrMap = null;
try try
{ {
...@@ -388,6 +383,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -388,6 +383,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
sTranDate = checkNull(genericUtility.getColumnValue("tran_date", headerDom)); sTranDate = checkNull(genericUtility.getColumnValue("tran_date", headerDom));
if(sTranDate != null && sTranDate.trim().length() > 0){ if(sTranDate != null && sTranDate.trim().length() > 0){
tranDate = Timestamp.valueOf(genericUtility.getValidDateString(sTranDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); tranDate = Timestamp.valueOf(genericUtility.getValidDateString(sTranDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
} }
parentNodeList = detailDom.getElementsByTagName("Detail2"); parentNodeList = detailDom.getElementsByTagName("Detail2");
...@@ -407,6 +403,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -407,6 +403,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
sRefDate=checkNull(genericUtility.getColumnValueFromNode("ref_date", parentNode)); sRefDate=checkNull(genericUtility.getColumnValueFromNode("ref_date", parentNode));
if(sRefDate != null){ if(sRefDate != null){
refDate = Timestamp.valueOf(genericUtility.getValidDateString(sRefDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); refDate = Timestamp.valueOf(genericUtility.getValidDateString(sRefDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
} }
sTotAmt=checkNull(genericUtility.getColumnValueFromNode("tot_amt", parentNode)); sTotAmt=checkNull(genericUtility.getColumnValueFromNode("tot_amt", parentNode));
if(sTotAmt != null && sTotAmt.trim().length() > 0) if(sTotAmt != null && sTotAmt.trim().length() > 0)
...@@ -448,7 +445,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -448,7 +445,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
sql = "update receivables set adj_amt = tot_amt, stat_date = ?, status = 'A' " + sql = "update misc_payables set adj_amt = tot_amt, status_date = ?, status = 'A' " +
" where tran_ser = ? " + " where tran_ser = ? " +
" and ref_no = ? "; " and ref_no = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -473,7 +470,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -473,7 +470,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
String XMLString = "<?xml version=\"1.0\"?>\r\n<Root>\r\n<header>"+ String XMLString = "<?xml version=\"1.0\"?>\r\n<Root>\r\n<header>"+
"\r\n</header><Detail1>"+ "\r\n</header><Detail1>"+
"\r\n<site_code>"+siteCode+"</site_code>\r\n<tran_date>"+tranDate+"</tran_date></Detail1></Root>"; "\r\n<tran_id></tran_id>\r\n<site_code>"+siteCode+"</site_code>\r\n<tran_date>"+sTranDate+"</tran_date></Detail1></Root>";
CommonConstants.setIBASEHOME(); CommonConstants.setIBASEHOME();
TransIDGenerator tg = new TransIDGenerator(XMLString,"SYSTEM",CommonConstants.DB_NAME); //FOR DB2 TransIDGenerator tg = new TransIDGenerator(XMLString,"SYSTEM",CommonConstants.DB_NAME); //FOR DB2
...@@ -517,18 +514,15 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR ...@@ -517,18 +514,15 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
pstmt.close(); pstmt.close();
pstmt =null; pstmt =null;
}
if (errString == null || errString.trim().length() == 0) {
if (errString == null || errString.trim().length() == 0) { errString = itmDBAccessEJB.getErrorString("","VTCOMPL","","",conn);
if(conn != null){
errString = itmDBAccessEJB.getErrorString("","VTCOMPL","","",conn); conn.commit();
if(conn != null){ System.out.println("commited....!!!");
conn.commit(); }
System.out.println("commited....!!!"); return errString;
}
return errString;
}
} }
}//try end }//try end
......
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