Commit b808322c authored by vvengurlekar's avatar vvengurlekar

PorderAct.java - In purchase order after selecting the indent as a reference...

PorderAct.java - In purchase order after selecting the indent as a reference document system is updating Tax class in Tax Chapter field.

POrderIC.java - System should select Tax Class, Tax Chapter & Tax environment automatically after selection of the indent & Supplier.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@185400 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 877a8f0d
......@@ -9676,14 +9676,24 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
|| ls_taxclasshdr.trim().length() == 0) {
// dw_detedit[ii_currformno].setitem(1, "tax_class",
// gf_get_taxclass('S',ls_suppcode,ls_itemCode,ls_sitecode))
valueXmlString
//Commented and added by Varsha v on 24-05-18 to resolve wrong tax_class setting issue
/*valueXmlString
.append("<tax_chap>")
.append("<![CDATA["
+ checkNull(distComm.getTaxClass(
"S", ls_suppcode,
ls_itemCode, ls_sitecode,
conn)) + "]]>")
.append("</tax_chap>");
.append("</tax_chap>");*/
valueXmlString
.append("<tax_class>")
.append("<![CDATA["
+ checkNull(distComm.getTaxClass(
"S", ls_suppcode,
ls_itemCode, ls_sitecode,
conn)) + "]]>")
.append("</tax_class>");
//ended by Varsha v on 24-05-18 to resolve wrong tax_class setting issue
} else {
// dw_detedit[ii_currformno].setitem(1,
// "tax_class",ls_taxclasshdr)
......
......@@ -15,6 +15,7 @@ import javax.ejb.*;
import java.text.SimpleDateFormat;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import ibase.webitm.ejb.dis.DistCommon;
import ibase.utility.E12GenericUtility;
import ibase.utility.CommonConstants;
import ibase.system.config.*;
......@@ -654,6 +655,8 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB();
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
//added by Varsha V on 24-05-18
DistCommon distComm = new DistCommon();
try
{
//Changes and Commented By Bhushan on 09-06-2016 :START
......@@ -799,6 +802,48 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
valueXmlString.append("<acct_code__cr isSrvCallOnChg='0'>").append(acctDetrList.get(0)).append("</acct_code__cr>");
valueXmlString.append("<cctr_code__cr isSrvCallOnChg='0'>").append(acctDetrList.get(1)).append("</cctr_code__cr>");
//Added by Varsha V on 24-05-18 to set tax_class , tax_chapter and tax_env
taxClassHdr = new ibase.utility.E12GenericUtility().getColumnValueFromNode("tax_class",dom1);
taxChapHdr = new ibase.utility.E12GenericUtility().getColumnValueFromNode("tax_chap",dom1);
taxEnvHdr = new ibase.utility.E12GenericUtility().getColumnValueFromNode("tax_env",dom1);
//tax_class
if ((taxClassHdr == null || taxClassHdr.trim().length() == 0))
{
taxClass = distComm.getTaxClass("S",suppCode,itemCode,siteCode,conn);
valueXmlString.append("<tax_class>").append((taxClass == null) ? "":taxClass).append("</tax_class>");
}
else
{
valueXmlString.append("<tax_class>").append(taxClassHdr).append("</tax_class>");
}
//tax_chap
taxChap = distComm.getTaxChap(itemCode,itemSer,"S",suppCode,siteCode,conn);
valueXmlString.append("<tax_chap>").append((taxChap == null) ? "":taxChap).append("</tax_chap>");
//tax_env
if ((taxEnvHdr == null || taxEnvHdr.trim().length() == 0))
{
stationFr = new ibase.utility.E12GenericUtility().getColumnValue("station_stan_code",dom1);
sql = "SELECT STAN_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'";
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
if (rs.next())
{
stationTo = rs.getString(1); System.out.println("stationTo :["+stationTo+"]");
}
rs.close();
rs = null;
stmt.close();
stmt = null;
taxEnv = distComm.getTaxEnv(stationFr,stationTo,taxChap,taxClass,siteCode,conn);
valueXmlString.append("<tax_env>").append((taxEnv == null) ? "":taxEnv).append("</tax_env>");
}
else
{
valueXmlString.append("<tax_env>").append(taxEnvHdr).append("</tax_env>");
}
//Ended by Varsha V on 24-05-18 to set tax_class , tax_chapter and tax_env
/* // 27/04/2012 Neelam salulnkhe commented as same is set from pb component
taxClassHdr = new ibase.utility.E12GenericUtility().getColumnValueFromNode("tax_class",dom1);
taxChapHdr = new ibase.utility.E12GenericUtility().getColumnValueFromNode("tax_chap",dom1);
......
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