Commit a65bf027 authored by jshinde's avatar jshinde

Request Id:[W16CSUN010] Quantity updation in physical count:

In Physical count transaction Stock quantity should get set in physcandet table


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102097 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ff670e5a
......@@ -106,7 +106,7 @@ public class PhysicalCountIC extends ValidatorEJB implements PhysicalCountICLoca
ArrayList <String> errList = new ArrayList<String>();
ArrayList <String> errFields = new ArrayList <String> ();
String locCode = "", itemCode = "", siteCode = "", lotNo = "", lotSl = "";
String locCode = "", itemCode = "", siteCode = "", lotNo = "", lotSl = "",sql= "";
int locationCount = 0, itemCodeCount = 0, lotNoCount = 0, lotSlCount = 0;
try
......@@ -428,19 +428,23 @@ public class PhysicalCountIC extends ValidatorEJB implements PhysicalCountICLoca
{
Connection conn = null;
int currentFormNo = 0;
String chgUser = "", chgTerm = "", loginSite = "", locCode = "", locDescr = "", itemCode = "", itemDescr = "", unit = "";
String chgUser = "", chgTerm = "", loginSite = "", locCode = "", locDescr = "", itemCode = "", itemDescr = "", unit = ""
,lotSl ="" ,lotNo="",sql= "";
StringBuffer valueXmlString;
double quantity=0;
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n<Header>\r\n<editFlag>").append(editFlag);
System.out.println("xtraParams=["+xtraParams+"]");
System.out.println("Physical Count itemChanged Called........................... : ["+currentColumn+"]");
try
{
System.out.println("<<========= Inside wfValData ===========>>"); // remove
System.out.println("<<========= Inside itemChanged ===========>>"); // remove
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverITM" );
connDriver = null;
PreparedStatement pstmt = null;
ResultSet rs= null;
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
......@@ -526,6 +530,44 @@ public class PhysicalCountIC extends ValidatorEJB implements PhysicalCountICLoca
}
}
//Changed by Jagruti Shinde request Id:[W16CSUN010][Start]
else if( currentColumn.trim().equalsIgnoreCase( "lot_sl" ) )
{
lotSl = checkNullAndTrim(genericUtility.getColumnValue("lot_sl",currFormDataDom));
lotNo = checkNullAndTrim(genericUtility.getColumnValue("lot_no",currFormDataDom));
itemCode = checkNullAndTrim(genericUtility.getColumnValue("item_code",currFormDataDom));
locCode = checkNullAndTrim(genericUtility.getColumnValue("loc_code",currFormDataDom));
loginSite = checkNull(genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode" ));
sql = "SELECT QUANTITY FROM STOCK WHERE SITE_CODE = ? AND INV_STAT = ? AND LOC_CODE = ? AND ITEM_CODE = ? AND LOT_NO = ? AND LOT_SL = ? AND QUANTITY > 0";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, loginSite);
pstmt.setString(2, "AWMS");
pstmt.setString(3, locCode);
pstmt.setString(4, itemCode);
pstmt.setString(5, lotNo);
pstmt.setString(6, lotSl);
rs = pstmt.executeQuery();
if(rs.next())
{
quantity = rs.getDouble("QUANTITY");
System.out.println("quantityStock>>>>>>>" +quantity);
System.out.println( "LOT_SL itemChanged");
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
}
valueXmlString.append( "<quantity><![CDATA[" ).append( quantity ).append( "]]></quantity>\r\n" );
//Changed by Jagruti Shinde request Id:[W16CSUN010][End]
valueXmlString.append("</Detail2>\r\n");
} //Case 2. End
......
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