Commit 23999f05 authored by wansari's avatar wansari

W15GSUN010 added SOPLN in potency calculation and commented allocType...

W15GSUN010  added SOPLN in potency calculation and commented allocType condition in StockAllocation method.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101660 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4e75f1a5
...@@ -547,8 +547,10 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -547,8 +547,10 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{ {
// First Check stock in reserve location (inv_alloc_det) // First Check stock in reserve location (inv_alloc_det)
//if ALLOCATE_TYPE is 'O' then allocated original stock only not for alternate //if ALLOCATE_TYPE is 'O' then allocated original stock only not for alternate
if(!"O".equalsIgnoreCase(detailMap.get("ALLOCATE_TYPE")) )
{ //Changed by wasim on 17-05-2016 to comment allocate type condition as per manohar sir
//if(!"O".equalsIgnoreCase(detailMap.get("ALLOCATE_TYPE")) )
//{
stockReturnMap = checkReserveStock(detailMap, conn); stockReturnMap = checkReserveStock(detailMap, conn);
System.out.println("checkReserveStock1 return map : "+stockReturnMap); System.out.println("checkReserveStock1 return map : "+stockReturnMap);
...@@ -585,7 +587,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -585,7 +587,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
detailMap.put("BALANCE_QTY", String.valueOf(balanceQty) ); detailMap.put("BALANCE_QTY", String.valueOf(balanceQty) );
//stockReturnMap = checkForAlternateItem(detailMap, conn); //stockReturnMap = checkForAlternateItem(detailMap, conn);
//System.out.println("checkForAlternateItem Reserve return map : "+stockReturnMap); //System.out.println("checkForAlternateItem Reserve return map : "+stockReturnMap);
} //}
//--------------------Second Check stock in current site--------------------------- //--------------------Second Check stock in current site---------------------------
System.out.println("Second Check stock in current site : "+stockReturnMap); System.out.println("Second Check stock in current site : "+stockReturnMap);
...@@ -1834,6 +1836,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1834,6 +1836,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("workOrder----->>["+workOrder+"] ["+worderStkBeanObj.getWorkOrder()+"]"); System.out.println("workOrder----->>["+workOrder+"] ["+worderStkBeanObj.getWorkOrder()+"]");
System.out.println("expLevel----->>["+expLevel+"] ["+worderStkBeanObj.getExpLevel()+"]"); System.out.println("expLevel----->>["+expLevel+"] ["+worderStkBeanObj.getExpLevel()+"]");
System.out.println("***ItemCode["+worderStkBeanObj.getWorkOrder()+"]LotNo["+worderStkBeanObj.getLotNo()+"]LotSl["+worderStkBeanObj.getLotSl()+"]LocCode["+worderStkBeanObj.getLocCode()+"]SiteCode["+worderStkBeanObj.getSiteCode()+"]AllocQty["+worderStkBeanObj.getAllocQty()+"]Stock Quantity["+worderStkBeanObj.getStkQuantity()+"]getQuantity["+worderStkBeanObj.getQuantity()+"]PotencyAdj["+worderStkBeanObj.getPotencyAdj()+"]Stock Sufficient["+worderStkBeanObj.getStockSufficient()+"]getCritItem["+worderStkBeanObj.getCritItem()+"]MinReqQty["+worderStkBeanObj.getMinQtyReq()+"]StockPotencyPerc["+worderStkBeanObj.getStkPotencyPerc()+"]OtherSiteYN["+worderStkBeanObj.getOtherSiteYN()+"]getAlternate["+worderStkBeanObj.getAlternate()+"]Qty Adj["+worderStkBeanObj.getQtyAdj()+"]UpdQty["+worderStkBeanObj.getUpdQty()+"MfgDate["+worderStkBeanObj.getMfgDate()+"]ExpDate["+worderStkBeanObj.getExpDate()+"SiteCodeMfg["+worderStkBeanObj.getSiteCodeMfg()+"]ReserveLineNo["+worderStkBeanObj.getReserveLineNo()+"]ReserveStkTranId["+worderStkBeanObj.getReserveStkTranId()+"]Unit["+worderStkBeanObj.getUnit()+"]");
if(workOrder.equalsIgnoreCase(worderStkBeanObj.getWorkOrder().trim()) && expLevel.equalsIgnoreCase(worderStkBeanObj.getExpLevel().trim())) if(workOrder.equalsIgnoreCase(worderStkBeanObj.getWorkOrder().trim()) && expLevel.equalsIgnoreCase(worderStkBeanObj.getExpLevel().trim()))
{ {
...@@ -1842,14 +1845,19 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1842,14 +1845,19 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
itemCode = worderStkBeanObj.getItemCode(); itemCode = worderStkBeanObj.getItemCode();
currentLotQty = worderStkBeanObj.getAllocQty();//allocated currentLotQty = worderStkBeanObj.getAllocQty();//allocated
System.out.println("Main bomdet Quantity["+requiredStock+"] Available ["+availableStock+"] Main Allocated ["+currentLotQty+"] Balance ["+balance+"] Site code ["+worderStkBeanObj.getSiteCode()+"]"); System.out.println("***WorkOrder["+worderStkBeanObj.getWorkOrder()+"] and ExpLev["+worderStkBeanObj.getExpLevel()+"]");
System.out.println("***Main bomdet Quantity["+requiredStock+"] Available ["+availableStock+"] Current Lot Qty ["+currentLotQty+"] Balance ["+balance+"] Site code ["+worderStkBeanObj.getSiteCode()+"]");
if("Y".equalsIgnoreCase(matchPotency)) if("Y".equalsIgnoreCase(matchPotency))
{ {
ItemStdPotency = getItemStandardPotency(itemCode, conn); ItemStdPotency = getItemStandardPotency(itemCode, conn);
System.out.println("@@ItemCode["+itemCode+"] and @@ItemStdPotency="+ItemStdPotency);
//if(currentLotQty < balance) // if stock not sufficient //if(currentLotQty < balance) // if stock not sufficient
if(availableStock < balance)//Changed by wasim on 18-04-2016 as discussion with manohar sir if(availableStock < balance)//Changed by wasim on 18-04-2016 as discussion with manohar sir
{ {
System.out.println("@@Not Sufficient-->currentLotQty ["+currentLotQty+"] stkPotencyPerc ["+stkPotencyPerc+"] ItemStdPotency ["+ItemStdPotency+"]");
potencyAdj = currentLotQty - (currentLotQty * stkPotencyPerc / ItemStdPotency); potencyAdj = currentLotQty - (currentLotQty * stkPotencyPerc / ItemStdPotency);
potencyAdj = Double.parseDouble(df.format(potencyAdj));//0.200 potencyAdj = Double.parseDouble(df.format(potencyAdj));//0.200
System.out.println("After calculating potencyAdj NOT SUFFICIENT----->>["+potencyAdj+"]"); System.out.println("After calculating potencyAdj NOT SUFFICIENT----->>["+potencyAdj+"]");
...@@ -1896,6 +1904,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1896,6 +1904,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
} }
else // if stock sufficient else // if stock sufficient
{ {
System.out.println("@@Sufficient--> balance["+balance+"] stkPotencyPerc ["+stkPotencyPerc+"] ItemStdPotency ["+ItemStdPotency+"]");
potencyAdj = ( balance /stkPotencyPerc * ItemStdPotency) - balance; potencyAdj = ( balance /stkPotencyPerc * ItemStdPotency) - balance;
potencyAdj = Double.parseDouble(df.format(potencyAdj)); potencyAdj = Double.parseDouble(df.format(potencyAdj));
......
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