Commit f400d072 authored by kmandhre's avatar kmandhre

update current date in tran_date for ledger post : HEAD


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95249 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c82df109
......@@ -270,7 +270,12 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
String analysis1__acct="",analysis2__acct="",analysis3__acct="" ;
try{
System.out.println("<!@#> In gbfRetrieveMiscDrcrRcp :::::::::::::::::::::::::::::::");
GenericUtility genericUtility = GenericUtility.getInstance();
String dbDateFormat = genericUtility.getDBDateFormat();
String applDateFormat = genericUtility.getApplDateFormat();
SimpleDateFormat sdf = new SimpleDateFormat(applDateFormat);
//added by kunal on 10/jun/14
toDay = java.sql.Timestamp.valueOf(genericUtility.getValidDateString( sdf.format(toDate) , applDateFormat, dbDateFormat ) + " 00:00:00.0") ;
if("db2".equalsIgnoreCase(CommonConstants.DB_NAME))
{
......@@ -643,7 +648,8 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
//for run mode "I" {as discussed with KB sir it is only for PB compatibility}
if ("I".equalsIgnoreCase(runMode))
{
toDay =new java.sql.Timestamp(toDate.getTime());
//toDay =new java.sql.Timestamp(toDate.getTime());
if("MDRCRC".equalsIgnoreCase(tranSer.trim()))
{
winName = "W_MISC_DRCR_RCP_CR";
......@@ -674,12 +680,13 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
if(ledgPostConf != null && "Y".equalsIgnoreCase(ledgPostConf))
{
if(tranDate.compareTo(toDay) > 0)
{
//if(tranDate.compareTo(toDay) > 0) change done by kunal on 10/jun/14 comment if statement
//{
sql =" update misc_drcr_rcp set tran_date = ? "
+" where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1,tranDate);
//pstmt.setTimestamp(1,tranDate);
pstmt.setTimestamp(1,toDay);//change done by kunal on 10/jun/14
pstmt.setString(2,tranId);
upd = pstmt.executeUpdate();
if(upd <1 )
......@@ -688,7 +695,7 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
}
pstmt.close();
pstmt = null;
}
//}
}
if(("null".equals(roundAdj)) || (roundAdj == 0))
{
......
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