Commit 6e609a2e authored by ppatro's avatar ppatro

changed by sankara on 20/02/2014 updated wavegenerationprc masterpackic...

changed by sankara on 20/02/2014 updated wavegenerationprc masterpackic stocktransferic invhold21 srd and metadata


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94282 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 70979b36
......@@ -543,19 +543,30 @@ public class MasterPackIC extends ValidatorEJB implements MasterPackICRemote, Ma
pstmt = null;
//checking confirmed value in pick_iss_hdr
sql = "select confirmed from pick_iss_hdr where pick_order = ?";
//Changed By Pragyan 15-feb-13 to check validation
//sql = "select confirmed from pick_iss_hdr where pick_order = ?";
sql = "SELECT COUNT(*) FROM PICK_ISS_HDR P,PICK_ISS_DET D "+
" WHERE P.TRAN_ID = D.TRAN_ID AND P.PICK_ORDER= ? "+
" AND P.CONFIRMED= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pickOrder);
pstmt.setString(2, "N");
rs = pstmt.executeQuery();
int cCtr = 0;
if (rs.next())
{
confirmed = checkNullAndTrim(rs.getString("confirmed"));
//confirmed = checkNullAndTrim(rs.getString("confirmed"));
cCtr = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if( ! "Y".equalsIgnoreCase(confirmed.trim()) )
//if( ! "Y".equalsIgnoreCase(confirmed.trim()) )
if( cCtr > 0)
{
errList.add( "VTPCKCONF1" );
errFields.add( childNodeName.toLowerCase() );
......
......@@ -396,6 +396,33 @@ public class StockTransferIC extends ValidatorEJB implements StockTransferICRemo
// end 26/10/11 manoharan all the errors should be returned so that warnings can be processed
}
}
//changed by sankara on 13-02-14 shholud not allow stock transfer if repl is pending start.
siteCode = genericUtility.getColumnValue("site_code", allDom, "1" );
System.out.println("siteCode:::::::"+siteCode);
sql = " SELECT COUNT(DISTINCT D.REPL_ORDER) AS COUNT FROM REPL_ORD_DET D, STOCK S, WAVE_TASK W, WAVE_TASK_DET K WHERE D.REPL_ORDER = K.REF_ID AND W.WAVE_ID = K.WAVE_ID " +
" AND W.CANCEL <> 'Y' AND K.STATUS <> 'Y' AND D.CANCEL_MODE IS NULL AND D.QUANTITY > 0 AND D.SITE_CODE = ? AND D.ITEM_CODE = S.ITEM_CODE " +
" AND D.LOC_CODE = ? AND D.LOT_NO = S.LOT_NO AND D.LOT_SL = ? " ;
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, siteCode );
pstmt.setString( 2, locCode );
pstmt.setString( 3, lpnNo );
rs = pstmt.executeQuery();
if( rs.next() )
{
count = rs.getInt("COUNT");
System.out.println("count:"+count);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if( count > 0 )
{
errList.add( "VTREPLPEND" );
errFields.add( childNodeName.toLowerCase() );
}
//changed by sankara on 13-02-14 shholud not allow stock transfer if repl is pending end.
}
}// for loop end
}//case 2 end
......@@ -843,7 +870,8 @@ public class StockTransferIC extends ValidatorEJB implements StockTransferICRemo
{
}*/
//changed by sankara on 19/11/13 not allowed stock transfer if replenishment is pending start.
sql = " SELECT COUNT(1) AS COUNT FROM REPL_ORD_DET D, WAVE_TASK W, WAVE_TASK_DET K " +
//changed by sankara on 13/02/14 validation required in case2 start.
/* sql = " SELECT COUNT(1) AS COUNT FROM REPL_ORD_DET D, WAVE_TASK W, WAVE_TASK_DET K " +
" WHERE D.REPL_ORDER = K.REF_ID AND W.WAVE_ID = K.WAVE_ID AND W.CANCEL <>'Y' AND K.STATUS <>'Y' " +
" AND D.CANCEL_MODE IS NULL AND D.QUANTITY > 0 AND D.SITE_CODE = ? AND D.ITEM_CODE = ? AND D.LOC_CODE = ? " +
" AND D.LOT_NO = ? AND D.LOT_SL = ? ";
......@@ -868,7 +896,8 @@ public class StockTransferIC extends ValidatorEJB implements StockTransferICRemo
{
errList.add( "VTREPLPEND" );
errFields.add( childNodeName.toLowerCase() );
}
}*/
//changed by sankara on 13/02/14 validation required in case2 end.
//changed by sankara on 19/11/13 not allowed stock transfer if replenishment is pending end.
}
......
......@@ -20762,6 +20762,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
try
{
System.out.println("getActiveCaseReplMap ReplType["+replType+"]locInvstat["+locInvstat+"]locCode["+locCode+"]lotNo["+lotNo+"]lotSl["+lotSl+"]");
if(replType == "")
{
......@@ -20772,10 +20774,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
else if(replType == "X")
{
sql= "SELECT R.REPL_ORDER,R.LINE_NO,R.PICK_ORDER,R.LINE_NO__PICK,R.LOC_CODE__TO,R.ACTUAL_QTY FROM REPL_ORD_DET R WHERE R.ITEM_CODE = ? AND R.SITE_CODE = ? "
//Change by Rohan on 20-02-13 not select uncacle repanishment.
//+" AND R.LOC_CODE = ? AND R.LOT_NO = ? AND R.LOT_SL = ? AND R.REPL_TYPE IS NULL AND R.ACTUAL_QTY > 0";
+" AND R.LOC_CODE = ? AND R.LOT_NO = ? AND R.LOT_SL = ? AND CASE WHEN R.CANCEL_MODE IS NULL THEN 'N' ELSE R.CANCEL_MODE END <> 'Y' AND R.REPL_TYPE IS NULL";
+" AND R.LOC_CODE = ? AND R.LOT_NO = ? AND R.LOT_SL = ? AND CASE WHEN R.CANCEL_MODE IS NULL THEN 'N' ELSE R.CANCEL_MODE END <> 'Y' AND R.REPL_TYPE IS NULL AND R.ACTUAL_QTY > 0";
}
else
{
......
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