Commit 5b7eedb7 authored by manohar's avatar manohar

lock_code empty checking done before getting standard days for calculation of release days


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93132 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7f39295f
...@@ -866,19 +866,24 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -866,19 +866,24 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
{ {
//add by cpatil start on 28-07-12 as per manoharan sir //add by cpatil start on 28-07-12 as per manoharan sir
lockCode = genericUtility.getColumnValue( "lock_code", dom1 ); lockCode = genericUtility.getColumnValue( "lock_code", dom1 );
sql="select std_days from inv_lock where lock_code = ?"; // 23/05/13 manoharan if lock_code is not empty then only set
pStmt = conn.prepareStatement(sql); stdDays = 1;
pStmt.setString(1,lockCode.trim()); if (lockCode != null && lockCode.trim().length() > 0)
rs = pStmt.executeQuery(); {
if(rs.next()) sql="select std_days from inv_lock where lock_code = ?";
{ pStmt = conn.prepareStatement(sql);
stdDays = rs.getInt("std_days"); pStmt.setString(1,lockCode);
rs = pStmt.executeQuery();
if(rs.next())
{
stdDays = rs.getInt("std_days");
}
rs.close();
rs= null;
pStmt.close();
pStmt=null;
} }
rs.close();
rs= null;
pStmt.close();
pStmt=null;
currDate = new java.sql.Timestamp(System.currentTimeMillis()); currDate = new java.sql.Timestamp(System.currentTimeMillis());
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c.setTime(currDate); c.setTime(currDate);
......
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