Commit e2b5ef3b authored by smane's avatar smane

Update ChargeBackFormAccept.java file for adding confirm date column in charge back form


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95552 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4a61dce5
......@@ -13,6 +13,7 @@ import java.sql.*;
import java.text.SimpleDateFormat;
import java.rmi.*;
import java.util.*;
import org.w3c.dom.*;
import javax.ejb.Stateless; // added for ejb3
......@@ -85,6 +86,7 @@ public class ChargeBackFormAccept extends ActionHandlerEJB implements ChargeBack
java.sql.Timestamp tranDateTs = null;
String prdCode = "",statSal = "";
double amount=0,netAmt=0,totamt=0,totnetAmt=0;
Timestamp sysDate = null;
try
{
connDriver = null;
......@@ -321,30 +323,36 @@ public class ChargeBackFormAccept extends ActionHandlerEJB implements ChargeBack
}
else
{
// errString = "Accepted";
sql = " update charge_back_form set tran_id__cb = ? , confirmed = 'Y' where tran_id = ?";
pStmt1 = conn.prepareStatement(sql);
pStmt1.setString(1,chbtranID);
pStmt1.setString(2,tranId);
upConf = upConf + pStmt1.executeUpdate();
if(pStmt1 != null)
// errString = "Accepted";
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
String sysDateStr = sdf.format(currentDate.getTime());
System.out.println(">>>>>>>Now sysDateStr :=> " + sysDateStr);
sysDate= Timestamp.valueOf(genericUtility.getValidDateString(sysDateStr, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println(">>>>>>>>sysDate:"+sysDate);
sql = " update charge_back_form set tran_id__cb = ? , confirmed = 'Y', conf_date= ? where tran_id = ?";
pStmt1 = conn.prepareStatement(sql);
pStmt1.setString(1,chbtranID);
pStmt1.setTimestamp(2, sysDate);//conf_date is set by sagar on 04/07/14
pStmt1.setString(3,tranId);
upConf = upConf + pStmt1.executeUpdate();
if(pStmt1 != null)
pStmt1.close();
pStmt1=null;
//Added by Manoj dtd 15/05/2014 to set amount,net_amt,claum_amt,net_amt__bc in header for verified lines only
sql="update charge_back set amount=?,net_amt=?,claum_amt=?,net_amt__bc=exch_rate*? where tran_id=? ";
pStmt1=conn.prepareStatement(sql);
pStmt1.setDouble(1,totamt);
pStmt1.setDouble(2,totnetAmt);
pStmt1.setDouble(3,totnetAmt);
pStmt1.setDouble(4,totnetAmt);
pStmt1.setString(5,chbtranID);
pStmt1.executeUpdate();
if(pStmt1 != null)
//Added by Manoj dtd 15/05/2014 to set amount,net_amt,claum_amt,net_amt__bc in header for verified lines only
sql="update charge_back set amount=?,net_amt=?,claum_amt=?,net_amt__bc=exch_rate*? where tran_id=? ";
pStmt1=conn.prepareStatement(sql);
pStmt1.setDouble(1,totamt);
pStmt1.setDouble(2,totnetAmt);
pStmt1.setDouble(3,totnetAmt);
pStmt1.setDouble(4,totnetAmt);
pStmt1.setString(5,chbtranID);
pStmt1.executeUpdate();
if(pStmt1 != null)
pStmt1.close();
pStmt1=null;
errString = itmDBAccessEJB.getErrorString("","VTACCSUCC ","","",conn);
pStmt1=null;
errString = itmDBAccessEJB.getErrorString("","VTACCSUCC ","","",conn);
}
System.out.println(" No. of successfully accepted records in complete trans."+upConf);
......
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