Commit e3a48a2a authored by dchattar's avatar dchattar

MF89SUN0092 - changes done in rate & quantity field


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91541 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8c31a5bd
...@@ -37,6 +37,67 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote ...@@ -37,6 +37,67 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote
public void setSessionContext(SessionContext mSessionContext) public void setSessionContext(SessionContext mSessionContext)
{ {
} }
// 24/08/11 manoharan
public String getItemDescr(String itemCode) throws ITMException
{
String itemDescr = "";
GenericUtility genericUtility = null;
genericUtility = GenericUtility.getInstance();
PreparedStatement pstmt = null;
ResultSet rs = null;
Connection conn = null;
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver = null;
pstmt = conn.prepareStatement("select descr from item where item_code = ?");
pstmt.setString(1,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
itemDescr = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
genericUtility = null;
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(conn != null)
{
conn.close();
conn=null;
}
}
catch(Exception e)
{
System.out.println("Exception :StockHelpEJB:==>\n"+e.getMessage());
}
}
return itemDescr;
}
// end 24/08/11 manoharan
public ArrayList getDetails(String siteCode, String itemCode) throws ITMException public ArrayList getDetails(String siteCode, String itemCode) throws ITMException
{ {
GenericUtility genericUtility = null; GenericUtility genericUtility = null;
...@@ -114,8 +175,8 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote ...@@ -114,8 +175,8 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote
thisBean.batchSize = rs.getString(23); thisBean.batchSize = rs.getString(23);
thisBean.holdQuant = rs.getDouble(24); thisBean.holdQuant = rs.getDouble(24);
thisBean.mfgDate = rs.getString(25) == null ? "" : genericUtility.getValidDateString(rs.getString(25),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat()); thisBean.mfgDate = rs.getString(25) == null ? "" : genericUtility.getValidDateString(rs.getString(25),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat());
thisBean.rate = rs.getString(26); thisBean.noArt = rs.getString(26); //Changed By Dipak Chattar On 15 Nov 2011
thisBean.noArt = rs.getString(27); thisBean.rate = rs.getString(27); ////Changed By Dipak Chattar On 15 Nov 2011
thisBean.currDateTs = getCurrdateTimestmp(); thisBean.currDateTs = getCurrdateTimestmp();
avl = thisBean.quantity - thisBean.allocQuant; avl = thisBean.quantity - thisBean.allocQuant;
thisBean.netAvailable = Double.toString(avl);//balance thisBean.netAvailable = Double.toString(avl);//balance
......
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