Commit 8f67c096 authored by caluka's avatar caluka

updated Validation EJB for Manual Stock De-allocation Entry Screen [W14CSUN004]


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95580 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 43e8ecd4
......@@ -139,6 +139,11 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(cnt == 0)
{
errCode = "VMSITE1";
......@@ -146,11 +151,6 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
errFields.add(childNodeName.toLowerCase());
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}else if(childNodeName.equalsIgnoreCase("tran_id"))
{
tranId = checkNull(genericUtility.getColumnValue("tran_id", dom));
......@@ -184,7 +184,6 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
if(rs.next())
{
ct = rs.getInt(1);
System.out.println("ct>>>>>>>>>>>"+ct);
}
pstmt.close();
pstmt = null;
......@@ -221,6 +220,11 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(cnt == 0)
{
errCode = "VMSORD1";
......@@ -228,11 +232,6 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
errFields.add(childNodeName.toLowerCase());
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
else if(childNodeName.equalsIgnoreCase("site_code__ship"))
......@@ -340,15 +339,15 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if(cnt == 0)
{
errCode = "VMSORD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if(!(saleOrder.equalsIgnoreCase(saleOrderHdr)))
{
errCode = "VMSORDER";
......@@ -375,6 +374,9 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if(cnt == 0)
{
errCode = "VMSITE1";
......@@ -382,9 +384,6 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
errFields.add(childNodeName.toLowerCase());
}
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
}
}
else if(childNodeName.equalsIgnoreCase("item_code"))
{
......@@ -404,6 +403,9 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if(cnt == 0)
{
errCode = "VMITMC1";
......@@ -411,9 +413,6 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
errFields.add(childNodeName.toLowerCase());
}
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
}
}
else if(childNodeName.equalsIgnoreCase("loc_code"))
{
......@@ -433,6 +432,9 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if(cnt == 0)
{
errCode = "VTLOCN1";
......@@ -440,9 +442,6 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
errFields.add(childNodeName.toLowerCase());
}
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
}
}
else if(childNodeName.equalsIgnoreCase("line_no__sord"))
......@@ -482,6 +481,9 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
if(cnt == 0)
{
errCode = "VTEXPL1";
......@@ -489,9 +491,6 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
errFields.add(childNodeName.toLowerCase());
}
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
}
}
}
......@@ -524,7 +523,6 @@ public class StockDeAllocIC extends ValidatorEJB implements StockDeAllocICLocal,
String quantityDom = "";
quantityDom = genericUtility.getColumnValue("quantity", dom);
pendingQtyDom = genericUtility.getColumnValue("pending_qty", dom);
saleOrder = genericUtility.getColumnValue("sale_order", dom);
lineNoSord = genericUtility.getColumnValue("line_no__sord", dom);
itemCode = genericUtility.getColumnValue("item_code", dom);
......
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