Commit 78bfa801 authored by smane's avatar smane

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94143 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c45d2c89
...@@ -146,7 +146,7 @@ public class ConsumeOrdStkAct extends ActionHandlerEJB implements ConsumeOrdStkA ...@@ -146,7 +146,7 @@ public class ConsumeOrdStkAct extends ActionHandlerEJB implements ConsumeOrdStkA
winName=getObjName(parentNode); winName=getObjName(parentNode);
System.out.println(">>>>>>>>>>>>>>>winName==>"+winName); System.out.println(">>>>>>>>>>>>>>>winName==>"+winName);
// sql= "SELECT stk.item_code,itm.descr,itm.unit,sum(quantity) AS quantity 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"; // sql= "SELECT stk.item_code,itm.descr,itm.unit,sum(quantity) AS quantity 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";
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) -(CASE WHEN hold_qty IS NULL THEN 0 ELSE hold_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) - (CASE WHEN hold_qty IS NULL THEN 0 ELSE hold_qty END)) END) AS curr_stock 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 curr_stock 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";
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