Commit 69f652d3 authored by dhirajchavan's avatar dhirajchavan

Added by Dhiraj chavan.for purpose of allow to close purchase order those...

Added by Dhiraj chavan.for purpose of allow to close purchase order those items are open with having stop_business flag'yes'.(refer req#_D16ASUN002)


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101657 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 86ec4aad
...@@ -725,6 +725,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -725,6 +725,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
itemSer = checkNull(genericUtility.getColumnValue("item_ser", dom)); itemSer = checkNull(genericUtility.getColumnValue("item_ser", dom));
suppCode = checkNull(genericUtility.getColumnValue("supp_code", dom)); suppCode = checkNull(genericUtility.getColumnValue("supp_code", dom));
purcOrder = checkNull(genericUtility.getColumnValue("purc_order", dom));
lineNo = checkNull(genericUtility.getColumnValue("line_no", dom));
{ {
sql = " select case when stop_business is null then 'N' else stop_business end From Item Where item_code = ? "; sql = " select case when stop_business is null then 'N' else stop_business end From Item Where item_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -740,6 +742,21 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -740,6 +742,21 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
pstmt = null; pstmt = null;
} }
sql = " select status,line_no From porddet Where purc_order = ? and line_no=? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
pstmt.setString(2, lineNo);
rs = pstmt.executeQuery();
if (rs.next())
{
poStatus = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if ("N".equalsIgnoreCase(stopBusiness)) if ("N".equalsIgnoreCase(stopBusiness))
{ {
errCode = this.isItem(siteCode, itemCode, modName,conn); errCode = this.isItem(siteCode, itemCode, modName,conn);
...@@ -751,8 +768,6 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -751,8 +768,6 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
} }
else else
{ {
//Added by Dhiraj chavan.for purpose of allow to close purchase order those
//are open with having stop_business flag'yes'.(refer req#_D16ASUN002)
if(("O".equalsIgnoreCase(poStatus)||poStatus.equals("O"))&&("Y".equalsIgnoreCase(stopBusiness))) if(("O".equalsIgnoreCase(poStatus)||poStatus.equals("O"))&&("Y".equalsIgnoreCase(stopBusiness)))
{ {
...@@ -763,11 +778,13 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -763,11 +778,13 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
errCode = "VTIIC"; errCode = "VTIIC";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
if (childNodeName.equalsIgnoreCase("unit")) if (childNodeName.equalsIgnoreCase("unit"))
......
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