Commit be084cdb authored by manohar's avatar manohar

Bug fix in case base currency and transaction currency same exch_rate made non editable


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95555 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 81043017
...@@ -3,6 +3,7 @@ package ibase.webitm.ejb.fin; ...@@ -3,6 +3,7 @@ package ibase.webitm.ejb.fin;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.dis.DistCommon; import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.utility.GenericUtility; import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException; import java.rmi.RemoteException;
...@@ -2516,7 +2517,29 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt ...@@ -2516,7 +2517,29 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
else else
{ {
valueXmlString.append("<curr_code protect = \"1\">").append("<![CDATA["+genericUtility.getColumnValue("curr_code", dom)+"]]>").append("</curr_code>"); valueXmlString.append("<curr_code protect = \"1\">").append("<![CDATA["+genericUtility.getColumnValue("curr_code", dom)+"]]>").append("</curr_code>");
//valueXmlString.append("<exch_rate protect = \"1\">").append("<![CDATA["+genericUtility.getColumnValue("exch_rate", dom)+"]]>").append("</exch_rate>"); siteCode = genericUtility.getColumnValue("site_code", dom);
currCode = genericUtility.getColumnValue("curr_code", dom);
sql = "select curr_code from finent, site where finent.fin_entity = site.fin_entity and site.site_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCode);
rs = pstmt.executeQuery();
if (rs.next())
{
fcurrCode = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (fcurrCode.trim().equals(currCode.trim()) )
{
valueXmlString.append("<exch_rate protect = \"1\">").append("<![CDATA["+genericUtility.getColumnValue("exch_rate", dom)+"]]>").append("</exch_rate>");
}
else
{
valueXmlString.append("<exch_rate protect = \"0\">").append("<![CDATA["+genericUtility.getColumnValue("exch_rate", dom)+"]]>").append("</exch_rate>");
}
} }
tranId = genericUtility.getColumnValue("tran_id", dom); tranId = genericUtility.getColumnValue("tran_id", dom);
......
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