Commit 9741551b authored by msharma's avatar msharma

hold_qty condition added


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96862 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f605a92c
......@@ -440,7 +440,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
// 27/12/12 manoharan
sql = " SELECT COUNT(A.ITEM_CODE) FROM STOCK A, LOCATION B, INVSTAT C "
+ " WHERE A.LOC_CODE = B.LOC_CODE AND B.INV_STAT = C.INV_STAT AND "
+ " WHERE A.LOC_CODE = B.LOC_CODE AND B.INV_STAT = C.INV_STAT AND "
+ " A.ITEM_CODE = ? AND A.SITE_CODE = ? "
+ " AND ((CASE WHEN A.QUANTITY IS NULL THEN 0 ELSE A.QUANTITY END) - "
+ " (CASE WHEN A.ALLOC_QTY IS NULL THEN 0 ELSE A.ALLOC_QTY END)) > 0 ";
......@@ -473,7 +473,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
if (dimension != null && dimension.trim().length() > 0)
{
sql = sql + " AND DDF_COMPARE_DIMENSION(CASE WHEN A.DIMENSION IS NULL THEN ' ' ELSE A.DIMENSION END, ?, ?) = 'Y'";
sql = sql + " AND DDF_COMPARE_DIMENSION(CASE WHEN A.DIMENSION IS NULL THEN ' ' ELSE A.DIMENSION END, ?, ?) = 'Y' AND (case when A.hold_qty is null then 0 else A.hold_qty end) =0 ";//hold_qty condition added by manoj dtd 24/11/2014
}
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
......@@ -567,7 +567,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
+ " A.DIMENSION, A.RATE, A.CREA_DATE, "
+ " CASE WHEN LENGTH(RTRIM(A.LOT_SL)) = 1 THEN '0' || RTRIM(A.LOT_SL) ELSE RTRIM(A.LOT_SL) END "
+ " FROM STOCK A, LOCATION B, INVSTAT C "
+ " WHERE A.LOC_CODE = B.LOC_CODE AND B.INV_STAT = C.INV_STAT AND "
+ " WHERE A.LOC_CODE = B.LOC_CODE AND B.INV_STAT = C.INV_STAT AND "
+ " A.ITEM_CODE = ? AND A.SITE_CODE = ? "
+ " AND ((CASE WHEN A.QUANTITY IS NULL THEN 0 ELSE A.QUANTITY END) - "
+ " (CASE WHEN A.ALLOC_QTY IS NULL THEN 0 ELSE A.ALLOC_QTY END)) > 0 ";
......@@ -605,7 +605,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
// end 26/03/12 manoharan
// 02/04/12 manoharan sorting to be doen as per PB logic
//changes done by cpandey additin condition for track shelf life on 20/08/12
sql = sql + " order by partial_used,decode('N','P',decode(rtrim(b.loc_group),rtrim(''),'A','B'),'0'), " ;
sql = sql + " AND (case when A.hold_qty is null then 0 else A.hold_qty end) =0 order by partial_used,decode('N','P',decode(rtrim(b.loc_group),rtrim(''),'A','B'),'0'), " ;
//end of changes on 20/08/12
//commented by cpandey
//sql = sql + " order by partial_used, (case when '" + locUsageType + "' = 'P' then (case when rtrim(c.loc_group) = rtrim('" + locGroup + "') Then 'A' else 'B' end) else '0' end), " ;
......@@ -1342,6 +1342,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
sql = sql + " AND c.loc_group = '" + locGroup + "' ";
}
// end 26/03/12 manoharan
sql=sql+" AND (case when A.hold_qty is null then 0 else A.hold_qty end) =0 ";//hold_qty condition added by Manoj dtd 24/11/2014
System.out.println("sqlSB converted ::: "+ sql);
StringTokenizer st = new StringTokenizer(sql, "?");
cntQ = st.countTokens();
......@@ -1438,7 +1439,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
sql = sql + " AND c.loc_group = '" + locGroup + "' ";
}
// end 26/03/12 manoharan
sql=sql+" AND (case when A.hold_qty is null then 0 else A.hold_qty end) =0 ";//hold_qty condition added by Manoj dtd 24/11/2014
System.out.println("sqlSB1 converted ::: "+ sql);
StringTokenizer st1 = new StringTokenizer(sql, "?");
cntQ = st1.countTokens();
......@@ -1706,7 +1707,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
sql = sql + " AND c.loc_group = '" + locGroup + "' ";
}
// end 26/03/12 manoharan
sql=sql+" AND (case when A.hold_qty is null then 0 else A.hold_qty end) =0 ";//hold_qty condition added by Manoj dtd 24/11/2014
System.out.println("sqlSB converted ::: "+ sql);
StringTokenizer st1 = new StringTokenizer(sql, "?");
cntQ = st1.countTokens();
......
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