Commit 28caf422 authored by msharma's avatar msharma

Show Quantity in Sandard unit


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93229 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e311b159
...@@ -281,7 +281,9 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -281,7 +281,9 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
getDataSql = "SELECT SORDER.CUST_CODE, CUSTOMER.CUST_NAME,SORDDET.LINE_NO, " getDataSql = "SELECT SORDER.CUST_CODE, CUSTOMER.CUST_NAME,SORDDET.LINE_NO, "
+"SORDER.SALE_ORDER,SORDER.DUE_DATE,SORDITEM.ITEM_CODE," +"SORDER.SALE_ORDER,SORDER.DUE_DATE,SORDITEM.ITEM_CODE,"
+"ITEM.DESCR,SORDITEM.QUANTITY," +"ITEM.DESCR,SORDITEM.QUANTITY,"
+"SORDITEM.QUANTITY - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC PENDING_QUANTITY," //Changed by Manoj dtd 18/06/2013 to get Pending Quantity in Std Unit
//+"(SORDITEM.QUANTITY*SORDITEM.CONV__QTY_STDUOM) - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC PENDING_QUANTITY,"
+"(SORDITEM.QUANTITY*SORDITEM.CONV__QTY_STDQTY) - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC PENDING_QUANTITY,"
+"SORDITEM.QTY_ALLOC,SORDDET.PACK_INSTR," +"SORDITEM.QTY_ALLOC,SORDDET.PACK_INSTR,"
+"SORDER.SITE_CODE__SHIP,SORDITEM.EXP_LEV , " +"SORDER.SITE_CODE__SHIP,SORDITEM.EXP_LEV , "
+"CASE WHEN SORDDET.HOLD_FLAG IS NULL THEN 'N' ELSE SORDDET.HOLD_FLAG END, "// ADDED BY AKHILESH FOR NEW COLUNM +"CASE WHEN SORDDET.HOLD_FLAG IS NULL THEN 'N' ELSE SORDDET.HOLD_FLAG END, "// ADDED BY AKHILESH FOR NEW COLUNM
...@@ -308,7 +310,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -308,7 +310,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
+" SORDITEM.ITEM_CODE <= ? " +" SORDITEM.ITEM_CODE <= ? "
+"AND CASE WHEN SORDDET.STATUS IS NULL THEN 'P' ELSE SORDDET.STATUS end <> 'C' " +"AND CASE WHEN SORDDET.STATUS IS NULL THEN 'P' ELSE SORDDET.STATUS end <> 'C' "
+"AND CASE WHEN SORDER.STATUS IS NULL THEN 'P' ELSE SORDER.STATUS end IN ('P','H') " //change done by Kunal on 22/10/12 as per S Manoharan instruction ,consider Hold status +"AND CASE WHEN SORDER.STATUS IS NULL THEN 'P' ELSE SORDER.STATUS end IN ('P','H') " //change done by Kunal on 22/10/12 as per S Manoharan instruction ,consider Hold status
+"AND SORDITEM.QUANTITY - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC > 0 " +"AND (SORDITEM.QUANTITY*SORDITEM.CONV__QTY_STDQTY) - SORDITEM.QTY_DESP - SORDITEM.QTY_ALLOC > 0 "
+"AND SORDITEM.LINE_TYPE = 'I' " +"AND SORDITEM.LINE_TYPE = 'I' "
+"ORDER BY SORDER.CUST_CODE,SORDER.SALE_ORDER,SORDITEM.ITEM_CODE__ORD"; +"ORDER BY SORDER.CUST_CODE,SORDER.SALE_ORDER,SORDITEM.ITEM_CODE__ORD";
pstmt = conn.prepareStatement(getDataSql); pstmt = conn.prepareStatement(getDataSql);
...@@ -416,8 +418,10 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -416,8 +418,10 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
retTabSepStrBuff.append("<quantity__stduom>").append("<![CDATA[" + rs.getString("QUANTITY__STDUOM") +"]]>").append("</quantity__stduom>"); retTabSepStrBuff.append("<quantity__stduom>").append("<![CDATA[" + rs.getString("QUANTITY__STDUOM") +"]]>").append("</quantity__stduom>");
//PENDING_QUANTITY //PENDING_QUANTITY
//retTabSepStrBuff.append(rs.getDouble(9)).append("\t"); //retTabSepStrBuff.append(rs.getDouble(9)).append("\t");
retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + rs.getDouble(9) +"]]>").append("</pending_quantity>"); //retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + rs.getDouble(9) +"]]>").append("</pending_quantity>");
if (bappend == true) //Manoj dtd 18/06/2013 Pending Quantity in standard unit
retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + (rs.getDouble(9)) +"]]>").append("</pending_quantity>");
/*if (bappend == true)
{ {
//retTabSepStrBuff.append(balStockQty).append("\t"); //retTabSepStrBuff.append(balStockQty).append("\t");
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>"); retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>");
...@@ -426,11 +430,12 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -426,11 +430,12 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
{ {
//retTabSepStrBuff.append("0").append("\t"); //retTabSepStrBuff.append("0").append("\t");
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + 0 +"]]>").append("</stock_quantity>"); retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + 0 +"]]>").append("</stock_quantity>");
} }*/
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>");
//qty allocated //qty allocated
//retTabSepStrBuff.append(rs.getDouble(10)).append("\t");// ADDED BY AKHILESH //retTabSepStrBuff.append(rs.getDouble(10)).append("\t");// ADDED BY AKHILESH
retTabSepStrBuff.append("<qty_allocated>").append("<![CDATA[" + rs.getDouble(10) +"]]>").append("</qty_allocated>"); retTabSepStrBuff.append("<qty_allocated>").append("<![CDATA[" + (rs.getDouble(10)) +"]]>").append("</qty_allocated>");
//STOCK_QUANTITY //STOCK_QUANTITY
pendQty = rs.getDouble(9); pendQty = rs.getDouble(9);
...@@ -461,7 +466,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -461,7 +466,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
if(DefaultQtyFlag.equals("Y")) if(DefaultQtyFlag.equals("Y"))
{ {
//retTabSepStrBuff.append(allocQty).append("\t"); //retTabSepStrBuff.append(allocQty).append("\t");
retTabSepStrBuff.append("<qty_alloc>").append("<![CDATA[" + allocQty +"]]>").append("</qty_alloc>"); retTabSepStrBuff.append("<qty_alloc>").append("<![CDATA[" + (allocQty) +"]]>").append("</qty_alloc>");
} }
else 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