Commit fadb58ca authored by kdabholkar's avatar kdabholkar

New Changes Added regarding edit tax calculation window

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177918 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0de4e01f
...@@ -25,7 +25,9 @@ public interface SorderWizardEJBLocal extends ValidatorLocal ...@@ -25,7 +25,9 @@ public interface SorderWizardEJBLocal extends ValidatorLocal
public String ResetHeader(String data) throws ITMException ; public String ResetHeader(String data) throws ITMException ;
public String getSorderHeader(String saleOrder, String flag) throws ITMException; public String getSorderHeader(String saleOrder, String flag) throws ITMException;
public String getSorderDetail(String saleOrder,String flag) throws ITMException; public String getSorderDetail(String saleOrder,String flag) throws ITMException;
public String SaveSorderDetail(String str) throws ITMException; //Changed by Kaustubh on 2 jan 2018 start
public String SaveSorderDetail(String str,String xmlStringFile) throws ITMException;
//Changed by Kaustubh on 2 jan 2018 end
public String getSKUDetail(String itemParent,String itemDLVDate,String paraData,String details) throws ITMException ; public String getSKUDetail(String itemParent,String itemDLVDate,String paraData,String details) throws ITMException ;
//public String getSKUDetail(String itemParent,String itemDetails,String otherDetails) throws ITMException; //public String getSKUDetail(String itemParent,String itemDetails,String otherDetails) throws ITMException;
...@@ -45,4 +47,8 @@ public interface SorderWizardEJBLocal extends ValidatorLocal ...@@ -45,4 +47,8 @@ public interface SorderWizardEJBLocal extends ValidatorLocal
//Added By Kaustubh on 22 Dec 2017 Start //Added By Kaustubh on 22 Dec 2017 Start
public String getSchemeDetail(String xmlData, String formNo, UserInfoBean userInfo,String objName) throws RemoteException,ITMException; public String getSchemeDetail(String xmlData, String formNo, UserInfoBean userInfo,String objName) throws RemoteException,ITMException;
//Added By Kaustubh on 22 Dec 2017 end //Added By Kaustubh on 22 Dec 2017 end
//Added By Kaustubh on 6 Jan 2017 Start
public String getTaxXml(String empCode, String siteCode, String itemCode,String lineNo) throws RemoteException,ITMException;
//Added By Kaustubh on 6 Jan 2017 end
} }
...@@ -25,7 +25,7 @@ public interface SorderWizardEJBRemote extends ValidatorRemote ...@@ -25,7 +25,7 @@ public interface SorderWizardEJBRemote extends ValidatorRemote
public String ResetHeader(String data) throws ITMException; public String ResetHeader(String data) throws ITMException;
public String getSorderHeader(String saleOrder, String flag) throws ITMException; public String getSorderHeader(String saleOrder, String flag) throws ITMException;
public String getSorderDetail(String saleOrder,String flag) throws ITMException; public String getSorderDetail(String saleOrder,String flag) throws ITMException;
public String SaveSorderDetail(String str) throws ITMException; public String SaveSorderDetail(String str,String xmlStringFile) throws ITMException;
public String getSKUDetail(String itemParent,String itemDLVDate,String paraData,String details) throws ITMException; public String getSKUDetail(String itemParent,String itemDLVDate,String paraData,String details) throws ITMException;
//public String getSKUDetail(String itemParent,String itemDetails,String otherDetails) throws ITMException; //public String getSKUDetail(String itemParent,String itemDetails,String otherDetails) throws ITMException;
...@@ -45,5 +45,8 @@ public interface SorderWizardEJBRemote extends ValidatorRemote ...@@ -45,5 +45,8 @@ public interface SorderWizardEJBRemote extends ValidatorRemote
//Added By Kaustubh on 22 Dec 2017 Start //Added By Kaustubh on 22 Dec 2017 Start
public String getSchemeDetail(String xmlData, String formNo, UserInfoBean userInfo,String objName) throws RemoteException,ITMException; public String getSchemeDetail(String xmlData, String formNo, UserInfoBean userInfo,String objName) throws RemoteException,ITMException;
//Added By Kaustubh on 22 Dec 2017 end //Added By Kaustubh on 22 Dec 2017 end
//Added By Kaustubh on 6 Jan 2017 Start
public String getTaxXml(String empCode, String siteCode, String itemCode,String lineNo) throws RemoteException,ITMException;
//Added By Kaustubh on 6 Jan 2017 end
} }
...@@ -84,7 +84,9 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -84,7 +84,9 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
String siteCodeOrd = "",orderDate = "",itemSer = "",custCode = "",custCodeDlv = "",custCodeBil = "", dlvTerm = "", userId = "",remarks = "", String siteCodeOrd = "",orderDate = "",itemSer = "",custCode = "",custCodeDlv = "",custCodeBil = "", dlvTerm = "", userId = "",remarks = "",
crTerm = "",currCode = "",stanCode = "",tranCode = "",transMode = "",currCodeFrt = "",currCodeIns = "",orderType = "",random = "", crTerm = "",currCode = "",stanCode = "",tranCode = "",transMode = "",currCodeFrt = "",currCodeIns = "",orderType = "",random = "",
sql = "",priceList = "",priceListClg = ""; sql = "",priceList = "",priceListClg = "",
siteCode = "",empCodeOrdDet = "",tabNo="",taxXml="";
String lsCctrcodeSal = ""; String lsCctrcodeSal = "";
try try
...@@ -94,12 +96,14 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -94,12 +96,14 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
InitialContext ctx = new InitialContext(p); InitialContext ctx = new InitialContext(p);
dom = genericUtility.parseString(xmlstring); dom = genericUtility.parseString(xmlstring);
System.out.println("domXML"+genericUtility.serializeDom(dom));
currDate = getCurrdateAppFormat(); currDate = getCurrdateAppFormat();
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" ); userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
String addr1 = "",addr2 = "", addr3 = "",city = "",pin = "",stateCode = "",countCode = "",tel1Dlv = "",tel2Dlv = "",emailAddr = "",locGroup = "", String addr1 = "",addr2 = "", addr3 = "",city = "",pin = "",stateCode = "",countCode = "",tel1Dlv = "",tel2Dlv = "",emailAddr = "",locGroup = "",
custName = "",status = "",empCodeOrd = "",saleOrder = "",partQty = "",dueDate = "",acctCodeSal = "",cctrCodeSal = "",lcExchRate = ""; custName = "",status = "",empCodeOrd = "",saleOrder = "",partQty = "",dueDate = "",acctCodeSal = "",cctrCodeSal = "",lcExchRate = "",saleOrderTemp="";
Node detail1Node = dom.getElementsByTagName("Detail1").item(0); Node detail1Node = dom.getElementsByTagName("Detail1").item(0);
NodeList detail1List = detail1Node.getChildNodes(); NodeList detail1List = detail1Node.getChildNodes();
...@@ -107,7 +111,7 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -107,7 +111,7 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
System.out.println("Detail1 Length =========================================="+detail1ListLen); System.out.println("Detail1 Length =========================================="+detail1ListLen);
for(int ctr = 0 ;ctr < detail1ListLen; ctr++) for(int ctr = 0 ;ctr < detail1ListLen; ctr++)
{ {
Node childNode = detail1List.item(ctr); Node childNode = detail1List.item(ctr);
if(childNode == null || childNode.getNodeType() != childNode.ELEMENT_NODE) if(childNode == null || childNode.getNodeType() != childNode.ELEMENT_NODE)
{ {
continue; continue;
...@@ -251,6 +255,8 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -251,6 +255,8 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
} }
} }
System.out.println("siteCodeOrd"+siteCodeOrd+"empCodeOrd"+empCodeOrd);
lcExchRate = checkNullAndTrim(String.valueOf(finCommon.getDailyExchRateSellBuy(currCode, "", siteCodeOrd, orderDate, "S", conn))); lcExchRate = checkNullAndTrim(String.valueOf(finCommon.getDailyExchRateSellBuy(currCode, "", siteCodeOrd, orderDate, "S", conn)));
System.out.println("Sales Order Exchange Rate is=["+lcExchRate+"]"); System.out.println("Sales Order Exchange Rate is=["+lcExchRate+"]");
...@@ -275,6 +281,37 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -275,6 +281,37 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
}*/ }*/
//Changed by wasim on 09-DEC-2016 for account code sal [START] //Changed by wasim on 09-DEC-2016 for account code sal [START]
//Changed by Kaustubh on 08-JAN-2018 [START]
sql = " SELECT SALE_ORDER FROM SORDER_TEMP WHERE STATUS = ? AND EMP_CODE = ? AND SITE_CODE = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "A");
pstmt.setString(2, empCodeOrd);
pstmt.setString(3, siteCodeOrd);
rs = pstmt.executeQuery();
if(rs.next())
{
System.out.println("@@inside sale order query");
saleOrderTemp = checkNullAndTrim(rs.getString("SALE_ORDER"));
}
if(rs != null)
{
rs.close();rs = null;
}
if(pstmt != null)
{
pstmt.close();pstmt = null;
}
System.out.println("saleOrderTemp"+saleOrderTemp);
//Changed by Kaustubh on 08-JAN-2018 [End]
lsCctrcodeSal = finCommon.getAcctDetrTtype("", itemSer, "SAL", orderType, conn); lsCctrcodeSal = finCommon.getAcctDetrTtype("", itemSer, "SAL", orderType, conn);
System.out.println("lsCctrcodeSal in SorderWizPost Save["+lsCctrcodeSal+"]"); System.out.println("lsCctrcodeSal in SorderWizPost Save["+lsCctrcodeSal+"]");
String lsAcctcodeSalArr[] = lsCctrcodeSal.split(","); String lsAcctcodeSalArr[] = lsCctrcodeSal.split(",");
...@@ -468,7 +505,7 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -468,7 +505,7 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
//xmlStringHdr.append("</Detail1>"); //xmlStringHdr.append("</Detail1>");
StringBuffer xmlStringDet = new StringBuffer(); StringBuffer xmlStringDet = new StringBuffer();
String lineNoCntr = "",lineNoOrd = "",itemCode = "",taxChap = "",taxClass = "",taxEnv = "",empCodeAprv = "",unit = "",unitRate = "",itmFlag = "",itemDescr = "",dspDate = ""; String lineNoCntr = "",lineNoOrd = "",itemCode = "",taxChap = "",taxClass = "",taxEnv = "",empCodeAprv = "",unit = "",unitRate = "",itmFlag = "",itemDescr = "",dspDate = "",tabID = "";
int domID = 0; int domID = 0;
double quantity = 0,rate = 0,rateStd = 0,rateClg = 0, discount = 0; double quantity = 0,rate = 0,rateStd = 0,rateClg = 0, discount = 0;
...@@ -481,6 +518,11 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -481,6 +518,11 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
taxChap = "";taxClass = "";taxEnv ="";itmFlag = "";dspDate = "";itemSer = ""; taxChap = "";taxClass = "";taxEnv ="";itmFlag = "";dspDate = "";itemSer = "";
NodeList childNodeList = detail3NodeList.item(ctrH).getChildNodes(); NodeList childNodeList = detail3NodeList.item(ctrH).getChildNodes();
tabID = detail3NodeList.item(ctrH).getAttributes().getNamedItem("domID").getNodeValue();
System.out.println("tabID"+tabID);
int childNodeListlen = childNodeList.getLength(); int childNodeListlen = childNodeList.getLength();
for(int ctrD = 0; ctrD < childNodeListlen ; ctrD++) for(int ctrD = 0; ctrD < childNodeListlen ; ctrD++)
...@@ -558,9 +600,42 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -558,9 +600,42 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
{ {
itemSer = checkNullAndTrim(childNode.getFirstChild().getNodeValue()); itemSer = checkNullAndTrim(childNode.getFirstChild().getNodeValue());
} }
// Added by Kaustubh on 08-01-2018, [start]
// Added by Kaustubh on 08-01-2018, [end]
} }
domID++; domID++;
// Added by Kaustubh on 08-01-2018, [start]
sql = " select tax_xml from SORDDET_TEMP where item_code= ? and sale_order= ? and TAB_NO= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
pstmt.setString(2, saleOrderTemp);
pstmt.setString(3, tabID);
rs = pstmt.executeQuery();
if(rs.next())
{
System.out.println("@@inside xml query ");
taxXml = checkNullAndTrim(rs.getString("tax_xml"));
}
if(rs != null)
{
rs.close();rs = null;
}
if(pstmt != null)
{
pstmt.close();pstmt = null;
}
System.out.println("FinaltaxXml"+taxXml);
// Added by Kaustubh on 08-01-2018, [end]
xmlStringDet.append("<Detail2 dbID=':' domID='"+ domID +"' objName='sorder' objContext='2'>"); xmlStringDet.append("<Detail2 dbID=':' domID='"+ domID +"' objName='sorder' objContext='2'>");
xmlStringDet.append("<attribute pkNames='sale_order:line_no:' status='N' updateFlag='A' selected='N'/>"); xmlStringDet.append("<attribute pkNames='sale_order:line_no:' status='N' updateFlag='A' selected='N'/>");
...@@ -599,7 +674,7 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -599,7 +674,7 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
xmlStringDet.append("<conv__rtuom_stduom>").append("<![CDATA[" + 1 + "]]>").append("</conv__rtuom_stduom>"); xmlStringDet.append("<conv__rtuom_stduom>").append("<![CDATA[" + 1 + "]]>").append("</conv__rtuom_stduom>");
xmlStringDet.append("<dsp_date>").append("<![CDATA["+dspDate+"]]>").append("</dsp_date>"); xmlStringDet.append("<dsp_date>").append("<![CDATA["+dspDate+"]]>").append("</dsp_date>");
xmlStringDet.append("<cust_spec__no>").append("<![CDATA["+lineNoCntr+"]]>").append("</cust_spec__no>"); xmlStringDet.append("<cust_spec__no>").append("<![CDATA["+lineNoCntr+"]]>").append("</cust_spec__no>");
xmlStringDet.append(taxXml);
xmlStringDet.append("</Detail2>"); xmlStringDet.append("</Detail2>");
} }
...@@ -612,7 +687,7 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE ...@@ -612,7 +687,7 @@ public class SorderWizardPosEJB extends ValidatorEJB implements SorderWizardPosE
System.out.println("@@xmlString For generation Sale Order:: "+xmlString.toString()); System.out.println("@@xmlString For generation Sale Order:: "+xmlString.toString());
masterStatefulLocal = (MasterStatefulLocal)ctx.lookup("ibase/MasterStatefulEJB/local"); masterStatefulLocal = (MasterStatefulLocal)ctx.lookup("ibase/MasterStatefulEJB/local");
if(xtraParams == null) //if(xtraParams == null)
{ {
xtraParams = getXtraParams(userId,siteCodeOrd,userId,conn); xtraParams = getXtraParams(userId,siteCodeOrd,userId,conn);
} }
......
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