Commit b5a95c44 authored by cshah's avatar cshah

changed getContactCode method


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91535 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0432645d
......@@ -1372,14 +1372,12 @@ public class FinCommon
public String getFinparams(String prdCode,String varName,Connection conn)throws ITMException
{
String varValue="";
String retVal="";
String sql="";
ResultSet rs = null;
//Statement stmt = null;//Gulzar - 13/10/11
PreparedStatement pstmt = null;
Statement stmt = null;
try
{
/*-- changes made by gulzar - 13/10/11 as it is not working
System.out.println("In FINPARAMS......");
stmt = conn.createStatement();
sql="SELECT VAR_VALUE FROM FINPARM WHERE PRD_CODE ='"+prdCode.trim()+"' AND VAR_NAME ='"+varName.trim()+"'";
......@@ -1394,20 +1392,6 @@ public class FinCommon
}
stmt.close(); stmt = null;
rs.close(); rs = null;
*/
sql = "SELECT VAR_VALUE FROM FINPARM WHERE PRD_CODE = ? AND VAR_NAME = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, prdCode);
pstmt.setString(2, varName);
rs = pstmt.executeQuery();
if ( rs.next() )
{
varValue = rs.getString("VAR_VALUE");
}
if ( varValue == null || varValue.trim().length() == 0 )
{
varValue = "NULLFOUND";
}
}
catch(Exception e)
{
......@@ -1419,7 +1403,6 @@ public class FinCommon
{
try
{
/*
if (stmt != null)
{
stmt.close(); stmt = null;
......@@ -1428,24 +1411,13 @@ public class FinCommon
{
rs.close(); rs = null;
}
*/
if ( rs != null )
{
rs.close();
rs = null;
}
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
catch (Exception e)
{
System.out.println("Exception []" + e.getMessage() + ":");
}
}
return(varValue);
return(retVal);
}//getFinparams()
public double getDailyExchRateSellBuy(String as_curr_code,String as_curr_code__to,String as_login_site,String as_tran_date,String as_type,Connection conn)throws ITMException
......@@ -10185,6 +10157,10 @@ public class FinCommon
tableName = "LOANPARTY";
columnName = "PARTY_CODE";
}
else if(sundryType.equals("X"))
{
return contactCode;
}
try
{
......@@ -10616,10 +10592,14 @@ public class FinCommon
pstmt.close();
pstmt = null;
if("null".equalsIgnoreCase(contactCode)) contactCode = "";
//if("null".equalsIgnoreCase(contactCode)) contactCode = "";
if( contactCode == null)
{
contactCode = "";
}
refSerOrg = (String)receivablesMap.get("ref_ser__org");
sql =" SELECT KEY_STRING FROM TRANSETUP WHERE TRAN_WINDOW = 'T_RCVABLES'";
sql =" SELECT KEY_STRING FROM TRANSETUP WHERE upper(TRAN_WINDOW) = 'T_RCVABLES'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery(sql);
if(rs.next())
......@@ -10631,7 +10611,6 @@ public class FinCommon
pstmt.close();
pstmt = null;
String XMLString = "<?xml version=\"1.0\"?>\r\n<Root>\r\n<header>"+
"\r\n</header><Detail1><item_ser>"+itemSer+"</item_ser>"+
"\r\n<site_code>"+siteCode+"</site_code>\r\n<tran_date>"+tranDate+"</tran_date></Detail1></Root>";
......
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