Commit 242aee73 authored by msalla's avatar msalla

1. In purchase order amendment the debit acct is picking up from...

1. In purchase order amendment the debit acct is picking up from item_acct_detr for tran_type blank but it should pick up as per the tran type PO.
2. Also, the system is allowing to add the same debit and credit account code. The credit account code should be the payable account of the party.
and it should be auto set like PO. Requesting you to please add the validation like PO

3. On PO amendment confirmation system should pick acct_code__ap_adv and cctr_code__ap_adv as per new logic incorporated like PO

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@201044 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 81b5d71a
...@@ -7,6 +7,7 @@ import java.rmi.RemoteException; ...@@ -7,6 +7,7 @@ import java.rmi.RemoteException;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.*; import ibase.webitm.ejb.*;
import ibase.webitm.ejb.fin.FinCommon;
//import ibase.webitm.ejb.dis_exp.PurcOrderAmdTWFInvokeConfirm; //import ibase.webitm.ejb.dis_exp.PurcOrderAmdTWFInvokeConfirm;
import ibase.webitm.ejb.sys.CreateRCPXML; import ibase.webitm.ejb.sys.CreateRCPXML;
import org.w3c.dom.*; import org.w3c.dom.*;
...@@ -28,11 +29,12 @@ import java.util.Date; ...@@ -28,11 +29,12 @@ import java.util.Date;
public class POrderAmdConf extends ActionHandlerEJB implements POrderAmdConfLocal, POrderAmdConfRemote public class POrderAmdConf extends ActionHandlerEJB implements POrderAmdConfLocal, POrderAmdConfRemote
{ {
E12GenericUtility genericUtility= new E12GenericUtility(); E12GenericUtility genericUtility= new E12GenericUtility();
FinCommon finCommon = new FinCommon();
DistCommon distCommon = new DistCommon();
public String actionHandler() throws RemoteException, ITMException public String actionHandler() throws RemoteException, ITMException
{ {
return ""; return "";
} }
public String actionHandler(String actionType, String xmlString, String objContext, String xtraParams) throws RemoteException, ITMException public String actionHandler(String actionType, String xmlString, String objContext, String xtraParams) throws RemoteException, ITMException
{ {
System.out.println("item actionHandler(...) called............"); System.out.println("item actionHandler(...) called............");
...@@ -49,6 +51,7 @@ public class POrderAmdConf extends ActionHandlerEJB implements POrderAmdConfLoca ...@@ -49,6 +51,7 @@ public class POrderAmdConf extends ActionHandlerEJB implements POrderAmdConfLoca
System.out.println("POrderAmdConf confirm called.............."); System.out.println("POrderAmdConf confirm called..............");
String confirmed = ""; String confirmed = "";
String sql = ""; String sql = "";
// String sql1 = ""; // String sql1 = "";
// int status = 0; // int status = 0;
// double frtAmt = 0.0; // double frtAmt = 0.0;
...@@ -439,6 +442,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -439,6 +442,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
// String loginEmpCode = "", ediOption = "", dataStr = ""; // String loginEmpCode = "", ediOption = "", dataStr = "";
// double pohdrTot = 0, vouchAdv = 0, amdDetTot = 0, poDetTot = 0, // double pohdrTot = 0, vouchAdv = 0, amdDetTot = 0, poDetTot = 0,
// poHdrTot = 0; // poHdrTot = 0;
String errString="";
Timestamp sysDate = null, taxDate = null, refDate = null, amdDate = null; Timestamp sysDate = null, taxDate = null, refDate = null, amdDate = null;
String siteCodeDlv = "", siteCodeOrd = "", siteCodeBill = "", deptCode = "", empCode = "", itemSer = "", taxOpt = "", crTerm = ""; String siteCodeDlv = "", siteCodeOrd = "", siteCodeBill = "", deptCode = "", empCode = "", itemSer = "", taxOpt = "", crTerm = "";
String currCode = "", taxChapHdr = "", taxClassHdr = "", taxEnvHdr = "", remarks = "", projCode = "",projCodeDet="", salesPers = "", commPerc = "", commPercOn = ""; String currCode = "", taxChapHdr = "", taxClassHdr = "", taxEnvHdr = "", remarks = "", projCode = "",projCodeDet="", salesPers = "", commPerc = "", commPercOn = "";
...@@ -800,6 +804,54 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -800,6 +804,54 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
* VALLABH select Advance account code CCTR code from header * VALLABH select Advance account code CCTR code from header
* supp_code VALLABH KADAM 19/NOV/14 END * supp_code VALLABH KADAM 19/NOV/14 END
*/ */
//commented by-Monika-20-May-2019
/* sql = "select ACCT_CODE__AP_ADV,CCTR_CODE__AP_ADV from supplier where supp_code=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, suppCode);
rs = pstmt.executeQuery();
if (rs.next())
{
acctCodeApAdv = rs.getString("ACCT_CODE__AP_ADV");
cctrCodeApAdv = rs.getString("CCTR_CODE__AP_ADV");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
*/
//changes by monika-20-may-2019
//purchaseorder and sitecode
cctrCodeApAdv=finCommon.getAcctDetrTtype("", itemSer, "APADV", pordType, siteCodeOrd, conn);
// gbf_acct_detr_ttype("",ls_itemser,'PO', ls_type);
System.out.println("tuesdayconf:"+type);
acctCodeApAdv = distCommon.getToken(cctrCodeApAdv, ",");
//changes by monika-22-may-2019
if (cctrCodeApAdv != null
&& cctrCodeApAdv.trim().length() > 0) {
String ls_cctr_drArray[] = cctrCodeApAdv
.split(",");
System.out
.println("@@@@@ ls_cctr_drArray.length["
+ ls_cctr_drArray.length + "]");
if (ls_cctr_drArray.length > 0) {
acctCodeApAdv = ls_cctr_drArray[0];
}
if (ls_cctr_drArray.length > 1) {
acctCodeApAdv = ls_cctr_drArray[0];
cctrCodeApAdv = ls_cctr_drArray[1];
}
}
//end
//changes by monika-22-may-2019
if((acctCodeApAdv ==null || acctCodeApAdv.trim().length() == 0)) {
sql = "select ACCT_CODE__AP_ADV,CCTR_CODE__AP_ADV from supplier where supp_code=?"; sql = "select ACCT_CODE__AP_ADV,CCTR_CODE__AP_ADV from supplier where supp_code=?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, suppCode); pstmt.setString(1, suppCode);
...@@ -814,6 +866,15 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -814,6 +866,15 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
}
if(acctCodeApAdv == null )
{
errString= itmDBAccessLocal.getErrorString("", "VTSUPPAC", "","",conn);
return errString;
}
//end
/** /**
* VALLABH select Advance account code CCTR code from header * VALLABH select Advance account code CCTR code from header
* supp_code VALLABH KADAM 19/NOV/14 END * supp_code VALLABH KADAM 19/NOV/14 END
...@@ -2908,7 +2969,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -2908,7 +2969,7 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
if (errCode == null || errCode.trim().length() == 0) if (errCode == null || errCode.trim().length() == 0)
{ {
sql = " select sum(case when net_amt is null then 0 else net_amt end) from voucher where purc_order = ? " sql = "select sum(case when net_amt is null then 0 else net_amt end) from voucher where purc_order = ? "
+ " and vouch_type = ? and confirmed = ? "; + " and vouch_type = ? and confirmed = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder); pstmt.setString(1, purcOrder);
......
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