Commit 8ee2a642 authored by dpawar's avatar dpawar

replace conf date in update query


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96177 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b459a526
......@@ -50,7 +50,7 @@ import javax.xml.rpc.ParameterMode;
@Stateless // added for ejb3
public class MiscVchEmpIConf extends ActionHandlerEJB implements MiscVchEmpIConfLocal, MiscVchEmpIConfRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
GenericUtility GenericUtilityObj=GenericUtility.getInstance();
UtilMethods utilMethods = UtilMethods.getInstance();
Random rnd = new Random();
ArrayList<String> miscVoucherTranID=new ArrayList<String>();
......@@ -147,11 +147,16 @@ public String confirmMiscVchEmp(String tranId,String xtraParams,String forcedFla
retString = generateMiscVoucher(tranIds, xtraParam, forcedF,conn);
System.out.println("generateMiscVoucher return String--->["+retString+"]");
if("Success".equalsIgnoreCase(retString)){
sql = "update misc_vch_emp set CONFIRMED = 'Y',CONF_DATE = sysdate,EMP_CODE__APRV = ? where tran_id = ?";
java.util.Date toDay = new java.util.Date();
java.sql.Timestamp tDay = null;
tDay = new java.sql.Timestamp(toDay.getTime());
sql = "update misc_vch_emp set CONFIRMED = ?,CONF_DATE = ?,EMP_CODE__APRV = ? where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,approverCode);
pstmt.setString(2,tranIds);
pstmt.setString(1,"Y");
pstmt.setTimestamp(2,tDay);
pstmt.setString(3,approverCode);
pstmt.setString(4,tranIds);
int rowcnt = pstmt.executeUpdate();
pstmt.close();
......@@ -259,7 +264,7 @@ private String generateMiscVoucher(String tranId, String xtraParams, String forc
if(miscVoucherTranID != null){
miscVoucherTranID.clear();
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat( genericUtility.getApplDateFormat());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat( GenericUtilityObj.getApplDateFormat());
effDate=simpleDateFormat.format(new java.util.Date()).toString();
crTerm = finCommon.getFinparams("999999", "DEF_CR_TERM", conn);
......@@ -577,8 +582,7 @@ private String generateAutoPayment(ArrayList<String> miscTranID,String payMode,S
System.out.println("payMode ---->>["+payMode+"]");
System.out.println("Misc.voucher Tranid List----->>["+miscTranID+"]");
ResultSet rs=null,rs1=null;
PreparedStatement pstmt=null,pstmt1=null;
GenericUtility GenericUtilityObj=GenericUtility.getInstance();
PreparedStatement pstmt=null,pstmt1=null;
String acctCodeBal="",cctrCodeBal="",acctCodeBc="",cctrCodeBc="",acctCodeCf="",cctrCodeCf="";
String sql="",sundryType="",sundryCode="",vouchNoFrom="",vouchNoTo="",entryBatchNo=" ",sql1="",
dueDateS="",errorString="",xmlString="",retString="",miscPayTranId="";
......
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