Commit a35d6c87 authored by ssurve's avatar ssurve

available yn from invstat and despatch compared. if not equal then raised...

available yn from invstat and despatch compared. if not equal then raised error Available flag is invalid for this location


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96468 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8a1f16e1
......@@ -561,10 +561,15 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
else if(childNodeName.equalsIgnoreCase("loc_code"))
{
String despID = "",availYN = ""; // Added by Sandesh 29-Sep-2014
sorderNo = checkNull(genericUtility.getColumnValue("sale_order_no", dom1));
despID = checkNull(genericUtility.getColumnValue("desp_id", dom2,"3")); // Added by Sandesh 29-Sep-2014
locCode = genericUtility.getColumnValue("loc_code",dom2,"3");
//tranId = genericUtility.getColumnValue("tran_id",dom2);
System.out.println("sorderNo---loc_code---->>["+sorderNo+"]");
System.out.println("despID in loc_code : "+despID); // Added by Sandesh 29-Sep-2014
if (locCode == null || locCode.trim().length() == 0)
{
errCode = "DIDOLCNULL";
......@@ -575,13 +580,52 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
invstat=getColumnDescr(conn, "inv_stat", "location", "loc_code", locCode);
System.out.println("invstat---loc_code---->>["+invstat+"]");
// Added by Sandesh 29-Sep-2014
sql = "select case when available_yn is null then 'N' else available_yn end from despatch where desp_id = ? ";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,despID);
rs = pstmt.executeQuery();
if(rs.next())
{
availYN = rs.getString(1);
}
if(pstmt!=null){
pstmt.close();
pstmt = null;
}
if(rs!=null){
rs.close();
rs = null;
}
System.out.println("available_yn from despatch header : "+availYN);
//----------------------
aval=getColumnDescr(conn, "available", "invstat", "inv_stat", invstat);
if( ("N".equalsIgnoreCase(aval))){
System.out.println("available from invstat "+aval);
// Added by Sandesh 29-Sep-2014
if(availYN.equalsIgnoreCase("N") && "Y".equalsIgnoreCase(aval)){
errCode = "VTAVAIL";
errString = getErrorString("loc_code",errCode,userId);
break;
}else if(availYN.equalsIgnoreCase("Y") && "N".equalsIgnoreCase(aval)){
errCode = "VTAVAIL";
errString = getErrorString("loc_code",errCode,userId);
break;
}
// Added by Sandesh 29-Sep-2014
/*if( "N".equalsIgnoreCase(aval)){ // Commented by Sandesh 29-Sep-2014
errCode = "VTAVAIL";
errString = getErrorString("loc_code",errCode,userId);
break;
}*/
}
}
......@@ -969,7 +1013,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
despId = checkNull(genericUtility.getColumnValue("desp_id", dom2,"2"));
String domID = checkNull(getColumnValueMy("Detail3", dom2, "3"));
System.out.println("sorderNo---->>["+sorderNo+"]");
System.out.println("despID---->>["+despId+"]");
System.out.println("despId---->>["+despId+"]");
System.out.println("domID---->>["+domID+"]");
System.out.println("addUsersList2@---->>["+addUsersList+"]");
if(addUsersList !=null){
......
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