Commit 908889e7 authored by ssalve's avatar ssalve

Sarita: Done changes to resolve special character error in Purchase Order on 01 FEB 2019

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196555 ce508802-f39f-4f6c-b175-0d175dae99d5
parent faf1b176
......@@ -7604,7 +7604,8 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
System.out.println("[" + currentColumn + "] ==> '"
+ columnValue + "'");
if (currentColumn.trim().equals("itm_default")) {
valueXmlString
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString
.append("<purc_order>")
.append(checkNull(genericUtility.getColumnValue(
"purc_order", dom)))
......@@ -7621,8 +7622,26 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
valueXmlString.append("<req_date>").append(sysDate)
.append("</req_date>");
valueXmlString.append("<dlv_date>").append(sysDate)
.append("</dlv_date>");
.append("</dlv_date>");*/
valueXmlString
.append("<purc_order>")
.append("<![CDATA[" + checkNull(genericUtility.getColumnValue(
"purc_order", dom)) + "]]>")
.append("</purc_order>");
siteCodeDlv = checkNull(genericUtility.getColumnValue(
"site_code__dlv", dom1));
valueXmlString.append("<site_code protect='0'>")
.append("<![CDATA[" + siteCodeDlv + "]]>").append("</site_code>");
tranboqId = checkNull(genericUtility.getColumnValue(
"tran_id__boq", dom));
valueXmlString.append("<status_date>").append("<![CDATA[" + sysDate + "]]>")
.append("</status_date>");
valueXmlString.append("<req_date>").append("<![CDATA[" + sysDate + "]]>")
.append("</req_date>");
valueXmlString.append("<dlv_date>").append("<![CDATA[" + sysDate + "]]>")
.append("</dlv_date>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
sql = " Select case when eou is null then 'N' else eou end From site Where site_code = ?";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1, siteCodeDlv);
......@@ -7639,8 +7658,12 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
valueXmlString.append("<duty_paid>").append("N")
.append("</duty_paid>");
} else {
valueXmlString.append("<duty_paid>").append(lsnull)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<duty_paid>").append(lsnull)
.append("</duty_paid>");*/
valueXmlString.append("<duty_paid>").append("<![CDATA[" + lsnull + "]]>")
.append("</duty_paid>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
itemSer = checkNull(genericUtility.getColumnValue(
......@@ -7649,16 +7672,24 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
"sale_order", dom));
if (saleOrder.trim().length() > 0) {
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<line_no__sord protect = '0'>")
.append(lsnull).append("</line_no__sord>");*/
valueXmlString.append("<line_no__sord protect = '0'>")
.append(lsnull).append("</line_no__sord>");
.append("<![CDATA[" + lsnull + "]]>").append("</line_no__sord>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
lineNo = checkNull(genericUtility.getColumnValue("line_no",
dom));
if (lineNo != null && lineNo.trim().length() > 0) {
valueXmlString.append("<line_no>").append(lineNo)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<line_no>").append(lineNo)
.append("</line_no>");*/
valueXmlString.append("<line_no>").append("<![CDATA[" + lineNo + "]]>")
.append("</line_no>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
// valueXmlString.append("<site_code protect = '0'>").append("").append("</site_code>");
// valueXmlString.append("<ind_no protect = '0'>").append("").append("</ind_no>");
......@@ -7672,9 +7703,14 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
// valueXmlString.append("<ind_no protect='0'>").append("").append("</ind_no>");
} else {
if (indNo != null && indNo.trim().length() > 0) {
valueXmlString.append("<ind_no protect = '1'>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<ind_no protect = '1'>")
.append(getAbsString(indNo))
.append("</ind_no>");*/
valueXmlString.append("<ind_no protect = '1'>")
.append("<![CDATA[" + getAbsString(indNo) +"]]>")
.append("</ind_no>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
// valueXmlString.append("<ind_no protect='1'>").append("").append("</ind_no>");
setNodeValue(dom, "ind_no", getAbsString(indNo));
......@@ -7691,14 +7727,24 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
.append("").append("</ind_no>");
}
}
valueXmlString
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString
.append("<proj_code>")
.append(checkNull(genericUtility.getColumnValue(
"proj_code", dom1))).append("</proj_code>");
"proj_code", dom1))).append("</proj_code>");*/
valueXmlString
.append("<proj_code>")
.append("<![CDATA[" + checkNull(genericUtility.getColumnValue(
"proj_code", dom1)) + "]]>").append("</proj_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
exchRate = genericUtility.getColumnValue("exch_rate", dom1);
valueXmlString.append("<exch_rate>").append(exchRate)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<exch_rate>").append(exchRate)
.append("</exch_rate>");*/
valueXmlString.append("<exch_rate>").append("<![CDATA[" + exchRate +"]]>")
.append("</exch_rate>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
mval2 = checkNull(genericUtility.getColumnValue(
"supp_code", dom1));
......@@ -7733,23 +7779,43 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
invAcctPorcp = "N";
}
if ("Y".equalsIgnoreCase(invAcctPorcp)) {
valueXmlString
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString
.append("<acct_code__ap_adv protect='0'>")
.append(acctCodeApAdv)
.append("</acct_code__ap_adv>");
valueXmlString
.append("<cctr_code__ap_adv protect='0'>")
.append(cctrCodeApAdv)
.append("</cctr_code__ap_adv>");*/
valueXmlString
.append("<acct_code__ap_adv protect='0'>")
.append("<![CDATA[" + acctCodeApAdv + "]]>")
.append("</acct_code__ap_adv>");
valueXmlString
.append("<cctr_code__ap_adv protect='0'>")
.append("<![CDATA[" + cctrCodeApAdv + "]]>")
.append("</cctr_code__ap_adv>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
} else {
valueXmlString
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString
.append("<acct_code__ap_adv protect='1'>")
.append(acctCodeApAdv)
.append("</acct_code__ap_adv>");
valueXmlString
.append("<cctr_code__ap_adv protect='1'>")
.append(cctrCodeApAdv)
.append("</cctr_code__ap_adv>");*/
valueXmlString
.append("<acct_code__ap_adv protect='1'>")
.append("<![CDATA[" + acctCodeApAdv + "]]>")
.append("</acct_code__ap_adv>");
valueXmlString
.append("<cctr_code__ap_adv protect='1'>")
.append("<![CDATA[" + cctrCodeApAdv + "]]>")
.append("</cctr_code__ap_adv>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
mval = checkNull(genericUtility.getColumnValue("pord_type",
......@@ -7844,8 +7910,12 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
.append("").append("</item_code__mfg>");
codeDescr = "";
}
valueXmlString.append("<spl_instr>").append(codeDescr)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<spl_instr>").append(codeDescr)
.append("</spl_instr>");*/
valueXmlString.append("<spl_instr>").append("<![CDATA[" + codeDescr + "]]>")
.append("</spl_instr>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
mval = genericUtility.getColumnValue("order_type", dom);
sql = " Select PRE_ASSIGN_LOT,PRE_ASSIGN_EXP From pordertype Where order_type = ?";
......@@ -7902,10 +7972,16 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
* append("<cctr_code__ap_adv protect='0'>").append("").
* append("</cctr_code__ap_adv>");
*/
valueXmlString.append("<acct_code__ap_adv protect='0'>").append(acctCodeApAdv)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<acct_code__ap_adv protect='0'>").append(acctCodeApAdv)
.append("</acct_code__ap_adv>");
valueXmlString.append("<cctr_code__ap_adv protect='0'>").append(cctrCodeApAdv)
.append("</cctr_code__ap_adv>");*/
valueXmlString.append("<acct_code__ap_adv protect='0'>").append("<![CDATA[" + acctCodeApAdv + "]]>")
.append("</acct_code__ap_adv>");
valueXmlString.append("<cctr_code__ap_adv protect='0'>").append("<![CDATA[" + cctrCodeApAdv + "]]>")
.append("</cctr_code__ap_adv>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
//Modified by Rupesh [07/11/2017][Instructed by Piyush sir][End]
} else {
// Modified by Rupesh [07/11/2017][Instructed by Piyush sir][Start]
......@@ -7916,10 +7992,16 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
* append("<cctr_code__ap_adv protect='1'>").append("").
* append("</cctr_code__ap_adv>");
*/
valueXmlString.append("<acct_code__ap_adv protect='1'>").append(acctCodeApAdv)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<acct_code__ap_adv protect='1'>").append(acctCodeApAdv)
.append("</acct_code__ap_adv>");
valueXmlString.append("<cctr_code__ap_adv protect='1'>").append(cctrCodeApAdv)
.append("</cctr_code__ap_adv>");*/
valueXmlString.append("<acct_code__ap_adv protect='1'>").append("<![CDATA[" + acctCodeApAdv + "]]>")
.append("</acct_code__ap_adv>");
valueXmlString.append("<cctr_code__ap_adv protect='1'>").append("<![CDATA[" + cctrCodeApAdv + "]]>")
.append("</cctr_code__ap_adv>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
// Modified by Rupesh [07/11/2017][Instructed by Piyush sir][End]
}
}
......@@ -7981,7 +8063,8 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmt.close();
pStmt = null;
valueXmlString.append("<remarks>").append(indRemarks)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<remarks>").append(indRemarks)
.append("</remarks>");
valueXmlString.append("<item_code>").append(itemCode)
.append("</item_code>");
......@@ -8017,7 +8100,45 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
.append("</dept_code>");
valueXmlString.append("<anal_code>")
.append(getAbsString(analCode))
.append("</anal_code>");*/
valueXmlString.append("<remarks>").append("<![CDATA[" + indRemarks + "]]>")
.append("</remarks>");
valueXmlString.append("<item_code>").append("<![CDATA[" + itemCode + "]]>")
.append("</item_code>");
valueXmlString.append("<acct_code__dr>")
.append("<![CDATA[" + acctCode +"]]>").append("</acct_code__dr>");
valueXmlString.append("<cctr_code__dr>")
.append("<![CDATA[" + cctr_code + "]]>").append("</cctr_code__dr>");
valueXmlString.append("<site_code protect='0'>")
.append("<![CDATA[" + sitecodeDlv + "]]>").append("</site_code>");
valueXmlString.append("<special_instr>")
.append("<![CDATA[" + specialInstr + "]]>")
.append("</special_instr>");
valueXmlString.append("<specific_instr>")
.append("<![CDATA[" + specificInstr + "]]>")
.append("</specific_instr>");
valueXmlString.append("<pack_instr>").append("<![CDATA[" + packInstr + "]]>")
.append("</pack_instr>");
valueXmlString.append("<unit>").append("<![CDATA[" + uom + "]]>")
.append("</unit>");
valueXmlString.append("<unit__std>").append("<![CDATA[" + unitStd + "]]>")
.append("</unit__std>");
valueXmlString.append("<unit__rate>").append("<![CDATA[" + uom + "]]>")
.append("</unit__rate>");
valueXmlString.append("<conv__qty_stduom>")
.append("<![CDATA[" + convQtystd + "]]>")
.append("</conv__qty_stduom>");
valueXmlString.append("<emp_code__qcaprv>")
.append("<![CDATA[" + empCodeqcaprv + "]]>")
.append("</emp_code__qcaprv>");
valueXmlString.append("<work_order>").append("<![CDATA[" + workOrder + "]]>")
.append("</work_order>");
valueXmlString.append("<dept_code>").append("<![CDATA[" + deptCode + "]]>")
.append("</dept_code>");
valueXmlString.append("<anal_code>")
.append("<![CDATA[" + getAbsString(analCode) + "]]>")
.append("</anal_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
setNodeValue(dom, "anal_code", getAbsString(analCode));
reStr = itemChanged(dom, dom1, dom2, objContext,
......@@ -8055,8 +8176,12 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
.append("</proj_code>");
if (projCode != null && projCode.trim().length() > 0) {
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<proj_code protect = '1'>")
.append(projCode).append("</proj_code>");*/
valueXmlString.append("<proj_code protect = '1'>")
.append(projCode).append("</proj_code>");
.append("<![CDATA[" + projCode + "]]>").append("</proj_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
sql = " Select descr from item Where item_code = ?";
......@@ -8071,11 +8196,18 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmt.close();
pStmt = null;
valueXmlString.append("<item_code__mfg>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<item_code__mfg>")
.append(itemCode).append("</item_code__mfg>");
valueXmlString.append("<mfg_item_descr>")
.append(mfgitemDesc)
.append("</mfg_item_descr>");*/
valueXmlString.append("<item_code__mfg>")
.append("<![CDATA[" + itemCode + "]]>").append("</item_code__mfg>");
valueXmlString.append("<mfg_item_descr>")
.append("<![CDATA[" + mfgitemDesc + "]]>")
.append("</mfg_item_descr>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
// valueXmlString.append("<item_code__mfg protect = '1'>").append("").append("</item_code__mfg>");
......@@ -8112,13 +8244,20 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmtNew.close();
pStmtNew = null;
}
valueXmlString.append("<rate>").append(mrate)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<rate>").append(mrate)
.append("</rate>");
valueXmlString.append("<rate__clg>").append(mrate)
.append("</rate__clg>");
valueXmlString.append("<discount>")
.append(mdiscount).append("</discount>");
.append(mdiscount).append("</discount>");*/
valueXmlString.append("<rate>").append("<![CDATA[" + mrate + "]]>")
.append("</rate>");
valueXmlString.append("<rate__clg>").append("<![CDATA[" + mrate + "]]>")
.append("</rate__clg>");
valueXmlString.append("<discount>")
.append("<![CDATA[" + mdiscount + "]]>").append("</discount>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
} else {
sql = " Select rate__ref from supplieritem Where supp_code = ? and item_code = ?";
pStmt = conn.prepareStatement(sql);
......@@ -8160,14 +8299,24 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmt = null;
}
//Added by sarita on 15NOV2017 for open cursor issue[end]
valueXmlString.append("<rate>").append(mrate)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<rate>").append(mrate)
.append("</rate>");
valueXmlString.append("<rate__clg>").append(mrate)
.append("</rate__clg>");*/
valueXmlString.append("<rate>").append("<![CDATA[" + mrate + "]]>")
.append("</rate>");
valueXmlString.append("<rate__clg>").append("<![CDATA[" + mrate + "]]>")
.append("</rate__clg>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<quantity__stduom>")
.append(pendqty).append("</quantity__stduom>");*/
valueXmlString.append("<quantity__stduom>")
.append(pendqty).append("</quantity__stduom>");
.append("<![CDATA[" + pendqty + "]]>").append("</quantity__stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
if (mrate == null || mrate.trim().length() == 0) {
mrate = "0";
......@@ -8214,9 +8363,14 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
valueXmlString.append("<quantity>").append(pendqty)
.append("</quantity>");*/
if (pendqtyArr.size() > 1) {
valueXmlString.append("<quantity>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<quantity>")
.append(pendqtyArr.get(1))
.append("</quantity>");*/
valueXmlString.append("<quantity>")
.append("<![CDATA[" + pendqtyArr.get(1) + "]]>")
.append("</quantity>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
setNodeValue(dom, "quantity", getAbsString((String) pendqtyArr.get(1)));
} else {
valueXmlString.append("<quantity>").append("0")
......@@ -8225,8 +8379,12 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
}
} else {
valueXmlString.append("<quantity>").append(pendqty)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<quantity>").append(pendqty)
.append("</quantity>");*/
valueXmlString.append("<quantity>").append("<![CDATA[" + pendqty + "]]>")
.append("</quantity>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
setNodeValue(dom, "quantity", getAbsString(pendqty));
// Modified by Anjali R. on 15/10/2017 [To resolve the issue of item change reported from Pitambari.As instructed by Piyush sir][End]]
}
......@@ -8252,13 +8410,20 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
uom, itemCode, mrateDou, convQtystdDob,
conn);
}
valueXmlString.append("<conv__rtuom_stduom>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<conv__rtuom_stduom>")
.append(convQtystd)
.append("</conv__rtuom_stduom>");
valueXmlString.append("<rate__stduom>")
.append(ratestduom)
.append("</rate__stduom>");*/
valueXmlString.append("<conv__rtuom_stduom>")
.append("<![CDATA[" + convQtystd + "]]>")
.append("</conv__rtuom_stduom>");
valueXmlString.append("<rate__stduom>")
.append("<![CDATA[" + ratestduom + "]]>")
.append("</rate__stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
sql = " Select descr, loc_code, unit, unit__pur from item Where item_code = ?";
......@@ -8319,7 +8484,8 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
reqdate, genericUtility.getDBDateFormat(),
genericUtility.getApplDateFormat());
}
valueXmlString.append("<item_descr>").append(mdescr)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<item_descr>").append(mdescr)
.append("</item_descr>");
valueXmlString.append("<loc_code>").append(locCode)
.append("</loc_code>");
......@@ -8333,12 +8499,31 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
.append("</pack_instr>");
valueXmlString.append("<supp_code__mnfr>")
.append(suppcodeMnfr)
.append("</supp_code__mnfr>");*/
valueXmlString.append("<item_descr>").append("<![CDATA[" + mdescr + "]]>")
.append("</item_descr>");
valueXmlString.append("<loc_code>").append("<![CDATA[" + locCode + "]]>")
.append("</loc_code>");
valueXmlString.append("<req_date>").append("<![CDATA[" + reqdate + "]]>")
.append("</req_date>");
valueXmlString.append("<dlv_date>").append("<![CDATA[" + reqdate + "]]>")
.append("</dlv_date>");
valueXmlString.append("<pack_code>").append("<![CDATA[" + packCode + "]]>")
.append("</pack_code>");
valueXmlString.append("<pack_instr>").append("<![CDATA[" + packInstr + "]]>")
.append("</pack_instr>");
valueXmlString.append("<supp_code__mnfr>")
.append("<![CDATA[" + suppcodeMnfr + "]]>")
.append("</supp_code__mnfr>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
System.out.println("@@@@@@7001 itemCode[" + itemCode
+ "]");
valueXmlString.append("<item_code>").append(itemCode)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<item_code>").append(itemCode)
.append("</item_code>");*/
valueXmlString.append("<item_code>").append("<![CDATA[" + itemCode + "]]>")
.append("</item_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
setNodeValue(dom, "item_code", getAbsString(itemCode));
// Modified by Anjali R. on 15/10/2017 [To resolve the issue of item change reported from Pitambari as instructed by Piyush sir].Start
......@@ -8372,8 +8557,12 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
.append("</proj_code>");
}
if (sitecodeDlv == null || sitecodeDlv.trim().length() == 0) {
valueXmlString.append("<site_code>").append(siteCode)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<site_code>").append(siteCode)
.append("</site_code>");*/
valueXmlString.append("<site_code>").append("<![CDATA[" + siteCode + "]]>")
.append("</site_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
/*
......@@ -8419,25 +8608,39 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
System.out.println("@@@@@7062 budgetAmtanal["
+ budgetAmtanal + "]consumedAmtanal["
+ consumedAmtanal + "]");
valueXmlString.append("<budget_amt_anal>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<budget_amt_anal>")
.append(budgetAmtanal).append("</budget_amt_anal>");
valueXmlString.append("<consumed_amt_anal>")
.append(consumedAmtanal)
.append("</consumed_amt_anal>");*/
valueXmlString.append("<budget_amt_anal>")
.append("<![CDATA[" + budgetAmtanal + "]]>").append("</budget_amt_anal>");
valueXmlString.append("<consumed_amt_anal>")
.append("<![CDATA[" + consumedAmtanal + "]]>")
.append("</consumed_amt_anal>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
budgetAmtanal1 = Double.parseDouble(budgetAmtanal);
consumedAmtanal1 = Double.parseDouble(consumedAmtanal);
budgetAmt = budgetAmtanal1 - consumedAmtanal1;
valueXmlString.append("<budget_amt>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<budget_amt>")
.append(df.format(budgetAmt))
.append("</budget_amt>");*/
valueXmlString.append("<budget_amt>")
.append("<![CDATA[" + df.format(budgetAmt) + "]]>")
.append("</budget_amt>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
System.out
.println("@@@@@@@7083 itemCode[" + itemCode + "]");
valueXmlString.append("<item_code>").append(itemCode)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<item_code>").append(itemCode)
.append("</item_code>");*/
valueXmlString.append("<item_code>").append("<![CDATA[" + itemCode + "]]>")
.append("</item_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
if (currentColumn.trim().equals("line_no__sord")) {
mval = checkNull(genericUtility.getColumnValue(
......@@ -8446,9 +8649,12 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
"sale_order", dom));
// mval = Right(' '+ trim(mval),3) ;
valueXmlString.append("<line_no__sord>").append(mval)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<line_no__sord>").append(mval)
.append("</line_no__sord>");*/
valueXmlString.append("<line_no__sord>").append("<![CDATA[" + mval + "]]>")
.append("</line_no__sord>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
sql = "select item_code,quantity,unit from sorditem where sale_order = ? and line_no = ?";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1, mval1);
......@@ -8464,8 +8670,12 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
rs = null;
pStmt.close();
pStmt = null;
valueXmlString.append("<item_code>").append(saleItem)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<item_code>").append(saleItem)
.append("</item_code>");*/
valueXmlString.append("<item_code>").append("<![CDATA[" + saleItem + "]]>")
.append("</item_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
sql = "select descr,loc_code,item_ser from item where item_code = ? ";
pStmt = conn.prepareStatement(sql);
......@@ -8497,7 +8707,8 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmt = null;
System.out.println("@@@@@7241 saleQty[" + saleQty + "]");
valueXmlString.append("<item_descr>").append(itemDescr)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<item_descr>").append(itemDescr)
.append("</item_descr>");
valueXmlString.append("<req_date>").append(despDate)
.append("</req_date>");
......@@ -8517,13 +8728,40 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
.append("</unit__rate>");
valueXmlString.append("<conv__qty_stduom>").append("1")
.append("</conv__qty_stduom>");
valueXmlString.append("<conv__rtuom_stduom>").append("1")
.append("</conv__rtuom_stduom>");*/
valueXmlString.append("<item_descr>").append("<![CDATA[" + itemDescr + "]]>")
.append("</item_descr>");
valueXmlString.append("<req_date>").append("<![CDATA[" + despDate + "]]>")
.append("</req_date>");
valueXmlString.append("<dlv_date>").append("<![CDATA[" + despDate + "]]>")
.append("</dlv_date>");
valueXmlString.append("<loc_code>").append("<![CDATA[" + itemLoc + "]]>")
.append("</loc_code>");
valueXmlString.append("<quantity>").append("<![CDATA[" + saleQty + "]]>")
.append("</quantity>");
valueXmlString.append("<quantity__stduom>").append("<![CDATA[" + saleQty + "]]>")
.append("</quantity__stduom>");
valueXmlString.append("<unit>").append("<![CDATA[" + saleUnit + "]]>")
.append("</unit>");
valueXmlString.append("<unit__std>").append("<![CDATA[" + saleUnit + "]]>")
.append("</unit__std>");
valueXmlString.append("<unit__rate>").append("<![CDATA[" + saleUnit + "]]>")
.append("</unit__rate>");
valueXmlString.append("<conv__qty_stduom>").append("1")
.append("</conv__qty_stduom>");
valueXmlString.append("<conv__rtuom_stduom>").append("1")
.append("</conv__rtuom_stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
// gbf_itemchangeddet("item_code")
valueXmlString.append("<item_code>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<item_code>")
.append(getAbsString(saleItem))
.append("</item_code>");*/
valueXmlString.append("<item_code>")
.append("<![CDATA[" + getAbsString(saleItem) + "]]>")
.append("</item_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
setNodeValue(dom, "item_code", getAbsString(saleItem));
reStr = itemChanged(dom, dom1, dom2, objContext,
"item_code", editFlag, xtraParams);
......@@ -10157,14 +10395,22 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
rs = null;
pStmt.close();
pStmt = null;
valueXmlString.append("<last_purc_rate>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<last_purc_rate>")
.append(lastPurcRate).append("</last_purc_rate>");
valueXmlString.append("<last_purc_po>").append(lastPurcPo)
.append("</last_purc_po>");
valueXmlString.append("<item_code>").append(itemCode)
.append("</item_code>");
.append("</item_code>");*/
valueXmlString.append("<last_purc_rate>")
.append("<![CDATA[" + lastPurcRate + "]]>").append("</last_purc_rate>");
valueXmlString.append("<last_purc_po>").append("<![CDATA[" + lastPurcPo + "]]>")
.append("</last_purc_po>");
valueXmlString.append("<item_code>").append("<![CDATA[" + itemCode + "]]>")
.append("</item_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
if (currentColumn.trim().equals("cctr_code__dr")) {
costctr = checkNull(genericUtility.getColumnValue(
......@@ -10195,12 +10441,20 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmt = null;
if ( "Y".equalsIgnoreCase(qcReqd )) {
CctrLoccode = costctr.trim() + "Q";
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<loc_code>")
.append(CctrLoccode).append("</loc_code>");*/
valueXmlString.append("<loc_code>")
.append(CctrLoccode).append("</loc_code>");
.append("<![CDATA[" + CctrLoccode + "]]>").append("</loc_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
} else {
CctrLoccode = costctr.trim();
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<loc_code>")
.append(CctrLoccode).append("</loc_code>");*/
valueXmlString.append("<loc_code>")
.append(CctrLoccode).append("</loc_code>");
.append("<![CDATA[" + CctrLoccode + "]]>").append("</loc_code>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
valueXmlString.append("<loc_code protect='1'>")
.append("").append("</loc_code>");
......@@ -10229,13 +10483,23 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
}
if (currentColumn.trim().equals("cctr_code__dr")) {
valueXmlString.append("<cctr_code__prov_dr>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<cctr_code__prov_dr>")
.append(costctr)
.append("</cctr_code__prov_dr>");*/
valueXmlString.append("<cctr_code__prov_dr>")
.append("<![CDATA[" + costctr + "]]>")
.append("</cctr_code__prov_dr>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
} else {
valueXmlString.append("<cctr_code__prov_cr>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<cctr_code__prov_cr>")
.append(costctr)
.append("</cctr_code__prov_cr>");*/
valueXmlString.append("<cctr_code__prov_cr>")
.append("<![CDATA[" + costctr + "]]>")
.append("</cctr_code__prov_cr>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
/*
......@@ -10269,21 +10533,33 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
rs = null;
pStmt.close();
pStmt = null;
valueXmlString.append("<budget_amt_anal>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<budget_amt_anal>")
.append(df.format(budgetAmtanal))
.append("</budget_amt_anal>");
valueXmlString.append("<consumed_amt_anal>")
.append(df.format(consumedAmtanal))
.append("</consumed_amt_anal>");*/
valueXmlString.append("<budget_amt_anal>")
.append("<![CDATA[" + df.format(budgetAmtanal) + "]]>")
.append("</budget_amt_anal>");
valueXmlString.append("<consumed_amt_anal>")
.append("<![CDATA[" + df.format(consumedAmtanal) + "]]>")
.append("</consumed_amt_anal>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
budgetAmtanal1 = Double.parseDouble(budgetAmtanal);
consumedAmtanal1 = Double.parseDouble(consumedAmtanal);
budgetAmt = budgetAmtanal1 - consumedAmtanal1;
valueXmlString.append("<budget_amt>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<budget_amt>")
.append(df.format(budgetAmt))
.append("</budget_amt>");*/
valueXmlString.append("<budget_amt>")
.append("<![CDATA[" + df.format(budgetAmt) + "]]>")
.append("</budget_amt>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
......@@ -10363,9 +10639,14 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
itemCode, qtyLc,
Double.parseDouble(lcConv), conn);
}
valueXmlString.append("<unit__std>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<unit__std>")
.append(df.format(mVal1))
.append("</unit__std>");*/
valueXmlString.append("<unit__std>")
.append("<![CDATA[" + df.format(mVal1) + "]]>")
.append("</unit__std>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
} else {
if ( "O".equalsIgnoreCase(Value) || "B".equalsIgnoreCase(Value))
{
......@@ -10384,12 +10665,21 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
}
if (convTemp == 0) {
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<conv__qty_stduom>")
.append(lcConv).append("</conv__qty_stduom>");*/
valueXmlString.append("<conv__qty_stduom>")
.append(lcConv).append("</conv__qty_stduom>");
.append("<![CDATA[" + lcConv + "]]>").append("</conv__qty_stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
valueXmlString.append("<quantity__stduom>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<quantity__stduom>")
.append(qtystduomArr.get(1))
.append("</quantity__stduom>");*/
valueXmlString.append("<quantity__stduom>")
.append("<![CDATA[" + qtystduomArr.get(1) + "]]>")
.append("</quantity__stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
// gbf_isreasonrequired()
......@@ -10435,13 +10725,20 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
System.out.println("@@@@@@@@@@@8305 Ratelc["
+ Ratelc + " rate is set ] ");
valueXmlString.append("<rate>").append(Ratelc)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<rate>").append(Ratelc)
.append("</rate>");
valueXmlString.append("<rate__clg>").append(Ratelc)
.append("</rate__clg>");
valueXmlString.append("<unit__rate>").append(unit)
.append("</unit__rate>");*/
valueXmlString.append("<rate>").append("<![CDATA[" + Ratelc + "]]>")
.append("</rate>");
valueXmlString.append("<rate__clg>").append("<![CDATA[" + Ratelc + "]]>")
.append("</rate__clg>");
valueXmlString.append("<unit__rate>").append("<![CDATA[" + unit + "]]>")
.append("</unit__rate>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
mval1 = genericUtility.getColumnValue("unit__std",
dom);
lcConv = genericUtility.getColumnValue(
......@@ -10465,13 +10762,23 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
}
if (convTemp == 0) {
valueXmlString.append("<conv__rtuom_stduom>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<conv__rtuom_stduom>")
.append(lcConv)
.append("</conv__rtuom_stduom>");*/
valueXmlString.append("<conv__rtuom_stduom>")
.append("<![CDATA[" + lcConv + "]]>")
.append("</conv__rtuom_stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
valueXmlString.append("<rate__stduom>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<rate__stduom>")
.append(ratestduomArr.get(0))
.append("</rate__stduom>");*/
valueXmlString.append("<rate__stduom>")
.append("<![CDATA[" + ratestduomArr.get(0) + "]]>")
.append("</rate__stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
}
//Pavan R on 28aug18 [to set Tot_amt based on qty and rate][start]
......@@ -10526,10 +10833,16 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
* Double.parseDouble(stdRate == "" ? "0" : stdRate);
varie = (stdCode - Double.parseDouble(actualCost == "" ? "0" : actualCost));
valueXmlString.append("<std_cost>").append(stdCode)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<std_cost>").append(stdCode)
.append("</std_cost>");
valueXmlString.append("<varience>").append(varie)
.append("</varience>");*/
valueXmlString.append("<std_cost>").append("<![CDATA[" + stdCode + "]]>")
.append("</std_cost>");
valueXmlString.append("<varience>").append("<![CDATA[" + varie + "]]>")
.append("</varience>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
if (currentColumn.trim().equals("adj_variance")) {
......@@ -10592,12 +10905,20 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
&& ! unit.trim().equalsIgnoreCase(unitRate.trim())) {
qtystdlc = (amt / ratestdLc);
lcConvlc = qtystdLc / qtyLc;
valueXmlString.append("<conv__qty_stduom>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<conv__qty_stduom>")
.append(df.format(lcConvlc))
.append("</conv__qty_stduom>");
valueXmlString.append("<quantity__stduom>")
.append(df.format(qtystdlc))
.append("</quantity__stduom>");*/
valueXmlString.append("<conv__qty_stduom>")
.append("<![CDATA[" + df.format(lcConvlc) + "]]>")
.append("</conv__qty_stduom>");
valueXmlString.append("<quantity__stduom>")
.append("<![CDATA[" + df.format(qtystdlc) + "]]>")
.append("</quantity__stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
amtStd = qtystdLc
......@@ -10613,12 +10934,20 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
valueXmlString.append("<rate__stduom>")
.append(df.format(ratestd))
.append("</rate__stduom>");*/
valueXmlString.append("<conv__rtuom_stduom>")
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<conv__rtuom_stduom>")
.append(df.format(lcConvlc))
.append("</conv__rtuom_stduom>");
valueXmlString.append("<rate__stduom>")
.append(df.format(ratestdlc))
.append("</rate__stduom>");*/
valueXmlString.append("<conv__rtuom_stduom>")
.append("<![CDATA[" + df.format(lcConvlc) + "]]>")
.append("</conv__rtuom_stduom>");
valueXmlString.append("<rate__stduom>")
.append("<![CDATA[" + df.format(ratestdlc) + "]]>")
.append("</rate__stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
//Commented and Added by sarita on 01 OCT 2018 to change value of conv__rtuom_stduom & rate__stduom [END]
}
}
......@@ -10654,8 +10983,12 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
rs = null;
pStmt.close();
pStmt = null;
valueXmlString.append("<unit__std>").append(mVal1)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<unit__std>").append(mVal1)
.append("</unit__std>");*/
valueXmlString.append("<unit__std>").append("<![CDATA[" + mVal1 + "]]>")
.append("</unit__std>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
convQtystdDob = 0;
......@@ -10674,11 +11007,18 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
itemCode, qtyLc,
convQtystdDob, conn);
}
valueXmlString.append("<conv__qty_stduom>").append(lcConv)
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [START]
/*valueXmlString.append("<conv__qty_stduom>").append(lcConv)
.append("</conv__qty_stduom>");
valueXmlString.append("<quantity__stduom>")
.append(qtystduomArr.get(1))
.append("</quantity__stduom>");*/
valueXmlString.append("<conv__qty_stduom>").append("<![CDATA[" + lcConv + "]]>")
.append("</conv__qty_stduom>");
valueXmlString.append("<quantity__stduom>")
.append("<![CDATA[" + qtystduomArr.get(1) + "]]>")
.append("</quantity__stduom>");
//Commented and Added by sarita to add CDATA on 01 FEBRUARY 2019 [END]
}
if (currentColumn.trim().equals("conv__qty_stduom")) {
......
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