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 ...@@ -479,7 +479,6 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
currDate = sdf.format(new java.util.Date()); currDate = sdf.format(new java.util.Date());
System.out.println("Extra Params is="+xtraParams); System.out.println("Extra Params is="+xtraParams);
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" ); userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
...@@ -906,7 +905,6 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote ...@@ -906,7 +905,6 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
} }
} }
} }
break; break;
} }
...@@ -1082,7 +1080,6 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote ...@@ -1082,7 +1080,6 @@ 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' "; 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] // Changed by Sneha on 27-05-2016, for Purchase order pophelp [Start]
else if (field.equals("purc_order")) else if (field.equals("purc_order"))
{ {
...@@ -1409,7 +1406,6 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote ...@@ -1409,7 +1406,6 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
System.out.println(" dlvDate inside getPorderDetails ==========>> " + dlvDate); System.out.println(" dlvDate inside getPorderDetails ==========>> " + dlvDate);
System.out.println(" ctr inside getPorderDetails ==========>> " + ctr);*/ System.out.println(" ctr inside getPorderDetails ==========>> " + ctr);*/
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
Document dom=null; Document dom=null;
...@@ -1492,6 +1488,8 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote ...@@ -1492,6 +1488,8 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
try try
{ {
finCommon = new FinCommon(); 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 = genericUtility.getColumnValue("purc_order", dom1,"1"); // Changed by Sneha on 03-06-2016, for PO Edit
purcOrder = (purcOrder == null) ? "" : purcOrder; purcOrder = (purcOrder == null) ? "" : purcOrder;
...@@ -1515,9 +1513,7 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote ...@@ -1515,9 +1513,7 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
System.out.println("Currency Code Is="+currCode); System.out.println("Currency Code Is="+currCode);
//Changed by wasim on 07-07-2015 to get curr_code [END] //Changed by wasim on 07-07-2015 to get curr_code [END]
/******************************/ /******************************/
// Changed by Sneha on 07-06-2016, for PO Edit [Start] // 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 = ? )"; +"and price_list in (select price_list from supplier where supp_code = ? )";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -1564,13 +1560,13 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote ...@@ -1564,13 +1560,13 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
if ( rs.next() ) if ( rs.next() )
{ {
rate = Double.parseDouble(checkNullAndTrim(rs.getString("rate"))); 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"); Date dlvDateDt = rs.getDate("DLV_DATE");
java.util.Date tempDate = simpleDateFormat.parse(dlvDate); dlvDate = sdf.format(dlvDateDt).toString();
SimpleDateFormat outputDateFormat = new SimpleDateFormat("dd/MM/YYYY"); //System.out.println("dlvDate ========> "+dlvDate);
dlvDate = outputDateFormat.format(tempDate); // Changed by Sneha on 22-08-2016, for Date Format [End]
System.out.println("dlvDate ========> "+dlvDate);
} }
if( rs != null ) if( rs != null )
{ {
...@@ -1617,18 +1613,12 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote ...@@ -1617,18 +1613,12 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
System.out.println("Pure Lead Time="+dlvleadTime); System.out.println("Pure Lead Time="+dlvleadTime);
System.out.println("Delivery Date="+dlvDate); System.out.println("Delivery Date="+dlvDate);
// Changed by Sneha on 07-06-2016, for PO Edit [Start] // Changed by Sneha on 22-08-2016, for Date Format [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.setTime(sdf.parse(dlvDate));
c.add(Calendar.DATE, Integer.parseInt(dlvleadTime)); c.add(Calendar.DATE, Integer.parseInt(dlvleadTime));
dlvDate = sdf.format(c.getTime()); dlvDate = sdf.format(c.getTime());
System.out.println("New Delivery Date--------->>"+dlvDate); System.out.println("New Delivery Date--------->>"+dlvDate);
// Changed by Sneha on 22-08-2016, for Date Format [End]
} // Changed by Sneha on 07-06-2016
} }
rs.close();rs = null; 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