Commit 40b68f37 authored by cshah's avatar cshah

Changes in tran_date column in itemchange and wfvaldata method


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91694 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 692a8a95
...@@ -1117,8 +1117,8 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -1117,8 +1117,8 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
double saless = 0; double saless = 0;
double clStk = 0; double clStk = 0;
int currentFormNo = 0; int currentFormNo = 0;
int mon = 0; //int mon = 0;
int days =0; //int days =0;
float rateValue = 0f; float rateValue = 0f;
String opValue = ""; String opValue = "";
...@@ -1576,9 +1576,10 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -1576,9 +1576,10 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
trnDate = getDateObject(tranDate); trnDate = getDateObject(tranDate);
Calendar calendar = new GregorianCalendar(); Calendar calendar = new GregorianCalendar();
calendar.setTime(trnDate); calendar.setTime(trnDate);
mon = calendar.get(Calendar.MONTH); //mon = calendar.get(Calendar.MONTH);
year = calendar.get(Calendar.YEAR); //year = calendar.get(Calendar.YEAR);
columnValue = genericUtility.getValidDateString( columnValue , getApplDateFormat() , "dd-MMM-yyyy" ); columnValue = genericUtility.getValidDateString( columnValue , getApplDateFormat() , "dd-MMM-yyyy" );
/* Commented By Chandni As Date is not setting Properly 19-Apr-2012
if (getApplDateFormat().equalsIgnoreCase("dd-MM-yyyy")) if (getApplDateFormat().equalsIgnoreCase("dd-MM-yyyy"))
{ {
if (mon <= 8) if (mon <= 8)
...@@ -1628,9 +1629,26 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -1628,9 +1629,26 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
{ {
lastDate = days + "-" + tranDate.substring(3, 6) + "-" + year; lastDate = days + "-" + tranDate.substring(3, 6) + "-" + year;
} }
*/
/* Commented By Chandni As Date is not setting Properly
valueXmlString.append("<tran_date>").append(lastDate).append("</tran_date>\r\n"); valueXmlString.append("<tran_date>").append(lastDate).append("</tran_date>\r\n");
valueXmlString.append("<from_date>").append(firstDate).append("</from_date>\r\n"); valueXmlString.append("<from_date>").append(firstDate).append("</from_date>\r\n");
valueXmlString.append("<to_date>").append(lastDate).append("</to_date>\r\n"); valueXmlString.append("<to_date>").append(lastDate).append("</to_date>\r\n");
Comment Ended*/
//Added by chandni 19-Apr-2012
calendar.setTime(trnDate);
calendar.set(Calendar.DAY_OF_MONTH,1);
System.out.println("getApplDateFormat()----"+getApplDateFormat());
java.text.SimpleDateFormat dtf = new SimpleDateFormat( getApplDateFormat() );
valueXmlString.append("<from_date>").append(dtf.format( calendar.getTime() )).append("</from_date>\r\n");
int ld = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
calendar.set(Calendar.DAY_OF_MONTH,ld);
System.out.println("Date : " + calendar.getTime());
System.out.println("Last Date: " + lastDate);
valueXmlString.append("<tran_date>").append(dtf.format( calendar.getTime() )).append("</tran_date>\r\n");
valueXmlString.append("<to_date>").append(dtf.format( calendar.getTime() )).append("</to_date>\r\n");
/*select code into :ls_prd_code from period /*select code into :ls_prd_code from period
where fr_date <= :ld_tran_date and to_date >= :ld_tran_date ; where fr_date <= :ld_tran_date and to_date >= :ld_tran_date ;
dw_edit.setitem (1, "prd_code", ls_prd_code)*/ dw_edit.setitem (1, "prd_code", ls_prd_code)*/
......
...@@ -1117,8 +1117,8 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -1117,8 +1117,8 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
double saless = 0; double saless = 0;
double clStk = 0; double clStk = 0;
int currentFormNo = 0; int currentFormNo = 0;
int mon = 0; //int mon = 0;
int days =0; //int days =0;
float rateValue = 0f; float rateValue = 0f;
String opValue = ""; String opValue = "";
...@@ -1576,9 +1576,10 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -1576,9 +1576,10 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
trnDate = getDateObject(tranDate); trnDate = getDateObject(tranDate);
Calendar calendar = new GregorianCalendar(); Calendar calendar = new GregorianCalendar();
calendar.setTime(trnDate); calendar.setTime(trnDate);
mon = calendar.get(Calendar.MONTH); //mon = calendar.get(Calendar.MONTH);
year = calendar.get(Calendar.YEAR); //year = calendar.get(Calendar.YEAR);
columnValue = genericUtility.getValidDateString( columnValue , getApplDateFormat() , "dd-MMM-yyyy" ); columnValue = genericUtility.getValidDateString( columnValue , getApplDateFormat() , "dd-MMM-yyyy" );
/* Commented By Chandni As Date is not setting Properly 19-Apr-2012
if (getApplDateFormat().equalsIgnoreCase("dd-MM-yyyy")) if (getApplDateFormat().equalsIgnoreCase("dd-MM-yyyy"))
{ {
if (mon <= 8) if (mon <= 8)
...@@ -1628,9 +1629,26 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -1628,9 +1629,26 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
{ {
lastDate = days + "-" + tranDate.substring(3, 6) + "-" + year; lastDate = days + "-" + tranDate.substring(3, 6) + "-" + year;
} }
*/
/* Commented By Chandni As Date is not setting Properly
valueXmlString.append("<tran_date>").append(lastDate).append("</tran_date>\r\n"); valueXmlString.append("<tran_date>").append(lastDate).append("</tran_date>\r\n");
valueXmlString.append("<from_date>").append(firstDate).append("</from_date>\r\n"); valueXmlString.append("<from_date>").append(firstDate).append("</from_date>\r\n");
valueXmlString.append("<to_date>").append(lastDate).append("</to_date>\r\n"); valueXmlString.append("<to_date>").append(lastDate).append("</to_date>\r\n");
Comment Ended*/
//Added by chandni 19-Apr-2012
calendar.setTime(trnDate);
calendar.set(Calendar.DAY_OF_MONTH,1);
System.out.println("getApplDateFormat()----"+getApplDateFormat());
java.text.SimpleDateFormat dtf = new SimpleDateFormat( getApplDateFormat() );
valueXmlString.append("<from_date>").append(dtf.format( calendar.getTime() )).append("</from_date>\r\n");
int ld = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
calendar.set(Calendar.DAY_OF_MONTH,ld);
System.out.println("Date : " + calendar.getTime());
System.out.println("Last Date: " + lastDate);
valueXmlString.append("<tran_date>").append(dtf.format( calendar.getTime() )).append("</tran_date>\r\n");
valueXmlString.append("<to_date>").append(dtf.format( calendar.getTime() )).append("</to_date>\r\n");
/*select code into :ls_prd_code from period /*select code into :ls_prd_code from period
where fr_date <= :ld_tran_date and to_date >= :ld_tran_date ; where fr_date <= :ld_tran_date and to_date >= :ld_tran_date ;
dw_edit.setitem (1, "prd_code", ls_prd_code)*/ dw_edit.setitem (1, "prd_code", ls_prd_code)*/
......
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