Commit cf24cad5 authored by msalla's avatar msalla

Disputed receivables - new column adjust_due_date to be added and accordingly...

Disputed receivables - new column adjust_due_date to be added  and accordingly update the due_date with EXP_RCP_DATE

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@201924 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 24f89c33
This diff is collapsed.
package ibase.webitm.ejb.fin;
import java.rmi.RemoteException;
import javax.ejb.Local;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
@Local
public interface DisputedRecvICLocal extends ValidatorLocal {
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1, Document dom2,String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.fin;
import java.rmi.RemoteException;
import javax.ejb.Remote;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException;
@Remote
public interface DisputedRecvICRemote extends ValidatorRemote
{
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1, Document dom2,String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
}
...@@ -141,7 +141,8 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -141,7 +141,8 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
Timestamp expRcpDate = null; Timestamp expRcpDate = null;
HashMap disputedRecvMap = null; HashMap disputedRecvMap = null;
ArrayList DetList = null; ArrayList DetList = null;
String adjduedate="null";
int cnt;
try { try {
if (conn==null) if (conn==null)
...@@ -214,6 +215,7 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -214,6 +215,7 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(ledgPostConf != null && "Y".equalsIgnoreCase(ledgPostConf)) if(ledgPostConf != null && "Y".equalsIgnoreCase(ledgPostConf))
{ {
/*if((tranDate.compareTo(today)!= 0)) /*if((tranDate.compareTo(today)!= 0))
...@@ -224,15 +226,15 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -224,15 +226,15 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
pstmt1 = conn.prepareStatement(sql1); pstmt1 = conn.prepareStatement(sql1);
pstmt1.setTimestamp(1, tranDate); pstmt1.setTimestamp(1, tranDate);
pstmt1.setString(2, tranId); pstmt1.setString(2, tranId);
int cnt = pstmt1.executeUpdate(); cnt = pstmt1.executeUpdate();
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
//} //}
//disputedRecvMap.put("tran_date", tranDate); //disputedRecvMap.put("tran_date", tranDate);
} }
//commented by monika
//Get Data from disputed_recv_det and receivables //Get Data from disputed_recv_det and receivables
sql = "SELECT disputed_recv_det.tran_id, disputed_recv_det.line_no, disputed_recv_det.ref_ser, "+ /* sql = "SELECT disputed_recv_det.tran_id, disputed_recv_det.line_no, disputed_recv_det.ref_ser, "+
" disputed_recv_det.ref_id, disputed_recv_det.dispute_amt, receivables.ref_date, "+ " disputed_recv_det.ref_id, disputed_recv_det.dispute_amt, receivables.ref_date, "+
" receivables.due_date, receivables.curr_code, receivables.exch_rate, receivables.cctr_code, "+ " receivables.due_date, receivables.curr_code, receivables.exch_rate, receivables.cctr_code, "+
" receivables.acct_code, disputed_recv_det.ref_type, disputed_recv_det.ref_type__o, disputed_recv_det.exp_rcp_date, disputed_recv_det.reas_code "+ " receivables.acct_code, disputed_recv_det.ref_type, disputed_recv_det.ref_type__o, disputed_recv_det.exp_rcp_date, disputed_recv_det.reas_code "+
...@@ -240,7 +242,18 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -240,7 +242,18 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
" WHERE ( disputed_recv_det.ref_ser = receivables.tran_ser ) " + " WHERE ( disputed_recv_det.ref_ser = receivables.tran_ser ) " +
" and ( disputed_recv_det.ref_id = receivables.ref_no ) " + " and ( disputed_recv_det.ref_id = receivables.ref_no ) " +
" and ( ( DISPUTED_RECV_DET.TRAN_ID = ? ) ) " + " and ( ( DISPUTED_RECV_DET.TRAN_ID = ? ) ) " +
" ORDER BY disputed_recv_det.line_no ASC "; " ORDER BY disputed_recv_det.line_no ASC "; */
//added by monika-7 june -2019
sql = "SELECT disputed_recv_det.tran_id, disputed_recv_det.line_no, disputed_recv_det.ref_ser, "+
" disputed_recv_det.ref_id, disputed_recv_det.dispute_amt, receivables.ref_date, "+
" receivables.due_date, receivables.curr_code, receivables.exch_rate, receivables.cctr_code, "+
" receivables.acct_code, disputed_recv_det.ref_type, disputed_recv_det.ref_type__o, disputed_recv_det.exp_rcp_date, disputed_recv_det.reas_code,disputed_recv_det.ADJUST_DUE_DATE "+
" FROM disputed_recv_det, receivables "+
" WHERE ( disputed_recv_det.ref_ser = receivables.tran_ser ) " +
" and ( disputed_recv_det.ref_id = receivables.ref_no ) " +
" and ( ( DISPUTED_RECV_DET.TRAN_ID = ? ) ) " +
" ORDER BY disputed_recv_det.line_no ASC ";
//end
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId); pstmt.setString(1,tranId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -264,8 +277,10 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -264,8 +277,10 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
refType = rs.getString(12); refType = rs.getString(12);
refTypeO = rs.getString(13); refTypeO = rs.getString(13);
expRcpDate = rs.getTimestamp(14); expRcpDate = rs.getTimestamp(14);
reasCode = rs.getString(15); reasCode = rs.getString(15);
//added by monika-7 june -2019
adjduedate = rs.getString(16);
//end
if(recType != null && "R".equalsIgnoreCase(recType)) if(recType != null && "R".equalsIgnoreCase(recType))
{ {
sql1 = "select tot_amt, adj_amt, dispute_amt from receivables " + sql1 = "select tot_amt, adj_amt, dispute_amt from receivables " +
...@@ -303,11 +318,12 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -303,11 +318,12 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
pstmt1.setString(2, recType);//refType pstmt1.setString(2, recType);//refType
pstmt1.setString(3, refSer); pstmt1.setString(3, refSer);
pstmt1.setString(4, refId); pstmt1.setString(4, refId);
int cnt = pstmt1.executeUpdate(); cnt = pstmt1.executeUpdate();
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
System.out.println("update receivables dispute_amt & ref_type cnt["+cnt+"]"); System.out.println("update receivables dispute_amt & ref_type cnt["+cnt+"]");
} }
//Pavan R on 09APR2018 Start[To release the hold receivables] //Pavan R on 09APR2018 Start[To release the hold receivables]
else if(recType != null && "O".equalsIgnoreCase(recType)) else if(recType != null && "O".equalsIgnoreCase(recType))
{ {
...@@ -347,12 +363,13 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -347,12 +363,13 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
pstmt1.setString(2, "F");//refType pstmt1.setString(2, "F");//refType
pstmt1.setString(3, refSer); pstmt1.setString(3, refSer);
pstmt1.setString(4, refId); pstmt1.setString(4, refId);
int cnt = pstmt1.executeUpdate(); cnt = pstmt1.executeUpdate();
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
System.out.println("update receivables dispute_amt & ref_type cnt["+cnt+"]"); System.out.println("update receivables dispute_amt & ref_type cnt["+cnt+"]");
//Pavan R on 09APR2018 End //Pavan R on 09APR2018 End
}else }
else
{ {
sql1 = "update receivables set exp_rcp_date = ?, reas_code = ?, ref_type = ? " + sql1 = "update receivables set exp_rcp_date = ?, reas_code = ?, ref_type = ? " +
" where tran_ser = ? and ref_no = ?"; " where tran_ser = ? and ref_no = ?";
...@@ -362,17 +379,31 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -362,17 +379,31 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
pstmt1.setString(3, recType); pstmt1.setString(3, recType);
pstmt1.setString(4, refSer); pstmt1.setString(4, refSer);
pstmt1.setString(5, refId); pstmt1.setString(5, refId);
int cnt = pstmt1.executeUpdate(); cnt = pstmt1.executeUpdate();
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
System.out.println("update receivables exp_rcp_date & reas_code cnt["+cnt+"]"); System.out.println("update receivables exp_rcp_date & reas_code cnt["+cnt+"]");
}
//changes made-update receivables- by monika-7 june-2019
if("Y".equalsIgnoreCase(adjduedate))
{
sql="update receivables set due_date=? where tran_ser = ? and ref_no = ?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setTimestamp(1,expRcpDate);
pstmt1.setString(2, refSer);
pstmt1.setString(3, refId);
cnt=pstmt1.executeUpdate();
pstmt1.close();
pstmt1 = null;
System.out.println("excprecpt11--monika updated");
} //end
}
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("Detail data count["+updCount+"]");
loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode"); loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"); chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
...@@ -381,7 +412,7 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute ...@@ -381,7 +412,7 @@ public class DisputedReceivablesConf extends ActionHandlerEJB implements Dispute
if(errString == null || errString.trim().length() == 0) if(errString == null || errString.trim().length() == 0)
{ {
System.out.println("loginEmpCode---"+loginEmpCode); System.out.println("loginEmpCode---"+loginEmpCode);
sql = " update disputed_recv set confirmed = 'Y', confirmed_date = ?, emp_code__aprv = ? where tran_id = ? "; sql = " update disputed_recv set confirmed = 'Y', confirmed_date = ?, emp_code__aprv = ? where tran_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, today); pstmt.setTimestamp(1, today);
pstmt.setString(2, loginEmpCode); pstmt.setString(2, loginEmpCode);
......
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