Commit 9e0829bd authored by dsawant's avatar dsawant

anal_code and acct code combination code change


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93196 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0f2ba867
......@@ -280,15 +280,18 @@ public class BudgetGroup extends ValidatorEJB implements BudgetGroupLocal,Budget
errString = getErrorString("anal_code",errCode,userId);
break;
}
String val = null;
sql = "select acct_code from accounts_analysis where anal_code= ? ";
System.out.println("CHECK ANAL");
int cnt1 = 0;
sql = "select count(*) from accounts_analysis where acct_code= ? and anal_code = ?";
System.out.println("CHECK ANALdd");
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, anal_code);
pstmt.setString(1, acct_code);
pstmt.setString(2, anal_code);
rs = pstmt.executeQuery();
if (rs.next()) {
val = rs.getString(1);
cnt1 = rs.getInt(1);
}
......@@ -296,8 +299,10 @@ public class BudgetGroup extends ValidatorEJB implements BudgetGroupLocal,Budget
rs = null;
pstmt.close();
pstmt = null;
System.out.println("callll");
if (!(val.trim().equalsIgnoreCase(acct_code.trim()))) {
System.out.println("");
System.out.println("checking dd");
if (cnt1 == 0) {
errCode = "VMANAL2";
errString = getErrorString("anal_code",errCode, userId);
......
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