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
String errCode = "";
String errString = "";
String resultString = "";;
String getDataSql1= "",getDataSql2="",getDataSql3="";
String getDataSql1= "";
String tempString = null;
Connection conn = null;
ResultSet rs = null;
PreparedStatement pstmt = null;
Statement st = null;
StringBuffer retTabSepStrBuff = new StringBuffer("<?xml version = \"1.0\"?>");
retTabSepStrBuff.append("<DocumentRoot>");
retTabSepStrBuff.append("<description>").append("Datawindow Root").append("</description>");
retTabSepStrBuff.append("<group0>");
retTabSepStrBuff.append("<description>").append("Group0 description").append("</description>");
retTabSepStrBuff.append("<Header0>");
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
System.out.println("xtraParams $$$$$$$$$$$$$$$$$$$$$$$$ "+xtraParams);
String userId = "";
......@@ -187,7 +185,6 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
errString = itmDBAccessEJB.getErrorString("","VTBLNKPRD","","",conn);
return errString;
}
st = conn.createStatement();
try
{
......@@ -263,7 +260,8 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
}
//while
rs.close();rs = null;
pstmt.close();pstmt = null;
retTabSepStrBuff.append("</Header0>\r\n");
retTabSepStrBuff.append("</group0>\r\n");
retTabSepStrBuff.append("</DocumentRoot>\r\n");
......@@ -376,10 +374,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
Node childNode = null;
boolean flag = false;
Timestamp tranDate = null;
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
//HashMap<String, String> hdrMap = null;
try
{
......@@ -388,6 +383,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
sTranDate = checkNull(genericUtility.getColumnValue("tran_date", headerDom));
if(sTranDate != null && sTranDate.trim().length() > 0){
tranDate = Timestamp.valueOf(genericUtility.getValidDateString(sTranDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
parentNodeList = detailDom.getElementsByTagName("Detail2");
......@@ -407,6 +403,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
sRefDate=checkNull(genericUtility.getColumnValueFromNode("ref_date", parentNode));
if(sRefDate != null){
refDate = Timestamp.valueOf(genericUtility.getValidDateString(sRefDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
sTotAmt=checkNull(genericUtility.getColumnValueFromNode("tot_amt", parentNode));
if(sTotAmt != null && sTotAmt.trim().length() > 0)
......@@ -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 = ? " +
" and ref_no = ? ";
pstmt = conn.prepareStatement(sql);
......@@ -473,7 +470,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
String XMLString = "<?xml version=\"1.0\"?>\r\n<Root>\r\n<header>"+
"\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();
TransIDGenerator tg = new TransIDGenerator(XMLString,"SYSTEM",CommonConstants.DB_NAME); //FOR DB2
......@@ -517,9 +514,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
pstmt.close();
pstmt =null;
}
if (errString == null || errString.trim().length() == 0) {
errString = itmDBAccessEJB.getErrorString("","VTCOMPL","","",conn);
......@@ -529,7 +524,6 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
}
return errString;
}
}
}//try end
catch(Exception e)
......
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