Commit 25e7ac64 authored by caluka's avatar caluka

updated ejb for tran id validation in Manual Stock De-allocation Entry Screen [W14CSUN004]


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95315 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7fe637bb
......@@ -74,11 +74,12 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
String locCode = "";
String lineNoSord = "";
String expLev = "";
String saleOrderHdr = "";
String saleOrderHdr = "",tranId="",keyFlag="";
int ctr=0;
int cnt = 0;
int cnt1 = 0;
int ct=0;
int currentFormNo = 0;
int childNodeListLength;
......@@ -150,8 +151,59 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
pstmt.close();
pstmt = null;
}
}
else if(childNodeName.equalsIgnoreCase("sale_order"))
}else if(childNodeName.equalsIgnoreCase("tran_id"))
{
tranId = checkNull(genericUtility.getColumnValue("tran_id", dom));
System.out.println("tranId="+tranId);
sql = "select key_flag from transetup where tran_window='w_sorddealloc'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
keyFlag = rs.getString("key_flag");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if("M".equalsIgnoreCase(keyFlag) && "A".equalsIgnoreCase(editFlag))
{
if(tranId == null || tranId.trim().length() == 0 )
{
errCode = "INVTRANID1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = " select count (*) from sord_alloc where tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if(rs.next())
{
ct = rs.getInt(1);
System.out.println("ct>>>>>>>>>>>"+ct);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
System.out.println("@@ct>>>>>>>>>>"+ct);
if(ct > 0)
{
errCode = "VTDUPTRNID";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
}else if(childNodeName.equalsIgnoreCase("sale_order"))
{
saleOrder = genericUtility.getColumnValue("sale_order", dom);
if(saleOrder == null || saleOrder.trim().length() == 0)
......
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