Commit e280d00b authored by smestry's avatar smestry

Updated the class file for PO Autosave


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103085 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1af4b104
......@@ -479,7 +479,6 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
currDate = sdf.format(new java.util.Date());
System.out.println("Extra Params is="+xtraParams);
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
......@@ -906,11 +905,10 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
}
}
}
break;
}
}
}
}
catch(Exception e)
{
......@@ -1082,14 +1080,13 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
{
sql = " select fld_value,descr from gencodes where mod_name='W_PORDERWIZ' and fld_name='UDF_STR__1' ";
}
// Changed by Sneha on 27-05-2016, for Purchase order pophelp [Start]
else if (field.equals("purc_order"))
{
sql = " SELECT PURC_ORDER, '' FROM PORDER WHERE CONFIRMED = 'N' ";
}
// Changed by Sneha on 27-05-2016, for Purchase order pophelp [End]
pstmt = conn.prepareStatement(sql);
if(field.equals("item_code"))
......@@ -1409,7 +1406,6 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
System.out.println(" dlvDate inside getPorderDetails ==========>> " + dlvDate);
System.out.println(" ctr inside getPorderDetails ==========>> " + ctr);*/
E12GenericUtility genericUtility = new E12GenericUtility();
Document dom=null;
......@@ -1492,7 +1488,9 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
try
{
finCommon = new FinCommon();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
Calendar c = Calendar.getInstance();
purcOrder = genericUtility.getColumnValue("purc_order", dom1,"1"); // Changed by Sneha on 03-06-2016, for PO Edit
purcOrder = (purcOrder == null) ? "" : purcOrder;
......@@ -1515,10 +1513,8 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
System.out.println("Currency Code Is="+currCode);
//Changed by wasim on 07-07-2015 to get curr_code [END]
/******************************/
// Changed by Sneha on 07-06-2016, for PO Edit [Start]
/*sql = " select rate from pricelist where item_code = ? "
/*sql = " select rate from pricelist where item_code = ? "
+"and price_list in (select price_list from supplier where supp_code = ? )";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
......@@ -1564,13 +1560,13 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
if ( rs.next() )
{
rate = Double.parseDouble(checkNullAndTrim(rs.getString("rate")));
dlvDate = checkNullAndTrim(rs.getString("DLV_DATE"));
// Changed by Sneha on 22-08-2016, for Date Format [Start]
//dlvDate = checkNullAndTrim(rs.getString("DLV_DATE"));
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
java.util.Date tempDate = simpleDateFormat.parse(dlvDate);
SimpleDateFormat outputDateFormat = new SimpleDateFormat("dd/MM/YYYY");
dlvDate = outputDateFormat.format(tempDate);
System.out.println("dlvDate ========> "+dlvDate);
Date dlvDateDt = rs.getDate("DLV_DATE");
dlvDate = sdf.format(dlvDateDt).toString();
//System.out.println("dlvDate ========> "+dlvDate);
// Changed by Sneha on 22-08-2016, for Date Format [End]
}
if( rs != null )
{
......@@ -1617,18 +1613,12 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
System.out.println("Pure Lead Time="+dlvleadTime);
System.out.println("Delivery Date="+dlvDate);
// Changed by Sneha on 07-06-2016, for PO Edit [Start]
if(purcOrder.equalsIgnoreCase(""))
{
// Changed by Sneha on 07-06-2016, for PO Edit [End]
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy");
Calendar c = Calendar.getInstance();
c.setTime(sdf.parse(dlvDate));
c.add(Calendar.DATE, Integer.parseInt(dlvleadTime));
dlvDate = sdf.format(c.getTime());
System.out.println("New Delivery Date--------->>"+dlvDate);
} // Changed by Sneha on 07-06-2016
// Changed by Sneha on 22-08-2016, for Date Format [Start]
c.setTime(sdf.parse(dlvDate));
c.add(Calendar.DATE, Integer.parseInt(dlvleadTime));
dlvDate = sdf.format(c.getTime());
System.out.println("New Delivery Date--------->>"+dlvDate);
// Changed by Sneha on 22-08-2016, for Date Format [End]
}
rs.close();rs = null;
......
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