Commit 269477a7 authored by rtiwari's avatar rtiwari

update for required change on 26/02/14 - reversal JV


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94307 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2a9d3b89
......@@ -84,7 +84,7 @@ public class AcctBalTransPrc extends ProcessEJB implements AcctBalTransPrcLocal,
} //end of confirm method
public String process(Document dom, Document dom2, String windowName,String xtraParams) throws RemoteException, ITMException
{
System.out.println("AcctBalTransPrc process called........");
System.out.println("AcctBalTransPrc process called 26/feb/2014 changed done........");
String errString = "";
Connection conn = null;
ConnDriver connDriver = null;
......@@ -148,6 +148,28 @@ public class AcctBalTransPrc extends ProcessEJB implements AcctBalTransPrcLocal,
errString = itmDBAccessEJB.getErrorString("","VPEMPCD2 ","","",conn);
return errString;
}
// added on 21/feb/14 start
sql = " select count(*) from misc_payables where sundry_code = ? and sundry_type = 'E' and tot_amt <> adj_amt and site_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode.trim());
pstmt.setString(2, siteCodeFr.trim());
rs = pstmt.executeQuery();
if ( rs.next() )
{
cnt = rs.getInt(1);
}
if(rs != null)
rs.close();
rs = null;
if(pstmt != null)
pstmt.close();
pstmt = null;
if(cnt > 0)
{
errString = itmDBAccessEJB.getErrorString("","VPMISCPAY","","",conn);
return errString;
}
// added on 21/feb/14 end
}
if(siteCodeFr !=null && siteCodeFr.trim().length() > 0)
{
......@@ -449,7 +471,7 @@ public class AcctBalTransPrc extends ProcessEJB implements AcctBalTransPrcLocal,
xmlBuff.append("<auto_rev><![CDATA[Y]]></auto_rev>");
xmlBuff.append("<status><![CDATA[A]]></status>");
xmlBuff.append("<status><![CDATA[N]]></status>");
xmlBuff.append("<fin_entity><![CDATA["+ finEntity +"]]></fin_entity>");
......@@ -620,8 +642,14 @@ public class AcctBalTransPrc extends ProcessEJB implements AcctBalTransPrcLocal,
xmlBuff.append("</Detail2>");
totAmt = totAmt + amount;
totAmt = 100;
}
if(rs != null)
rs.close();
rs = null;
if(pstmt != null)
pstmt.close();
pstmt = null;
if(totAmt == 0)
{
retString = "vtnetamt";
......@@ -683,11 +711,20 @@ public class AcctBalTransPrc extends ProcessEJB implements AcctBalTransPrcLocal,
int endIndex = arrayForTranId[1].indexOf("</TranID>");
String tranIdForIssue = arrayForTranId[1].substring(0,endIndex);
System.out.println("-tranIdForIssue-"+tranIdForIssue);
sql = " update journal set status = 'N' where tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranIdForIssue);
pstmt.executeUpdate();
if(pstmt != null)
pstmt.close();
pstmt = null;
conn.commit();
retString = confirmJournalVoucher("journal",tranIdForIssue,xtraParams,conn);
System.out.println("retString from confirmJV :: @:: "+retString);//CONFSUCC
String empCodeAprv = GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
System.out.println("empCodeAprv : "+empCodeAprv);
}
}
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