Commit 6adef7ec authored by pdas's avatar pdas

validation is added for item which are under scheme and have been restricted...

 validation is added for item which are under scheme and have been restricted in customer item master system,then system shows error message


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98457 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0dacdd34
...@@ -1347,6 +1347,7 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF ...@@ -1347,6 +1347,7 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF
rs.close(); rs.close();
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
//System.out.println("schemeCode 2 [" + schemeCode + "]"); //System.out.println("schemeCode 2 [" + schemeCode + "]");
if( schemeCode != null && schemeCode.trim().length() > 0 ) if( schemeCode != null && schemeCode.trim().length() > 0 )
...@@ -1387,6 +1388,30 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF ...@@ -1387,6 +1388,30 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF
errString = getErrorString(strSch,errCode,userId); errString = getErrorString(strSch,errCode,userId);
break; break;
} }
sql1 = "select restrict_upto from customeritem " +
"where cust_code = ?" +
" and item_code =?";
pstmt = conn.prepareStatement(sql1);
pstmt.setString(1,custCode);
pstmt.setString(2, itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
restrictUpto = rs.getTimestamp(1);
}
rs.close();
pstmt.close();
pstmt = null;
if(restrictUpto != null)
{
if(OrderDate.compareTo(restrictUpto) <= 0)
{
errCode = "VTRESDT";
errString = getErrorString("qty_1",errCode,userId);
break;
}
}
} }
else else
{ {
......
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