Commit 931ddb79 authored by mnair's avatar mnair

Added changes to the pricelistordertype method

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177725 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1faa8c4f
...@@ -13980,18 +13980,30 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13980,18 +13980,30 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
// SimpleDateFormat sdf; // SimpleDateFormat sdf;
try try
{ {
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yy"); //SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yy");
// SimpleDateFormat dateFormat=new // SimpleDateFormat dateFormat=new
// SimpleDateFormat(genericUtility.getDBDateFormat()); // SimpleDateFormat(genericUtility.getDBDateFormat());
String orderDateInStr = dateFormat.format(orderDate); //String orderDateInStr = dateFormat.format(orderDate);
System.out.println("orderDateInStr*****" + orderDateInStr); //System.out.println("orderDateInStr*****" + orderDateInStr);
//Changes by mayur on 05-JAN-18
String orderDateInStr = "";
if(orderDateInStr.trim().length() > 0)
{
orderDateInStr = genericUtility.getValidDateString(orderDateInStr,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat());
orderDate = Timestamp.valueOf(orderDateInStr + " 00:00:00");
}
orderType = checkNull(genericUtility.getColumnValue("order_type", dom)); orderType = checkNull(genericUtility.getColumnValue("order_type", dom));
System.out.println("orderType==" + orderType); System.out.println("orderType==" + orderType);
sql = "select count(1) from pricelist where eff_from <= ? and valid_upto >= ? and order_type <> null"; sql = "select count(1) from pricelist where eff_from <= ? and valid_upto >= ? and order_type <> null";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, orderDateInStr);
pstmt.setString(2, orderDateInStr); pstmt.setTimestamp(1,orderDate);
pstmt.setTimestamp(2,orderDate);
//pstmt.setString(1, orderDateInStr);
//pstmt.setString(2, orderDateInStr);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
...@@ -14006,8 +14018,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -14006,8 +14018,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
sql = "select distinct price_list , order_type from pricelist where eff_from <=? and valid_upto >= ? and order_type <> null"; sql = "select distinct price_list , order_type from pricelist where eff_from <=? and valid_upto >= ? and order_type <> null";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, orderDateInStr); pstmt.setTimestamp(1, orderDate);
pstmt.setString(2, orderDateInStr); pstmt.setTimestamp(2, orderDate);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while (rs.next()) while (rs.next())
......
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