Commit 5344d1b9 authored by prane's avatar prane

fixed dateformat bug while calling getDailyExchRateSellBuy()

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@188946 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fb54b686
...@@ -11663,16 +11663,17 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11663,16 +11663,17 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lsCurrCodeComm1 = "", lsCurrCodeComm2 = "", lsCurrCodeIns = ""; lsCurrCodeComm1 = "", lsCurrCodeComm2 = "", lsCurrCodeIns = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String orderDate = "";
try { try {
double mNum = 0.00; double mNum = 0.00;
lsCurrCodeIns = checkNull(genericUtility.getColumnValue("curr_code__ins", dom)); lsCurrCodeIns = checkNull(genericUtility.getColumnValue("curr_code__ins", dom));
lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom)); lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
//to handle parsing exceptio in getDailyExchRateSellBuy
Timestamp orderDate = Timestamp /*Timestamp orderDate = Timestamp
.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom1), .valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom1),
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");*/
mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeIns, "", lsSiteCode, orderDate.toString(), "S", conn); orderDate = checkNull(genericUtility.getColumnValue("order_date", dom1));
mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeIns, "", lsSiteCode, orderDate, "S", conn);
valueXmlString.append("<exch_rate__ins>").append("<![CDATA[" + mNum + "]]>").append("</exch_rate__ins>"); valueXmlString.append("<exch_rate__ins>").append("<![CDATA[" + mNum + "]]>").append("</exch_rate__ins>");
exchangeRateProtect(lsCurrCodeIns, lsSiteCode, "exch_rate__ins", conn); exchangeRateProtect(lsCurrCodeIns, lsSiteCode, "exch_rate__ins", conn);
...@@ -11694,21 +11695,22 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11694,21 +11695,22 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lsCurrCodeComm1 = "", lsCurrCodeComm2 = ""; lsCurrCodeComm1 = "", lsCurrCodeComm2 = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String orderDate="";
try { try {
double mNum = 0.00; double mNum = 0.00;
lsCurrCodeComm2 = checkNull(genericUtility.getColumnValue("curr_code__comm2", dom)); lsCurrCodeComm2 = checkNull(genericUtility.getColumnValue("curr_code__comm2", dom));
lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom)); lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
lsCurrCode = checkNull(genericUtility.getColumnValue("curr_code", dom)); lsCurrCode = checkNull(genericUtility.getColumnValue("curr_code", dom));
//to handle parsing exceptio in getDailyExchRateSellBuy
Timestamp orderDate = Timestamp /*Timestamp orderDate = Timestamp
.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom1), .valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom1),
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");*/
if (lsCurrCodeComm2.equalsIgnoreCase(lsCurrCode)) { if (lsCurrCodeComm2.equalsIgnoreCase(lsCurrCode)) {
mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom)); mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom));
} else { } else {
mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm2, "", lsSiteCode, orderDate.toString(), "S", orderDate = checkNull(genericUtility.getColumnValue("order_date", dom1));
mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm2, "", lsSiteCode, orderDate, "S",
conn); conn);
} }
...@@ -11736,20 +11738,21 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11736,20 +11738,21 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lsCurrCodeComm1 = ""; lsCurrCodeComm1 = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String orderDate = "";
try { try {
double mNum = 0.00; double mNum = 0.00;
lsCurrCodeComm1 = checkNull(genericUtility.getColumnValue("curr_code__comm1", dom)); lsCurrCodeComm1 = checkNull(genericUtility.getColumnValue("curr_code__comm1", dom));
lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom)); lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
lsCurrCode = checkNull(genericUtility.getColumnValue("curr_code", dom)); lsCurrCode = checkNull(genericUtility.getColumnValue("curr_code", dom));
//to handle parsing exceptio in getDailyExchRateSellBuy
Timestamp orderDate = Timestamp /*Timestamp orderDate = Timestamp
.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom1), .valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom1),
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");*/
if (lsCurrCodeComm1.equalsIgnoreCase(lsCurrCode)) { if (lsCurrCodeComm1.equalsIgnoreCase(lsCurrCode)) {
mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom)); mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom));
} else { } else {
orderDate = checkNull(genericUtility.getColumnValue("order_date", dom1));
mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm1, "", lsSiteCode, orderDate.toString(), "S", mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm1, "", lsSiteCode, orderDate.toString(), "S",
conn); 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