Commit 36852b71 authored by vvengurlekar's avatar vvengurlekar

MiscValConf.java - added code to return error if no record found in...

MiscValConf.java - added code to return error if no record found in pay_ibca_ctrl and  link type is null


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@194014 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0b1c2ca0
...@@ -1774,7 +1774,7 @@ conn = getConnection(); ...@@ -1774,7 +1774,7 @@ conn = getConnection();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt= null; pstmt= null;
int count = 0;
sql =" select link_type, acct_code__pay, cctr_code__pay, acct_code__rcp, cctr_code__rcp, auto_confirm" sql =" select link_type, acct_code__pay, cctr_code__pay, acct_code__rcp, cctr_code__rcp, auto_confirm"
+" from ibca_pay_ctrl where site_code__from = ? and site_code__to = ? "; +" from ibca_pay_ctrl where site_code__from = ? and site_code__to = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -1783,6 +1783,7 @@ conn = getConnection(); ...@@ -1783,6 +1783,7 @@ conn = getConnection();
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
count++;
link = rs.getString("link_type"); link = rs.getString("link_type");
acctFr = rs.getString("acct_code__pay"); acctFr = rs.getString("acct_code__pay");
cctrFr = rs.getString("cctr_code__pay"); cctrFr = rs.getString("cctr_code__pay");
...@@ -1795,7 +1796,18 @@ conn = getConnection(); ...@@ -1795,7 +1796,18 @@ conn = getConnection();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt= null; pstmt= null;
//Added by Varsha V on 04-12-18 for returning error if no records found or link type null
if(count == 0)
{
errString = itmDBAccessEJB.getErrorString("","VTIBCA5 ","","",conn);
return errString;
}
if(link == null || link.trim().length() == 0)
{
errString = itmDBAccessEJB.getErrorString("","VTIBCA6 ","","",conn);
return errString;
}
//Ended by Varsha V on 04-12-18 for returning error if no records found or link type null
tDay = new java.sql.Timestamp(toDay.getTime()); tDay = new java.sql.Timestamp(toDay.getTime());
String xmlStringIbca = "<?xml version=\"1.0\"?>\r\n<Root>\r\n<header>"+ String xmlStringIbca = "<?xml version=\"1.0\"?>\r\n<Root>\r\n<header>"+
...@@ -1810,6 +1822,7 @@ conn = getConnection(); ...@@ -1810,6 +1822,7 @@ conn = getConnection();
if (ibcaId.indexOf("ERROR") > -1 ) if (ibcaId.indexOf("ERROR") > -1 )
{ {
errString = itmDBAccessEJB.getErrorString("","VTTRANID","","",conn); errString = itmDBAccessEJB.getErrorString("","VTTRANID","","",conn);
return errString;
} }
remarks = "Auto IBCA of voucher of " +supp; remarks = "Auto IBCA of voucher of " +supp;
......
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