Commit f39fd87b authored by arawankar's avatar arawankar

HRVoucherReversal.java

-Added line_no in string data type to insert into payr_vouchdet table

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@195441 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d0db8273
...@@ -7,6 +7,8 @@ import java.sql.ResultSet; ...@@ -7,6 +7,8 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Calendar; import java.util.Calendar;
import ibase.utility.CommonConstants; import ibase.utility.CommonConstants;
...@@ -16,6 +18,7 @@ import ibase.webitm.ejb.adm.adv.PayrollVoucherConf; ...@@ -16,6 +18,7 @@ import ibase.webitm.ejb.adm.adv.PayrollVoucherConf;
import ibase.webitm.ejb.fin.FinCommon; import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.TransIDGenerator; import ibase.webitm.utility.TransIDGenerator;
import ibase.webitm.ejb.ValidatorEJB;
/**** This component is for generate reversal payroll voucher*****/ /**** This component is for generate reversal payroll voucher*****/
...@@ -80,7 +83,11 @@ public class HRVoucherReversal ...@@ -80,7 +83,11 @@ public class HRVoucherReversal
//Timestamp chgDate = null; //Timestamp chgDate = null;
Timestamp revTranDate = null; // Modified by Piyush on 15/09/2018 Timestamp revTranDate = null; // Modified by Piyush on 15/09/2018
int lineNo = 0; //Modified by Anjali R. on [08/01/2019][Start]
//int lineNo = 0;
String lineNo = "";
//Modified by Anjali R. on [08/01/2019][End]
String acctCode = ""; String acctCode = "";
String cctrCode = ""; String cctrCode = "";
double amountDet = 0.0; double amountDet = 0.0;
...@@ -104,6 +111,11 @@ public class HRVoucherReversal ...@@ -104,6 +111,11 @@ public class HRVoucherReversal
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
String sysDateStr = sdf.format(currentDate.getTime()); String sysDateStr = sdf.format(currentDate.getTime());
//Modified by Anjali R. on [31/12/2018][Start]
long millis = System.currentTimeMillis();
java.sql.Date todaysDate= new java.sql.Date(millis);
//Modified by Anjali R. on [31/12/2018][End]
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"); chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId");
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"); chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
System.out.println("CHG_term :- ["+chgTerm+"]"); System.out.println("CHG_term :- ["+chgTerm+"]");
...@@ -309,7 +321,12 @@ public class HRVoucherReversal ...@@ -309,7 +321,12 @@ public class HRVoucherReversal
pstmt.setString(6, refId); pstmt.setString(6, refId);
// Modified by Piyush on 15/09/2018 // Modified by Piyush on 15/09/2018
// pstmt.setTimestamp(7, chgDate); // pstmt.setTimestamp(7, chgDate);
pstmt.setTimestamp(7, new java.sql.Timestamp(System.currentTimeMillis()));
//Modified by Anjali R. on [31/12/2018][To update ref_date without time part][Start]
//pstmt.setTimestamp(7, new java.sql.Timestamp(System.currentTimeMillis()));
pstmt.setDate(7, todaysDate);
//Modified by Anjali R. on [31/12/2018][To update ref_date without time part][End]
pstmt.setString(8, bankCode); pstmt.setString(8, bankCode);
pstmt.setString(9, autoPay); pstmt.setString(9, autoPay);
pstmt.setString(10, payMode); pstmt.setString(10, payMode);
...@@ -346,7 +363,10 @@ public class HRVoucherReversal ...@@ -346,7 +363,10 @@ public class HRVoucherReversal
while(rs.next()) while(rs.next())
{ {
lineNo=rs.getInt("LINE_NO"); //Modified by Anjali R. on [08/01/2019][Need to get line_no value in string][Start]
//lineNo=rs.getInt("LINE_NO");
lineNo=rs.getString("LINE_NO");
//Modified by Anjali R. on [08/01/2019][Need to get line_no value in string][End]
acctCode=checkNull(rs.getString("ACCT_CODE")); acctCode=checkNull(rs.getString("ACCT_CODE"));
cctrCode=checkNull(rs.getString("CCTR_CODE")); cctrCode=checkNull(rs.getString("CCTR_CODE"));
amountDet=rs.getDouble("AMOUNT"); amountDet=rs.getDouble("AMOUNT");
...@@ -358,7 +378,10 @@ public class HRVoucherReversal ...@@ -358,7 +378,10 @@ public class HRVoucherReversal
+" VALUES (?, ?, ?, ?, ?, ?)"; +" VALUES (?, ?, ?, ?, ?, ?)";
pstmt1 = conn.prepareStatement(sql1); pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, reversalVoucherTranId); pstmt1.setString(1, reversalVoucherTranId);
pstmt1.setInt(2, lineNo); //Modified by Anjali R. on [08/01/2019][Need to set line_no value in string][Start]
//pstmt1.setInt(2, lineNo);
pstmt1.setString(2, lineNo);
//Modified by Anjali R. on [08/01/2019][Need to set line_no value in string][End]
pstmt1.setString(3, acctCode); pstmt1.setString(3, acctCode);
pstmt1.setString(4, cctrCode); pstmt1.setString(4, cctrCode);
pstmt1.setDouble(5, amountDet*-1); pstmt1.setDouble(5, amountDet*-1);
......
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