Commit 8ea77322 authored by dhirajchavan's avatar dhirajchavan

Added for purchase order open process ,req#_D16ASUN002


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101686 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 76e59103
...@@ -105,19 +105,11 @@ public class PorderOpenPrc extends ProcessEJB implements PorderOpenPrcLocal,Pord ...@@ -105,19 +105,11 @@ public class PorderOpenPrc extends ProcessEJB implements PorderOpenPrcLocal,Pord
ResultSet rs = null; ResultSet rs = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
StringBuffer retDistOrdIssBuff = new StringBuffer(); StringBuffer retDistOrdIssBuff = new StringBuffer();
int TotStatusCnt=0,totLineNo=0;
//String siteCodeFr="", siteCodeTo="",toDateStr="",frDateStr="";
//java.sql.Date toDate = null;
//java.sql.Date frDate = null;
String purcOrder="",confirmed="",empCode="",loginEmpCode="",deptCode_po="",deptCode_userlogin=""; String purcOrder="",confirmed="",empCode="",loginEmpCode="",deptCode_po="",deptCode_userlogin="";
String headerstatus=""; String headerstatus="";
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
//java.sql.Date tranDate = null;
//java.sql.Date effDate = null;
//java.sql.Date lrDate = null;
//java.sql.Date chgDate = null;
//java.sql.Date confDate = null;
//java.sql.Date gpDate = null;
try try
{ {
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
...@@ -196,7 +188,24 @@ public class PorderOpenPrc extends ProcessEJB implements PorderOpenPrcLocal,Pord ...@@ -196,7 +188,24 @@ public class PorderOpenPrc extends ProcessEJB implements PorderOpenPrcLocal,Pord
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql=null; sql=null;
sql = " select count(status) from porddet where purc_order = ? and status='O'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
rs = pstmt.executeQuery();
if (rs.next()) {
TotStatusCnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (totLineNo == TotStatusCnt) {
// VTDNFFP No data found for processing
errString = itmDBAccessEJB.getErrorString("", "VTDNFFP", "",
"", conn);
return errString;
}
/* After enter Purchase Order No, system should validate dept code of PO Emp Code & logged user dept should be same. /* After enter Purchase Order No, system should validate dept code of PO Emp Code & logged user dept should be same.
* If not, show a message as "You not authorized to view PO Details as your & Purchaser's Dept code is different."*/ * If not, show a message as "You not authorized to view PO Details as your & Purchaser's Dept code is different."*/
...@@ -244,7 +253,7 @@ public class PorderOpenPrc extends ProcessEJB implements PorderOpenPrcLocal,Pord ...@@ -244,7 +253,7 @@ public class PorderOpenPrc extends ProcessEJB implements PorderOpenPrcLocal,Pord
deptCode_userlogin=rs.getString(1); deptCode_userlogin=rs.getString(1);
} }
if(deptCode_po!=deptCode_userlogin) if(!(deptCode_po).equals(deptCode_userlogin))
{ {
System.out.println("you are not autherized!!!!!!!!"); System.out.println("you are not autherized!!!!!!!!");
errString = itmDBAccessEJB.getErrorString("","VPNOTEVAL","","",conn); errString = itmDBAccessEJB.getErrorString("","VPNOTEVAL","","",conn);
......
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