Commit ea762ca3 authored by msaggam's avatar msaggam

changes made for order_date and exch_rate

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204999 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 41da60da
...@@ -4606,7 +4606,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -4606,7 +4606,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom)); lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
lsCustCode = checkNull(genericUtility.getColumnValue("cust_code", dom)); lsCustCode = checkNull(genericUtility.getColumnValue("cust_code", dom));
lsCustCodeDlv = checkNull(genericUtility.getColumnValue("cust_code__dlv", dom)); lsCustCodeDlv = checkNull(genericUtility.getColumnValue("cust_code__dlv", dom));
ldtOrderDate = checkNull(genericUtility.getColumnValue("order_date", dom)); // ldtOrderDate = checkNull(genericUtility.getColumnValue("order_date", dom));
ldtOrderDate = genericUtility.getColumnValue("order_date", dom); // changes made by mahesh saggam on 09/aug/2019 [Removed checknull()]
lsItemser = checkNull(genericUtility.getColumnValue("item_ser", dom)); lsItemser = checkNull(genericUtility.getColumnValue("item_ser", dom));
lsPlistDisc = priceListDiscount(lsSiteCode, lsCustCode, conn); lsPlistDisc = priceListDiscount(lsSiteCode, lsCustCode, conn);
...@@ -4616,10 +4617,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -4616,10 +4617,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lsOrderType = checkNull(genericUtility.getColumnValue("order_type", dom)); lsOrderType = checkNull(genericUtility.getColumnValue("order_type", dom));
lsOrdtypeSample = distCommon.getDisparams("999999", "SAMPLE_ORDER_TYPE", conn); lsOrdtypeSample = distCommon.getDisparams("999999", "SAMPLE_ORDER_TYPE", conn);
if(ldtOrderDate != null) // if condition added by mahesh saggam on 09/aug/2019
{
Timestamp ldtOrdDt = Timestamp.valueOf(genericUtility.getValidDateString(ldtOrderDate, Timestamp ldtOrdDt = Timestamp.valueOf(genericUtility.getValidDateString(ldtOrderDate,
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("@V@ ldtOrdDt :-[" + ldtOrdDt + "]"); System.out.println("@V@ ldtOrdDt :-[" + ldtOrdDt + "]");
lsContractNo = getContractHrd(lsSiteCode, lsCustCode, ldtOrdDt, lsItemser, conn); lsContractNo = getContractHrd(lsSiteCode, lsCustCode, ldtOrdDt, lsItemser, conn);
}
if (lsContractNo != null && lsContractNo.trim().length() > 0) { if (lsContractNo != null && lsContractNo.trim().length() > 0) {
valueXmlString.append("<contract_no>").append("<![CDATA[" + lsContractNo + "]]>") valueXmlString.append("<contract_no>").append("<![CDATA[" + lsContractNo + "]]>")
.append("</contract_no>"); .append("</contract_no>");
...@@ -13512,6 +13518,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13512,6 +13518,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
// TODO Auto-generated method stub // TODO Auto-generated method stub
String sql = "", lsTermCode = "", descr = "", lsCurrCodeComm = "", lsSiteCode = "", lsCurrCode = "", String sql = "", lsTermCode = "", descr = "", lsCurrCodeComm = "", lsSiteCode = "", lsCurrCode = "",
lsCurrCodeComm1 = "", lsCurrCodeComm2 = ""; lsCurrCodeComm1 = "", lsCurrCodeComm2 = "";
String excRateStr = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String orderDate=""; String orderDate="";
...@@ -13525,8 +13532,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13525,8 +13532,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
/*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");*/
// added by mahesh saggam on 09/aug/2019 [Start]
excRateStr = checkNull(genericUtility.getColumnValue("exch_rate", dom));
excRateStr = excRateStr == null || excRateStr.trim().length() <= 0 ? "0" : excRateStr;
// mahesh saggam [End]
if (lsCurrCodeComm2.equalsIgnoreCase(lsCurrCode)) { if (lsCurrCodeComm2.equalsIgnoreCase(lsCurrCode)) {
mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom)); // mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom)); // commented by mahesh saggam on 09/aug/2019
mNum = Double.parseDouble(excRateStr);
} else { } else {
orderDate = checkNull(genericUtility.getColumnValue("order_date", dom1)); orderDate = checkNull(genericUtility.getColumnValue("order_date", dom1));
mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm2, "", lsSiteCode, orderDate, "S", mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm2, "", lsSiteCode, orderDate, "S",
...@@ -13563,6 +13577,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13563,6 +13577,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
// TODO Auto-generated method stub // TODO Auto-generated method stub
String sql = "", lsTermCode = "", descr = "", lsCurrCodeComm = "", lsSiteCode = "", lsCurrCode = "", String sql = "", lsTermCode = "", descr = "", lsCurrCodeComm = "", lsSiteCode = "", lsCurrCode = "",
lsCurrCodeComm1 = ""; lsCurrCodeComm1 = "";
String excRateStr = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String orderDate = ""; String orderDate = "";
...@@ -13576,8 +13591,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13576,8 +13591,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
/*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");*/
// added by mahesh saggam on 09/aug/2019 [Start]
excRateStr = checkNull(genericUtility.getColumnValue("exch_rate", dom));
excRateStr = excRateStr == null || excRateStr.trim().length() <= 0 ? "0" : excRateStr;
// mahesh saggam [End]
if (lsCurrCodeComm1.equalsIgnoreCase(lsCurrCode)) { if (lsCurrCodeComm1.equalsIgnoreCase(lsCurrCode)) {
mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom)); // mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom)); // commented by mahesh saggam on 09/aug/2019
mNum = Double.parseDouble(excRateStr);
} else { } else {
orderDate = checkNull(genericUtility.getColumnValue("order_date", dom1)); orderDate = checkNull(genericUtility.getColumnValue("order_date", dom1));
mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm1, "", lsSiteCode, orderDate.toString(), "S", mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm1, "", lsSiteCode, orderDate.toString(), "S",
...@@ -13613,6 +13635,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13613,6 +13635,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
String editFlag, String xtraParams, String objContext, Connection conn) throws ITMException { String editFlag, String xtraParams, String objContext, Connection conn) throws ITMException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
String sql = "", lsTermCode = "", descr = "", lsCurrCodeComm = "", lsSiteCode = "", lsCurrCode = ""; String sql = "", lsTermCode = "", descr = "", lsCurrCodeComm = "", lsSiteCode = "", lsCurrCode = "";
String excRateStr = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
...@@ -13626,8 +13649,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13626,8 +13649,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
// dom1), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) // dom1), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat())
// + " 00:00:00.0"); // + " 00:00:00.0");
String ordDatStr = checkNull(genericUtility.getColumnValue("order_date", dom1)); String ordDatStr = checkNull(genericUtility.getColumnValue("order_date", dom1));
// added by mahesh saggam on 09/aug/2019 [Start]
excRateStr = checkNull(genericUtility.getColumnValue("exch_rate", dom));
excRateStr = excRateStr == null || excRateStr.trim().length() <= 0 ? "0" : excRateStr;
// mahesh saggam [End]
if (lsCurrCodeComm.equalsIgnoreCase(lsCurrCode)) { if (lsCurrCodeComm.equalsIgnoreCase(lsCurrCode)) {
mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom)); //mNum = Double.valueOf(genericUtility.getColumnValue("exch_rate", dom)); // commented by mahesh saggam on 09/aug//2019
mNum = Double.parseDouble(excRateStr);
} else { } else {
mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm, "", lsSiteCode, ordDatStr, "S", conn); mNum = finCommon.getDailyExchRateSellBuy(lsCurrCodeComm, "", lsSiteCode, ordDatStr, "S", 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