Commit b052ca19 authored by cpatil's avatar cpatil

added amount == 0 condition


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98305 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 29ac202b
......@@ -34,8 +34,8 @@ import javax.xml.rpc.ParameterMode;
//------
public class POMilestoneCnf
{
public class POMilestoneCnf
{
public String confMilestone( String tranId, String xmlDataAll, String editFlag ) throws Exception
......@@ -209,7 +209,7 @@ import javax.xml.rpc.ParameterMode;
pstmt.close();
pstmt = null;
// xml iterate
// xml iterate
Document xmlDataAllDom= null;
if(xmlDataAll != null && xmlDataAll.trim().length()!=0)
{
......@@ -445,6 +445,8 @@ import javax.xml.rpc.ParameterMode;
drcrMap.put("rel_amt", String.valueOf(amount));
drcrMap.put("date_diff", String.valueOf(timeDiff));
if( amount == 0 )
{
returnStr = createDebitNote(drcrMap,conn);
System.out.println("createDebitNote tranId["+tranId+"]returnStr["+returnStr+"]");
if( returnStr.indexOf("Success") > -1 )
......@@ -487,16 +489,24 @@ import javax.xml.rpc.ParameterMode;
conn.rollback();
}
} // end amount condition
else
{
returnStr = "SucAmtZero";
}
}
System.out.println("@@@@@@@@@@@ before status update pur_milstn returnStr["+returnStr+"]");
if(returnStr.indexOf("Success") > -1 || returnStr.indexOf("VTSUCC1") > -1 )
if(returnStr.indexOf("Success") > -1 || returnStr.indexOf("VTSUCC1") > -1 || returnStr.indexOf("SucAmtZero") > -1 )
{
sql = " update pur_milstn set wf_status = 'c' ,conf_date = ? ,confirmed = 'Y' where tran_id = ? ";
sql = " update pur_milstn set wf_status = 'c' ,conf_date = ? ,status_date = ? , confirmed = 'Y' where tran_id = ? ";
System.out.println("sql :"+sql );
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1,newsysDate);
pstmt.setString(2,tranId);
pstmt.setTimestamp(2,newsysDate);
pstmt.setString(3,tranId);
int cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
......
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