Commit d746d7f7 authored by kmandhre's avatar kmandhre

item code is (non stockable) then skip that item and not getting from BOM button.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92917 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d170e3a0
......@@ -232,15 +232,23 @@ public class RcptBackflushAct extends ActionHandlerEJB implements RcptBackflush
Document expDom;
String siteCode = null, itemCode = null;
String allocateStr = null,locCodeWip=null;
String stkOpt = "";
double quantity = 0;
Node currDetail = null;
int ctr = 0;
PreparedStatement pstmt = null;
ResultSet rs = null;
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
GenericUtility genericUtility = GenericUtility.getInstance();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
String errString = "";
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
MfgCommon mfgCommon = new MfgCommon();
try
{
conn = connDriver.getConnectDB("DriverITM");
expDom = genericUtility.parseString(expXmlString);
NodeList detailList = expDom.getElementsByTagName("Detail");
int noOfDetails = detailList.getLength();
......@@ -262,7 +270,24 @@ public class RcptBackflushAct extends ActionHandlerEJB implements RcptBackflush
// location Code wip added as a parameter in the method below--- 26/03/09 by mukesh for MF89BHU001
//commented by rajendra on 03/11/09
//allocateStr = allocateItem(dom1, locCodeWip , siteCode, itemCode, quantity, xtraParams);
//added by kunal on 30/03/13 check for stk_opt
stkOpt = mfgCommon.chkStkOpt(siteCode, itemCode, conn)== null ? "":mfgCommon.chkStkOpt(siteCode, itemCode, conn);
System.out.println("stkOpt== "+stkOpt);
if(! stkOpt.trim().equals("0"))
{
allocateStr = allocateItem(dom1, locCodeWip , siteCode, itemCode, quantity,partQty, xtraParams);
if (allocateStr.indexOf("<Detail>") == -1)
{
errString = itmDBAccessEJB.getErrorString("", "VTSTKBOM", "");
errString = updateMessage(errString, "Stock for Item_code :::: " + itemCode + " is not available");
return errString;
}
}
else
{
allocateStr = "";
}
//added by kunal on 30/03/13 check for stk_opt end
System.out.println("allocateStr ::: " + allocateStr);
//added by rajendra on 27/10/09
if (allocateStr.indexOf("<VSTKNOSUFF>") > 0)
......@@ -278,16 +303,15 @@ public class RcptBackflushAct extends ActionHandlerEJB implements RcptBackflush
return allocateStr;
}
// ADDED BY ALKA ON 20/07/07 FOR VALIDATING THAT
if (allocateStr.indexOf("<Detail>") == -1)
{
errString = itmDBAccessEJB.getErrorString("", "VTSTKBOM", "");
errString = updateMessage(errString, "Stock for Item_code :::: " + itemCode + " is not available");
return errString;
}
// ADDITION ENDED BY ALKA 20/07/07
if(allocateStr.trim().length() > 0)
{
valueXmlString.append(allocateStr.substring(allocateStr.indexOf("<Detail>"), allocateStr.indexOf("</Root>")));
}
}
}
valueXmlString.append("</Root>\r\n");
}
catch(Exception e)
......
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