Commit 2f395ef4 authored by kshinde's avatar kshinde

default button added item_series condition in where clause for picking up stock

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@198578 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 99cb927c
...@@ -133,6 +133,7 @@ public class ConsumeOrdStkAct extends ActionHandlerEJB implements ConsumeOrdStkA ...@@ -133,6 +133,7 @@ public class ConsumeOrdStkAct extends ActionHandlerEJB implements ConsumeOrdStkA
Node parentNode=null; Node parentNode=null;
String winName=""; String winName="";
try try
{ {
System.out.println("*********************In getStockDetails*********************"); System.out.println("*********************In getStockDetails*********************");
...@@ -141,6 +142,8 @@ public class ConsumeOrdStkAct extends ActionHandlerEJB implements ConsumeOrdStkA ...@@ -141,6 +142,8 @@ public class ConsumeOrdStkAct extends ActionHandlerEJB implements ConsumeOrdStkA
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
conn = getConnection(); conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END //Changes and Commented By Bhushan on 09-06-2016 :END
itemSer = genericUtility.getColumnValue("item_ser",dom1);
System.out.println("ItemSeries "+itemSer);
siteCode = genericUtility.getColumnValue("site_code__req",dom1); siteCode = genericUtility.getColumnValue("site_code__req",dom1);
locationCode = genericUtility.getColumnValue("loc_code",dom1); locationCode = genericUtility.getColumnValue("loc_code",dom1);
System.out.println(">>>>>>>>>>>>>>>siteCode==>"+siteCode); System.out.println(">>>>>>>>>>>>>>>siteCode==>"+siteCode);
...@@ -195,6 +198,10 @@ public class ConsumeOrdStkAct extends ActionHandlerEJB implements ConsumeOrdStkA ...@@ -195,6 +198,10 @@ public class ConsumeOrdStkAct extends ActionHandlerEJB implements ConsumeOrdStkA
// sql="SELECT stk.item_code,itm.descr,itm.unit,itm.item_ser,(CASE WHEN sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) IS NULL THEN 0 ELSE sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) END) AS current_qty FROM item itm ,stock stk WHERE itm.item_code=stk.item_code AND stk.site_code=? AND stk.loc_code=? GROUP BY stk.item_code, itm.descr,itm.unit,itm.item_ser"; // sql="SELECT stk.item_code,itm.descr,itm.unit,itm.item_ser,(CASE WHEN sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) IS NULL THEN 0 ELSE sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) END) AS current_qty FROM item itm ,stock stk WHERE itm.item_code=stk.item_code AND stk.site_code=? AND stk.loc_code=? GROUP BY stk.item_code, itm.descr,itm.unit,itm.item_ser";
sql="SELECT stk.item_code,itm.descr,itm.unit,itm.item_ser,(CASE WHEN sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) IS NULL THEN 0 ELSE sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) END) AS current_qty FROM item itm ,stock stk WHERE itm.item_code=stk.item_code AND stk.site_code=? AND stk.loc_code=? GROUP BY stk.item_code, itm.descr,itm.unit,itm.item_ser " + sql="SELECT stk.item_code,itm.descr,itm.unit,itm.item_ser,(CASE WHEN sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) IS NULL THEN 0 ELSE sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) END) AS current_qty FROM item itm ,stock stk WHERE itm.item_code=stk.item_code AND stk.site_code=? AND stk.loc_code=? GROUP BY stk.item_code, itm.descr,itm.unit,itm.item_ser " +
"having (CASE WHEN sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) IS NULL THEN 0 ELSE sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) END)>0";//Added by chandrashekar on 04-Feb-2015 "having (CASE WHEN sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) IS NULL THEN 0 ELSE sum((CASE WHEN quantity IS NULL THEN 0 ELSE quantity END) - (CASE WHEN alloc_qty IS NULL THEN 0 ELSE alloc_qty END)) END)>0";//Added by chandrashekar on 04-Feb-2015
if(itemSer!=null && itemSer.trim().length()>0)
{
sql+=" AND itm.item_ser = '"+itemSer+"'";
}
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCode); pstmt.setString(1, siteCode);
pstmt.setString(2, locationCode); pstmt.setString(2, locationCode);
......
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