Commit 7d9e7b31 authored by ssarkar's avatar ssarkar

changed by sumit on 22/03/13 for bug of deallocation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92862 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 61cb12a2
......@@ -612,6 +612,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
String lotSl ="", saleOrder ="";
String lineNoSord = "",cartonPickOrder = "";
String cartonPickLine = "", confirmed = "";
String pndInvStat = "";
int tranLineNo = 0;
java.sql.Date currDate = new java.sql.Date( System.currentTimeMillis() );
......@@ -849,8 +850,24 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
}
// CHECKING QUANTITY AGAINST
if( !"S".equalsIgnoreCase(pickType))
{
pndInvStat = discommon.getDisparams("999999","PND_INVSTAT",conn);
sql = "SELECT LOC_CODE FROM LOCATION WHERE LOC_CODE = ? AND INV_STAT = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, locCode);
pstmt1.setString(2, pndInvStat);
rs = pstmt1.executeQuery();
if( rs.next())
{
errString="INVDEALLQ5";
errString = itmDBAccessEJB.getErrorString("",errString,"","",conn);
return errString;
}
rs.close(); rs = null;
pstmt1.close(); pstmt1 = null;
}
//sql = " "
String refId = checkForReplOrPick(pickOrder, conn);
if("REPL".equalsIgnoreCase(refId))
{
......@@ -924,7 +941,10 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
deallocArtConfLocal = (DeallocArtConfLocal)ctx.lookup("ibase/DeallocArtConf/local");
errString = deallocArtConfLocal.confirm(tranId, xtraParams, "", conn, false);
System.out.println(" ************ errString ******** ["+errString+"]");
if (errString.indexOf("VTSUCC1") > -1)
{
errString = "";
}
}//try end
catch(Exception e)
......@@ -932,7 +952,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
e.printStackTrace();
try
{
if ( conn != null && !conn.isClosed() )
if ( conn != null && !conn.isClosed())
{
conn.rollback();
}
......@@ -961,8 +981,8 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
else
{
System.out.println("errString.indexOf(<Errors>)---------------"+errString.indexOf("<Errors>"));
if(errString.indexOf("<Errors>") == -1 )
{
/*if(errString.indexOf("<Errors>") == -1 )
{*/
if( errString.trim().length() > 0)
{
conn.rollback();
......@@ -970,7 +990,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
errString="VTPRCERR";
errString = itmDBAccessEJB.getErrorString("",errString,"","",conn);
}
}
//}
}
if( rs != 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