Commit 776fd761 authored by kmandhre's avatar kmandhre

change validation for location type mismatch


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92781 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9267ead4
......@@ -5078,6 +5078,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
distCommon = new DistCommon();
String sqlStr = null;
String objName = null,llLineNoInvtraceStr = "", saleOrder = "",lineNoSord = "",spaces = "";
String itemLocCode = "";
double lsVarperc = 0.0;
ArrayList errList = new ArrayList();
ArrayList errFields = new ArrayList();
......@@ -6935,7 +6936,8 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
String locLocType = null;
String itemLocType = null;
//itemCode = genericUtility.getColumnValue( "item_code", dom );
sqlStr = "select loc_type from item where item_code = ? ";
//change done by kunal on 1/03/13 take item's location code
/*sqlStr = "select loc_type from item where item_code = ? ";
pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1, itemCode );
rs = pstmt.executeQuery();
......@@ -6946,8 +6948,36 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
rs.close();
rs = null;
pstmt.close();
pstmt = null;*/
sqlStr = "select loc_code from item where item_code = ? ";
pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1, itemCode );
rs = pstmt.executeQuery();
if( rs.next() )
{
itemLocCode = rs.getString( "loc_code" );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
sqlStr = "select loc_type from location where loc_code = ? ";
pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1,itemLocCode );
rs = pstmt.executeQuery();
if( rs.next() )
{
itemLocType = rs.getString( "loc_type" );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
itemLocType = itemLocType == null ? "" : itemLocType;
sqlStr = "select loc_type from location where loc_code = ? ";
pstmt = conn.prepareStatement( sqlStr );
......
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