Commit d327bc3b authored by msingh's avatar msingh

Changed by Manish on 12/10/16


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103652 ce508802-f39f-4f6c-b175-0d175dae99d5
parent dacafa62
...@@ -3051,8 +3051,11 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -3051,8 +3051,11 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
}else//Added by chandrashekar on 10-aug-2016 }else//Added by chandrashekar on 10-aug-2016
{ {
errCode=gfCheckTaxenvStatus(taxEnv,orderDate,conn); errCode=gfCheckTaxenvStatus(taxEnv,orderDate,conn);
errList.add(errCode); if(errCode != null && errCode.trim().length()>0)
errFields.add(childNodeName.toLowerCase()); {
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
} }
} }
...@@ -3741,7 +3744,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -3741,7 +3744,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
errorCode="VTTAXENVCL"; errorCode="VTTAXENVCL";
} }
} catch (SQLException e) }
catch (SQLException e)
{ {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
...@@ -7636,7 +7640,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -7636,7 +7640,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lsCommPercOn1D = genericUtility.getColumnValue("comm_perc_on_1", dom1)==null?" ":genericUtility.getColumnValue("comm_perc_on_1", dom1); lsCommPercOn1D = genericUtility.getColumnValue("comm_perc_on_1", dom1)==null?" ":genericUtility.getColumnValue("comm_perc_on_1", dom1);
lsCommPerc2D = Double.parseDouble(genericUtility.getColumnValue("comm_perc_2", dom1)==null?"0.00":genericUtility.getColumnValue("comm_perc_2", dom1)); lsCommPerc2D = Double.parseDouble(genericUtility.getColumnValue("comm_perc_2", dom1)==null?"0.00":genericUtility.getColumnValue("comm_perc_2", dom1));
lsCommPercOn2D = genericUtility.getColumnValue("comm_perc_on_2", dom1)==null?" ":genericUtility.getColumnValue("comm_perc_on_2", dom1); lsCommPercOn2D = genericUtility.getColumnValue("comm_perc_on_2", dom1)==null?" ":genericUtility.getColumnValue("comm_perc_on_2", dom1);
if ((lsCommPerc > 0) || (lsCommPerc1 != null || lsCommPerc1.trim().length() > 0) || (lsCommPerc2 != null || lsCommPerc2.trim().length() > 0)) if ((lsCommPerc > 0) || (lsCommPerc1 != null || lsCommPerc1.trim().length() > 0) || (lsCommPerc2 != null || lsCommPerc2.trim().length() > 0))
{ {
valueXmlString.append("<comm_perc_1 protect = \"1\">").append("<![CDATA["+lsCommPerc+"]]>").append("</comm_perc_1>"); valueXmlString.append("<comm_perc_1 protect = \"1\">").append("<![CDATA["+lsCommPerc+"]]>").append("</comm_perc_1>");
...@@ -7751,7 +7755,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -7751,7 +7755,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lsCommPercOn1 = checkNull(genericUtility.getColumnValue("comm_perc_on_1", dom1)); lsCommPercOn1 = checkNull(genericUtility.getColumnValue("comm_perc_on_1", dom1));
lsCommPerc2 = checkNull(genericUtility.getColumnValue("comm_perc_2", dom1)); lsCommPerc2 = checkNull(genericUtility.getColumnValue("comm_perc_2", dom1));
lsCommPercOn2 = checkNull(genericUtility.getColumnValue("comm_perc_on_2", dom1)); lsCommPercOn2 = checkNull(genericUtility.getColumnValue("comm_perc_on_2", dom1));
valueXmlString.append("<comm_perc_1>").append("<![CDATA[" + lsCommPerc + "]]>").append("</comm_perc_1>"); valueXmlString.append("<comm_perc_1>").append("<![CDATA[" + lsCommPerc + "]]>").append("</comm_perc_1>");
valueXmlString.append("<comm_perc_on_1>").append("<![CDATA[" + lsCommPercOnStr + "]]>").append("</comm_perc_on_1>"); valueXmlString.append("<comm_perc_on_1>").append("<![CDATA[" + lsCommPercOnStr + "]]>").append("</comm_perc_on_1>");
valueXmlString.append("<comm_perc_2>").append("<![CDATA[" + lsCommPerc1 + "]]>").append("</comm_perc_2>"); valueXmlString.append("<comm_perc_2>").append("<![CDATA[" + lsCommPerc1 + "]]>").append("</comm_perc_2>");
...@@ -9099,7 +9103,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9099,7 +9103,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
double lsQty = 0.00, mRate = 0.00, idRateWtDiscount = 0.00, lcRate = 0.00, mRateClg = 0.00, ldRate = 0.00, lcQuantity = 0.00, lcDiscount = 0.00, lcTaxAmt = 0.00; double lsQty = 0.00, mRate = 0.00, idRateWtDiscount = 0.00, lcRate = 0.00, mRateClg = 0.00, ldRate = 0.00, lcQuantity = 0.00, lcDiscount = 0.00, lcTaxAmt = 0.00;
double lcNetAmt = 0.00, ldQtyStdum = 0.00, lcRateStduom = 0.00, ldConveQtyStduom = 0.00, lcConvRtuomStduom = 0.00, mQty = 0.00, lcPlistDisc = 0.00; double lcNetAmt = 0.00, ldQtyStdum = 0.00, lcRateStduom = 0.00, ldConveQtyStduom = 0.00, lcConvRtuomStduom = 0.00, mQty = 0.00, lcPlistDisc = 0.00;
double lcQtyStd = 0.00, acShipperQty = 0.00, acIntQty = 0.00; double lcQtyStd = 0.00, acShipperQty = 0.00, acIntQty = 0.00;
Timestamp ldDespDate = null; Date ldDespDate = null;
boolean lsDiscFlag = false; boolean lsDiscFlag = false;
lsItemCode = checkNull(genericUtility.getColumnValue("item_code", dom)); lsItemCode = checkNull(genericUtility.getColumnValue("item_code", dom));
...@@ -9687,28 +9691,28 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9687,28 +9691,28 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
lsSiteCode = rs.getString("site_code"); lsSiteCode = checkNull(rs.getString("site_code"));
lsItemCode = rs.getString("item_code"); lsItemCode = checkNull(rs.getString("item_code"));
lsItemFlg = rs.getString("item_flg"); lsItemFlg = checkNull(rs.getString("item_flg"));
lcQuantity = rs.getDouble("quantity"); lcQuantity = rs.getDouble("quantity");
lsUnit = rs.getString("unit"); lsUnit = checkNull(rs.getString("unit"));
ldDespDate = rs.getTimestamp("dsp_date"); ldDespDate = rs.getDate("dsp_date");
lcRate = rs.getDouble("rate"); lcRate = rs.getDouble("rate");
lcDiscount = rs.getDouble("discount"); lcDiscount = rs.getDouble("discount");
lcTaxAmt = rs.getDouble("tax_amt"); lcTaxAmt = rs.getDouble("tax_amt");
lsTaxClass = rs.getString("tax_class"); lsTaxClass = checkNull(rs.getString("tax_class"));
lsTaxChap = rs.getString("tax_chap"); lsTaxChap = checkNull(rs.getString("tax_chap"));
lsTaxEnv = rs.getString("tax_env"); lsTaxEnv = checkNull(rs.getString("tax_env"));
lcNetAmt = rs.getDouble("net_amt"); lcNetAmt = rs.getDouble("net_amt");
lsRemarks = rs.getString("remarks"); lsRemarks = checkNull(rs.getString("remarks"));
lsItemDescr = rs.getString("item_descr"); lsItemDescr = checkNull(rs.getString("item_descr"));
lsUnitRate = rs.getString("unit__rate"); lsUnitRate = checkNull(rs.getString("unit__rate"));
lsPackCode = rs.getString("pack_code"); lsPackCode = checkNull(rs.getString("pack_code"));
lsPackInstr = rs.getString("pack_instr"); lsPackInstr = checkNull(rs.getString("pack_instr"));
llNoArt = rs.getString("no_art"); llNoArt = checkNull(rs.getString("no_art"));
ldQtyStdum = rs.getDouble("quantity__stduom"); ldQtyStdum = rs.getDouble("quantity__stduom");
lcRateStduom = rs.getDouble("rate__stduom"); lcRateStduom = rs.getDouble("rate__stduom");
lsUnitStd = rs.getString("unit__std"); lsUnitStd = checkNull(rs.getString("unit__std"));
ldConveQtyStduom = rs.getDouble("conv__qty_stduom"); ldConveQtyStduom = rs.getDouble("conv__qty_stduom");
lcConvRtuomStduom = rs.getDouble("conv__rtuom_stduom"); lcConvRtuomStduom = rs.getDouble("conv__rtuom_stduom");
} }
...@@ -9775,18 +9779,22 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9775,18 +9779,22 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
valueXmlString.append("<unit__std >").append("<![CDATA[" + lsUnitStd + "]]>").append("</unit__std>"); valueXmlString.append("<unit__std >").append("<![CDATA[" + lsUnitStd + "]]>").append("</unit__std>");
setNodeValue( dom, "unit__std", getAbsString( lsUnitStd)); setNodeValue( dom, "unit__std", getAbsString( lsUnitStd));
valueXmlString.append("<dsp_date >").append("<![CDATA[" + ldDespDate + "]]>").append("</dsp_date>"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
String ldDespDateStr=simpleDateFormat.format(ldDespDate);
System.out.println("=========ldDespDate["+ldDespDateStr+"]");
valueXmlString.append("<dsp_date>").append("<![CDATA[" + ldDespDateStr + "]]>").append("</dsp_date>");
setNodeValue( dom, "dsp_date", getAbsString( ldDespDate.toString())); setNodeValue( dom, "dsp_date", getAbsString( ldDespDate.toString()));
valueXmlString.append("<conv__qty_stduom >").append("<![CDATA[" + ldConveQtyStduom + "]]>").append("</conv__qty_stduomc>"); valueXmlString.append("<conv__qty_stduom>").append("<![CDATA[" + ldConveQtyStduom + "]]>").append("</conv__qty_stduom>");
setNodeValue( dom, "conv__qty_stduom", getAbsString( String.valueOf(ldConveQtyStduom))); setNodeValue( dom, "conv__qty_stduom", getAbsString( String.valueOf(ldConveQtyStduom)));
valueXmlString.append("<conv__rtuom_stduom >").append("<![CDATA[" + lcConvRtuomStduom + "]]>").append("</conv__rtuom_stduom>"); valueXmlString.append("<conv__rtuom_stduom>").append("<![CDATA[" + lcConvRtuomStduom + "]]>").append("</conv__rtuom_stduom>");
setNodeValue( dom, "conv__rtuom_stduom", getAbsString( String.valueOf(lcConvRtuomStduom))); setNodeValue( dom, "conv__rtuom_stduom", getAbsString( String.valueOf(lcConvRtuomStduom)));
valueXmlString.append("<contract_no >").append("<![CDATA[" + lsContractNo + "]]>").append("</contract_no>"); valueXmlString.append("<contract_no>").append("<![CDATA[" + lsContractNo + "]]>").append("</contract_no>");
setNodeValue( dom, "contract_no", getAbsString( lsContractNo)); setNodeValue( dom, "contract_no", getAbsString( lsContractNo));
valueXmlString.append("<line_no__contr >").append("<![CDATA[" + lsLineNoContr + "]]>").append("</line_no__contr>"); valueXmlString.append("<line_no__contr>").append("<![CDATA[" + lsLineNoContr + "]]>").append("</line_no__contr>");
setNodeValue( dom, "line_no__contr", getAbsString( lsLineNoContr)); setNodeValue( dom, "line_no__contr", getAbsString( lsLineNoContr));
mPriceListClg = checkNull(genericUtility.getColumnValue("price_list__clg", dom1)); mPriceListClg = checkNull(genericUtility.getColumnValue("price_list__clg", dom1));
...@@ -9798,7 +9806,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9798,7 +9806,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
mItemSer = distCommon.getItemSer(lsItemCode, lsSiteCode, orderDate, lsCustCode, "C", conn); mItemSer = distCommon.getItemSer(lsItemCode, lsSiteCode, orderDate, lsCustCode, "C", conn);
} }
valueXmlString.append("<item_ser >").append("<![CDATA[" + mItemSer + "]]>").append("</item_ser>"); valueXmlString.append("<item_ser>").append("<![CDATA[" + mItemSer + "]]>").append("</item_ser>");
setNodeValue( dom, "item_ser", getAbsString( mItemSer)); setNodeValue( dom, "item_ser", getAbsString( mItemSer));
mRateClg = distCommon.pickRate(mPriceList, lrdateStr, lsItemCode, conn); mRateClg = distCommon.pickRate(mPriceList, lrdateStr, lsItemCode, conn);
...@@ -9814,16 +9822,16 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9814,16 +9822,16 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
if (mPriceListClg != null && mPriceListClg.trim().length() > 0) if (mPriceListClg != null && mPriceListClg.trim().length() > 0)
{ {
valueXmlString.append("<rate__clg >").append("<![CDATA[" + mRateClg + "]]>").append("</rate__clg>"); valueXmlString.append("<rate__clg>").append("<![CDATA[" + mRateClg + "]]>").append("</rate__clg>");
setNodeValue( dom, "rate__clg", getAbsString( String.valueOf(mRateClg))); setNodeValue( dom, "rate__clg", getAbsString( String.valueOf(mRateClg)));
} else } else
{ {
valueXmlString.append("<rate__clg >").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__clg>"); valueXmlString.append("<rate__clg>").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__clg>");
setNodeValue( dom, "rate__clg", getAbsString( String.valueOf(lcRateStduom))); setNodeValue( dom, "rate__clg", getAbsString( String.valueOf(lcRateStduom)));
} }
} else } else
{ {
valueXmlString.append("<rate__clg >").append("<![CDATA[" + mRateClg + "]]>").append("</rate__clg>"); valueXmlString.append("<rate__clg>").append("<![CDATA[" + mRateClg + "]]>").append("</rate__clg>");
setNodeValue( dom, "rate__clg", getAbsString( String.valueOf(mRateClg))); setNodeValue( dom, "rate__clg", getAbsString( String.valueOf(mRateClg)));
} }
...@@ -9846,7 +9854,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9846,7 +9854,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
if (lcDiscount == 0 && (lsContractNo == null || lsContractNo.trim().length() == 0)) if (lcDiscount == 0 && (lsContractNo == null || lsContractNo.trim().length() == 0))
{ {
valueXmlString.append("<discount >").append("<![CDATA[" + lcPlistDisc + "]]>").append("</discount>"); valueXmlString.append("<discount>").append("<![CDATA[" + lcPlistDisc + "]]>").append("</discount>");
setNodeValue( dom, "discount", getAbsString( String.valueOf(lcPlistDisc))); setNodeValue( dom, "discount", getAbsString( String.valueOf(lcPlistDisc)));
} }
lsDiscPriceList = checkNull(genericUtility.getColumnValue("price_list__disc", dom1)); lsDiscPriceList = checkNull(genericUtility.getColumnValue("price_list__disc", dom1));
...@@ -9855,16 +9863,16 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9855,16 +9863,16 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
ldRate = lcRate; ldRate = lcRate;
lsDiscFlag = true; lsDiscFlag = true;
valueXmlString.append("<rate >").append("<![CDATA[" + ldRate + "]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[" + ldRate + "]]>").append("</rate>");
setNodeValue( dom, "rate", getAbsString( String.valueOf(ldRate))); setNodeValue( dom, "rate", getAbsString( String.valueOf(ldRate)));
valueXmlString.append("<discount >").append("<![CDATA[" + 0 + "]]>").append("</discount>"); valueXmlString.append("<discount>").append("<![CDATA[" + 0 + "]]>").append("</discount>");
setNodeValue( dom, "discount", getAbsString( String.valueOf("0"))); setNodeValue( dom, "discount", getAbsString( String.valueOf("0")));
} }
lcQtyStd = Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity__stduom", dom1))); lcQtyStd = Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity__stduom", dom1)));
lsPackCode = genericUtility.getColumnValue("pack_code", dom1); lsPackCode = genericUtility.getColumnValue("pack_code", dom1);
llNoArt = String.valueOf(distCommon.getNoArt(lsSiteCode, lsCustCode, lsItemCode, lsPackCode, lcQtyStd, 'I', acShipperQty, acIntQty, conn)); llNoArt = String.valueOf(distCommon.getNoArt(lsSiteCode, lsCustCode, lsItemCode, lsPackCode, lcQtyStd, 'I', acShipperQty, acIntQty, conn));
valueXmlString.append("<no_art >").append("<![CDATA[" + llNoArt + "]]>").append("</no_art>"); valueXmlString.append("<no_art>").append("<![CDATA[" + llNoArt + "]]>").append("</no_art>");
setNodeValue( dom, "no_art", getAbsString( llNoArt)); setNodeValue( dom, "no_art", getAbsString( llNoArt));
sql = "select spec_id from siteitem where site_code = ? and item_code =?"; sql = "select spec_id from siteitem where site_code = ? and item_code =?";
...@@ -9898,9 +9906,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9898,9 +9906,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
pstmt = null; pstmt = null;
} }
valueXmlString.append("<spec_id >").append("<![CDATA[" + lsSpecId + "]]>").append("</spec_id>"); valueXmlString.append("<spec_id>").append("<![CDATA[" + lsSpecId + "]]>").append("</spec_id>");
setNodeValue( dom, "spec_id", getAbsString( lsSpecId)); setNodeValue( dom, "spec_id", getAbsString( lsSpecId));
// valueXmlString.append("<quantity >").append("<![CDATA[" + mQty + "]]>").append("</quantity>"); // valueXmlString.append("<quantity>").append("<![CDATA[" + mQty + "]]>").append("</quantity>");
// setNodeValue( dom, "quantity", getAbsString( String.valueOf(mQty))); // setNodeValue( dom, "quantity", getAbsString( String.valueOf(mQty)));
reStr=itemChangedNew(dom, dom1, dom2, objContext, "unit", editFlag, xtraParams); reStr=itemChangedNew(dom, dom1, dom2, objContext, "unit", editFlag, xtraParams);
...@@ -9996,17 +10004,17 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9996,17 +10004,17 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append("<site_code >").append("<![CDATA[" + lsSiteCode + "]]>").append("</site_code>"); valueXmlString.append("<site_code>").append("<![CDATA[" + lsSiteCode + "]]>").append("</site_code>");
valueXmlString.append("<item_code >").append("<![CDATA[" + lsItemCode + "]]>").append("</item_code>"); valueXmlString.append("<item_code>").append("<![CDATA[" + lsItemCode + "]]>").append("</item_code>");
valueXmlString.append("<item_flg >").append("<![CDATA[" + lsItemFlg + "]]>").append("</item_flg>"); valueXmlString.append("<item_flg>").append("<![CDATA[" + lsItemFlg + "]]>").append("</item_flg>");
valueXmlString.append("<quantity >").append("<![CDATA[" + lcQuantity + "]]>").append("</quantity>"); valueXmlString.append("<quantity>").append("<![CDATA[" + lcQuantity + "]]>").append("</quantity>");
valueXmlString.append("<unit >").append("<![CDATA[" + lsUnit + "]]>").append("</unit>"); valueXmlString.append("<unit>").append("<![CDATA[" + lsUnit + "]]>").append("</unit>");
valueXmlString.append("<rate >").append("<![CDATA[" + lcRate + "]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[" + lcRate + "]]>").append("</rate>");
valueXmlString.append("<discount >").append("<![CDATA[" + lcDiscount + "]]>").append("</discount>"); valueXmlString.append("<discount>").append("<![CDATA[" + lcDiscount + "]]>").append("</discount>");
valueXmlString.append("<tax_class >").append("<![CDATA[" + lsTaxClass + "]]>").append("</tax_class>"); valueXmlString.append("<tax_class>").append("<![CDATA[" + lsTaxClass + "]]>").append("</tax_class>");
valueXmlString.append("<tax_chap >").append("<![CDATA[" + lsTaxChap + "]]>").append("</tax_chap>"); valueXmlString.append("<tax_chap>").append("<![CDATA[" + lsTaxChap + "]]>").append("</tax_chap>");
valueXmlString.append("<tax_env >").append("<![CDATA[" + lsTaxEnv + "]]>").append("</tax_env>"); valueXmlString.append("<tax_env>").append("<![CDATA[" + lsTaxEnv + "]]>").append("</tax_env>");
valueXmlString.append("<remarks >").append("<![CDATA[" + lsRemarks + "]]>").append("</remarks>"); valueXmlString.append("<remarks>").append("<![CDATA[" + lsRemarks + "]]>").append("</remarks>");
if ("B".equalsIgnoreCase(lsItemFlg)) if ("B".equalsIgnoreCase(lsItemFlg))
{ {
lsItemDesc = lsItemDescr + " " + mDescr1; lsItemDesc = lsItemDescr + " " + mDescr1;
...@@ -10014,17 +10022,17 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -10014,17 +10022,17 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
lsItemDesc = lsItemDescr; lsItemDesc = lsItemDescr;
} }
valueXmlString.append("<item_descr >").append("<![CDATA[" + lsItemDesc + "]]>").append("</item_descr>"); valueXmlString.append("<item_descr>").append("<![CDATA[" + lsItemDesc + "]]>").append("</item_descr>");
valueXmlString.append("<unit__rate >").append("<![CDATA[" + lsUnitRate + "]]>").append("</unit__rate>"); valueXmlString.append("<unit__rate>").append("<![CDATA[" + lsUnitRate + "]]>").append("</unit__rate>");
valueXmlString.append("<pack_code >").append("<![CDATA[" + lsPackCode + "]]>").append("</pack_code>"); valueXmlString.append("<pack_code>").append("<![CDATA[" + lsPackCode + "]]>").append("</pack_code>");
valueXmlString.append("<pack_instr >").append("<![CDATA[" + lsPackInstr + "]]>").append("</pack_instr>"); valueXmlString.append("<pack_instr>").append("<![CDATA[" + lsPackInstr + "]]>").append("</pack_instr>");
valueXmlString.append("<no_art >").append("<![CDATA[" + llNoArt + "]]>").append("</no_art>"); valueXmlString.append("<no_art>").append("<![CDATA[" + llNoArt + "]]>").append("</no_art>");
valueXmlString.append("<quantity__stduom >").append("<![CDATA[" + ldQtyStduom + "]]>").append("</quantity__stduom>"); valueXmlString.append("<quantity__stduom>").append("<![CDATA[" + ldQtyStduom + "]]>").append("</quantity__stduom>");
valueXmlString.append("<rate__stduom >").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__stduom>"); valueXmlString.append("<rate__stduom>").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__stduom>");
valueXmlString.append("<unit__std >").append("<![CDATA[" + lsUnitStd + "]]>").append("</unit__std>"); valueXmlString.append("<unit__std>").append("<![CDATA[" + lsUnitStd + "]]>").append("</unit__std>");
valueXmlString.append("<dsp_date >").append("<![CDATA[" + ldDspDate + "]]>").append("</dsp_date>"); valueXmlString.append("<dsp_date>").append("<![CDATA[" + ldDspDate + "]]>").append("</dsp_date>");
valueXmlString.append("<conv__qty_stduom >").append("<![CDATA[" + ldConvQtyStduom + "]]>").append("</conv__qty_stduom>"); valueXmlString.append("<conv__qty_stduom>").append("<![CDATA[" + ldConvQtyStduom + "]]>").append("</conv__qty_stduom>");
valueXmlString.append("<conv__rtuom_stduom >").append("<![CDATA[" + lcConvRtuomStduom + "]]>").append("</conv__rtuom_stduom>"); valueXmlString.append("<conv__rtuom_stduom>").append("<![CDATA[" + lcConvRtuomStduom + "]]>").append("</conv__rtuom_stduom>");
} }
} }
if (currentColumn.trim().equalsIgnoreCase("quantity")) if (currentColumn.trim().equalsIgnoreCase("quantity"))
...@@ -10098,12 +10106,12 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -10098,12 +10106,12 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
termId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId"); termId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
valueXmlString.append("<chg_user >").append("<![CDATA[" + userId + "]]>").append("</chg_user>"); valueXmlString.append("<chg_user>").append("<![CDATA[" + userId + "]]>").append("</chg_user>");
valueXmlString.append("<chg_term >").append("<![CDATA[" + termId + "]]>").append("</chg_term>"); valueXmlString.append("<chg_term>").append("<![CDATA[" + termId + "]]>").append("</chg_term>");
valueXmlString.append("<chg_date >").append("<![CDATA[" + sysDate + "]]>").append("</chg_date>"); valueXmlString.append("<chg_date>").append("<![CDATA[" + sysDate + "]]>").append("</chg_date>");
lsSaleOrd = checkNull(genericUtility.getColumnValue("sale_order", dom1)); lsSaleOrd = checkNull(genericUtility.getColumnValue("sale_order", dom1));
valueXmlString.append("<sale_order >").append("<![CDATA[" + lsSaleOrd + "]]>").append("</sale_order>"); valueXmlString.append("<sale_order>").append("<![CDATA[" + lsSaleOrd + "]]>").append("</sale_order>");
} }
else if (currentColumn.trim().equalsIgnoreCase("cr_type")) else if (currentColumn.trim().equalsIgnoreCase("cr_type"))
{ {
...@@ -10122,7 +10130,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -10122,7 +10130,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
String lsSalesOrd = ""; String lsSalesOrd = "";
lsSaleOrd = checkNull(genericUtility.getColumnValue("sale_order", dom1)); lsSaleOrd = checkNull(genericUtility.getColumnValue("sale_order", dom1));
valueXmlString.append("<sale_order >").append("<![CDATA[" + lsSaleOrd + "]]>").append("</sale_order>"); valueXmlString.append("<sale_order>").append("<![CDATA[" + lsSaleOrd + "]]>").append("</sale_order>");
} }
else if (currentColumn.trim().equalsIgnoreCase("term_code")) else if (currentColumn.trim().equalsIgnoreCase("term_code"))
{ {
...@@ -10133,9 +10141,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -10133,9 +10141,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
} }
valueXmlString.append("</Root>"); valueXmlString.append("</Root>");
System.out.println("valueXmlString["+valueXmlString.toString()+"]"); System.out.println("valueXmlString["+valueXmlString.toString()+"]");
return valueXmlString.toString(); return valueXmlString.toString();
} catch (Exception e) } catch (Exception e)
{ {
System.out.println("Exception : [itemChangedNew] :==>\n" + e.getMessage()); System.out.println("Exception : [itemChangedNew] :==>\n" + e.getMessage());
...@@ -11114,7 +11122,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11114,7 +11122,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
commPerc2 = checkNull(genericUtility.getColumnValue("comm_perc_2", dom)); commPerc2 = checkNull(genericUtility.getColumnValue("comm_perc_2", dom));
commPercOn2 = checkNull(genericUtility.getColumnValue("comm_perc_on_2", dom)); commPercOn2 = checkNull(genericUtility.getColumnValue("comm_perc_on_2", dom));
currCodeComm2 = checkNull(genericUtility.getColumnValue("curr_code__comm_2", dom)); currCodeComm2 = checkNull(genericUtility.getColumnValue("curr_code__comm_2", dom));
if (lsSalesPers == null || lsSalesPers.trim().length() == 0) if (lsSalesPers == null || lsSalesPers.trim().length() == 0)
{ {
valueXmlString.append("<comm_perc protect = \"1\">").append("<![CDATA["+commPerc+"]]>").append("</comm_perc>"); valueXmlString.append("<comm_perc protect = \"1\">").append("<![CDATA["+commPerc+"]]>").append("</comm_perc>");
...@@ -11469,7 +11477,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11469,7 +11477,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
rs.close(); rs.close();
rs = null; rs = null;
valueXmlString.append("<descr >").append("<![CDATA[" + descr + "]]>").append("</descr>"); valueXmlString.append("<descr>").append("<![CDATA[" + descr + "]]>").append("</descr>");
} catch (ITMException e) } catch (ITMException e)
{ {
// TODO Auto-generated catch block // TODO Auto-generated catch block
...@@ -11515,7 +11523,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11515,7 +11523,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
mCode = checkNull(genericUtility.getColumnValue("nature", dom1)); mCode = checkNull(genericUtility.getColumnValue("nature", dom1));
if ("F".equalsIgnoreCase(mCode) || "B".equalsIgnoreCase(mCode) || "S".equalsIgnoreCase(mCode)) if ("F".equalsIgnoreCase(mCode) || "B".equalsIgnoreCase(mCode) || "S".equalsIgnoreCase(mCode))
{ {
valueXmlString.append("<rate >").append("<![CDATA[" + '0' + "]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[" + '0' + "]]>").append("</rate>");
setNodeValue( dom, "rate", getAbsString("0")); setNodeValue( dom, "rate", getAbsString("0"));
reStr=itemChangedNew(dom, dom1, dom2, objContext, "rate", editFlag, xtraParams); reStr=itemChangedNew(dom, dom1, dom2, objContext, "rate", editFlag, xtraParams);
pos = reStr.indexOf("<Detail2>"); pos = reStr.indexOf("<Detail2>");
...@@ -11575,7 +11583,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11575,7 +11583,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
rs.close(); rs.close();
rs = null; rs = null;
valueXmlString.append("<item_code__ord >").append("<![CDATA[" + lsItemCode + "]]>").append("</item_code__ord>"); valueXmlString.append("<item_code__ord>").append("<![CDATA[" + lsItemCode + "]]>").append("</item_code__ord>");
sql = "select descr from item where item_code =?"; sql = "select descr from item where item_code =?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -11589,14 +11597,14 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11589,14 +11597,14 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
pstmt = null; pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
valueXmlString.append("<item_descr >").append("<![CDATA[" + lsItemDescr + "]]>").append("</item_descr>"); valueXmlString.append("<item_descr>").append("<![CDATA[" + lsItemDescr + "]]>").append("</item_descr>");
} catch (SQLException e) } catch (SQLException e)
{ {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
valueXmlString.append("<cust_item_ref_descr >").append("<![CDATA[" + lsCustItemCodeDescr + "]]>").append("</cust_item_ref_descr>"); valueXmlString.append("<cust_item_ref_descr>").append("<![CDATA[" + lsCustItemCodeDescr + "]]>").append("</cust_item_ref_descr>");
} catch (ITMException e) } catch (ITMException e)
{ {
// TODO Auto-generated catch block // TODO Auto-generated catch block
...@@ -11662,9 +11670,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11662,9 +11670,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
lsTaxEnv = lsTaxEnvHdr; lsTaxEnv = lsTaxEnvHdr;
} }
valueXmlString.append("<tax_chap >").append("<![CDATA[" + lsTaxChap + "]]>").append("</tax_chap>"); valueXmlString.append("<tax_chap>").append("<![CDATA[" + lsTaxChap + "]]>").append("</tax_chap>");
valueXmlString.append("<tax_class >").append("<![CDATA[" + lsTaxClass + "]]>").append("</tax_class>"); valueXmlString.append("<tax_class>").append("<![CDATA[" + lsTaxClass + "]]>").append("</tax_class>");
valueXmlString.append("<tax_env >").append("<![CDATA[" + lsTaxEnv + "]]>").append("</tax_env>"); valueXmlString.append("<tax_env>").append("<![CDATA[" + lsTaxEnv + "]]>").append("</tax_env>");
} catch (ITMException e) } catch (ITMException e)
{ {
...@@ -11699,7 +11707,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11699,7 +11707,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
pstmt = null; pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
valueXmlString.append("<packing_descr >").append("<![CDATA[" + descr + "]]>").append("</packing_descr>"); valueXmlString.append("<packing_descr>").append("<![CDATA[" + descr + "]]>").append("</packing_descr>");
} catch (ITMException e) } catch (ITMException e)
{ {
// TODO Auto-generated catch block // TODO Auto-generated catch block
...@@ -11724,7 +11732,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11724,7 +11732,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
mItem = checkNull(genericUtility.getColumnValue("item_code__ord", dom)); mItem = checkNull(genericUtility.getColumnValue("item_code__ord", dom));
ldRate = Double.parseDouble(checkDouble(genericUtility.getColumnValue("rate", dom))); ldRate = Double.parseDouble(checkDouble(genericUtility.getColumnValue("rate", dom)));
lcRateStduom = distCommon.convQtyFactor(mVal1, mVal, mItem, ldRate, conn); lcRateStduom = distCommon.convQtyFactor(mVal1, mVal, mItem, ldRate, conn);
valueXmlString.append("<rate__stduom >").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__stduom>"); valueXmlString.append("<rate__stduom>").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__stduom>");
} catch (ITMException e) } catch (ITMException e)
{ {
// TODO Auto-generated catch block // TODO Auto-generated catch block
...@@ -11746,8 +11754,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11746,8 +11754,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
ldRate = Double.parseDouble(checkDouble(genericUtility.getColumnValue("rate", dom))); ldRate = Double.parseDouble(checkDouble(genericUtility.getColumnValue("rate", dom)));
lcRateStduom = distCommon.convQtyFactor(mVal1, mCode, mItem, ldRate, conn); lcRateStduom = distCommon.convQtyFactor(mVal1, mCode, mItem, ldRate, conn);
valueXmlString.append("<conv__rtuom_stduom >").append("<![CDATA[" + lcConvRtuomStduom + "]]>").append("</conv__rtuom_stduom>"); valueXmlString.append("<conv__rtuom_stduom>").append("<![CDATA[" + lcConvRtuomStduom + "]]>").append("</conv__rtuom_stduom>");
valueXmlString.append("<rate__stduom >").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__stduom>"); valueXmlString.append("<rate__stduom>").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__stduom>");
} catch (ITMException e) } catch (ITMException e)
{ {
// TODO Auto-generated catch block // TODO Auto-generated catch block
...@@ -11811,13 +11819,13 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11811,13 +11819,13 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
if (lsPriceList == null || lsPriceList.trim().length() == 0) if (lsPriceList == null || lsPriceList.trim().length() == 0)
{ {
lcPlistDisc = getDiscount(itemCode, lsUnit, mQty, dom, dom1, dom2, conn); lcPlistDisc = getDiscount(itemCode, lsUnit, mQty, dom, dom1, dom2, conn);
valueXmlString.append("<discount >").append("<![CDATA[" + lcPlistDisc + "]]>").append("</discount>"); valueXmlString.append("<discount>").append("<![CDATA[" + lcPlistDisc + "]]>").append("</discount>");
} }
if ("M".equalsIgnoreCase(getPriceList(itemCode, lsUnit, lsDiscPricelist, ldPlistDate, conn))) if ("M".equalsIgnoreCase(getPriceList(itemCode, lsUnit, lsDiscPricelist, ldPlistDate, conn)))
{ {
ldRate = 0.00; ldRate = 0.00;
valueXmlString.append("<rate >").append("<![CDATA[" + ldRate + "]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[" + ldRate + "]]>").append("</rate>");
valueXmlString.append("<discount >").append("<![CDATA[" + '0' + "]]>").append("</discount>"); valueXmlString.append("<discount>").append("<![CDATA[" + '0' + "]]>").append("</discount>");
} }
if (mVal.trim().length() > 0) if (mVal.trim().length() > 0)
{ {
...@@ -11835,7 +11843,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11835,7 +11843,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
pstmt = null; pstmt = null;
lcRateStduom = distCommon.convQtyFactor(mVal1, mVal, itemCode, ldRate, conn); lcRateStduom = distCommon.convQtyFactor(mVal1, mVal, itemCode, ldRate, conn);
valueXmlString.append("<unit__rate >").append("<![CDATA[" + mVal + "]]>").append("</unit__rate>"); valueXmlString.append("<unit__rate>").append("<![CDATA[" + mVal + "]]>").append("</unit__rate>");
} }
else else
{ {
...@@ -11845,14 +11853,14 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11845,14 +11853,14 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
if(mVal.trim().equalsIgnoreCase(mVal1.trim())) if(mVal.trim().equalsIgnoreCase(mVal1.trim()))
{ {
valueXmlString.append("<conv__rtuom_stduom >").append("1").append("</conv__rtuom_stduom>"); valueXmlString.append("<conv__rtuom_stduom>").append("1").append("</conv__rtuom_stduom>");
} }
else else
{ {
valueXmlString.append("<conv__rtuom_stduom >").append("<![CDATA[" + lcConvRtuomStduom + "]]>").append("</conv__rtuom_stduom>"); valueXmlString.append("<conv__rtuom_stduom>").append("<![CDATA[" + lcConvRtuomStduom + "]]>").append("</conv__rtuom_stduom>");
} }
} }
valueXmlString.append("<rate__stduom >").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__stduom>"); valueXmlString.append("<rate__stduom>").append("<![CDATA[" + lcRateStduom + "]]>").append("</rate__stduom>");
lsOrdType = checkNull(genericUtility.getColumnValue("order_type", dom1)); lsOrdType = checkNull(genericUtility.getColumnValue("order_type", dom1));
...@@ -11876,7 +11884,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11876,7 +11884,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lcRetDiff = (100 - Double.parseDouble(checkDouble(lsUdfStr1))) / 100; lcRetDiff = (100 - Double.parseDouble(checkDouble(lsUdfStr1))) / 100;
lcEscRate = lcRateStduom * lcRetDiff; lcEscRate = lcRateStduom * lcRetDiff;
valueXmlString.append("<rate__clg >").append("<![CDATA[" + lcEscRate + "]]>").append("</rate__clg>"); valueXmlString.append("<rate__clg>").append("<![CDATA[" + lcEscRate + "]]>").append("</rate__clg>");
} }
else else
{ {
...@@ -11895,15 +11903,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11895,15 +11903,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
if (mPriceListClg != null && mPriceListClg.trim().length() > 0) if (mPriceListClg != null && mPriceListClg.trim().length() > 0)
{ {
valueXmlString.append("<rate__clg >").append("<![CDATA[" + mRateClg + "]]>").append("</rate__clg>"); valueXmlString.append("<rate__clg>").append("<![CDATA[" + mRateClg + "]]>").append("</rate__clg>");
} else } else
{ {
valueXmlString.append("<rate__clg >").append("<![CDATA[" + ldRate + "]]>").append("</rate__clg>"); valueXmlString.append("<rate__clg>").append("<![CDATA[" + ldRate + "]]>").append("</rate__clg>");
} }
} }
else else
{ {
valueXmlString.append("<rate__clg >").append("<![CDATA[" + mRateClg + "]]>").append("</rate__clg>"); valueXmlString.append("<rate__clg>").append("<![CDATA[" + mRateClg + "]]>").append("</rate__clg>");
} }
} }
lcComm = Double.parseDouble(genericUtility.getColumnValue("comm_perc", dom1)==null?"0.00":genericUtility.getColumnValue("comm_perc", dom1)); lcComm = Double.parseDouble(genericUtility.getColumnValue("comm_perc", dom1)==null?"0.00":genericUtility.getColumnValue("comm_perc", dom1));
...@@ -11928,8 +11936,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11928,8 +11936,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lcRateDiff = ldRate - lcSpRate; lcRateDiff = ldRate - lcSpRate;
if (lcRateDiff > 0) if (lcRateDiff > 0)
{ {
valueXmlString.append("<comm_perc_1 >").append("<![CDATA[" + lcRateDiff + "]]>").append("</comm_perc_1>"); valueXmlString.append("<comm_perc_1>").append("<![CDATA[" + lcRateDiff + "]]>").append("</comm_perc_1>");
valueXmlString.append("<comm_perc_on_1 >").append("<![CDATA[" + 'Q' + "]]>").append("</comm_perc_on_1>"); valueXmlString.append("<comm_perc_on_1>").append("<![CDATA[" + 'Q' + "]]>").append("</comm_perc_on_1>");
} }
} }
} }
...@@ -11956,8 +11964,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11956,8 +11964,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lcRateDiff = ldRate - lcSpRate; lcRateDiff = ldRate - lcSpRate;
if (lcRateDiff > 0) if (lcRateDiff > 0)
{ {
valueXmlString.append("<comm_perc_2 >").append("<![CDATA[" + lcRateDiff + "]]>").append("</comm_perc_2>"); valueXmlString.append("<comm_perc_2>").append("<![CDATA[" + lcRateDiff + "]]>").append("</comm_perc_2>");
valueXmlString.append("<comm_perc_on_2 >").append("<![CDATA[" + 'Q' + "]]>").append("</comm_perc_on_2>"); valueXmlString.append("<comm_perc_on_2>").append("<![CDATA[" + 'Q' + "]]>").append("</comm_perc_on_2>");
} }
} }
} }
...@@ -11984,17 +11992,17 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -11984,17 +11992,17 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lcRateDiff = ldRate - lcSpRate; lcRateDiff = ldRate - lcSpRate;
if (lcRateDiff > 0) if (lcRateDiff > 0)
{ {
valueXmlString.append("<comm_perc_3 >").append("<![CDATA[" + lcRateDiff + "]]>").append("</comm_perc_3>"); valueXmlString.append("<comm_perc_3>").append("<![CDATA[" + lcRateDiff + "]]>").append("</comm_perc_3>");
valueXmlString.append("<comm_perc_on_3 >").append("<![CDATA[" + 'Q' + "]]>").append("</comm_perc_on_3>"); valueXmlString.append("<comm_perc_on_3>").append("<![CDATA[" + 'Q' + "]]>").append("</comm_perc_on_3>");
} }
} }
} }
if (ldRate > 0) if (ldRate > 0)
{ {
lcOrdValue = mQty * ldRate; lcOrdValue = mQty * ldRate;
valueXmlString.append("<ord_value >").append("<![CDATA[" + lcOrdValue + "]]>").append("</ord_value>"); valueXmlString.append("<ord_value>").append("<![CDATA[" + lcOrdValue + "]]>").append("</ord_value>");
} }
valueXmlString.append("<amount >").append("<![CDATA[" + mQty * ldRate + "]]>").append("</amount>"); valueXmlString.append("<amount>").append("<![CDATA[" + mQty * ldRate + "]]>").append("</amount>");
} catch (NumberFormatException e) } catch (NumberFormatException e)
{ {
...@@ -12028,7 +12036,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12028,7 +12036,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
System.out.println("mNum["+mNum+"] mVal["+mVal+"] mVal1["+mVal1+"] lsItemCodeOrd["+lsItemCodeOrd+"] mNum1["+mNum1+"]"); System.out.println("mNum["+mNum+"] mVal["+mVal+"] mVal1["+mVal1+"] lsItemCodeOrd["+lsItemCodeOrd+"] mNum1["+mNum1+"]");
mNum2 = distCommon.convQtyFactor(mVal, mVal1, lsItemCodeOrd, mNum1, conn); mNum2 = distCommon.convQtyFactor(mVal, mVal1, lsItemCodeOrd, mNum1, conn);
System.out.println("mNum2["+mNum2+"]"); System.out.println("mNum2["+mNum2+"]");
valueXmlString.append("<quantity__stduom >").append("<![CDATA[" + mNum2 + "]]>").append("</quantity__stduom>"); valueXmlString.append("<quantity__stduom>").append("<![CDATA[" + mNum2 + "]]>").append("</quantity__stduom>");
} catch (NumberFormatException e) } catch (NumberFormatException e)
{ {
// TODO Auto-generated catch block // TODO Auto-generated catch block
...@@ -12086,15 +12094,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12086,15 +12094,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
valueXmlString.append("<conv__qty_stduom>").append("<![CDATA[" + mNum2 + "]]>").append("</conv__qty_stduom>"); valueXmlString.append("<conv__qty_stduom>").append("<![CDATA[" + mNum2 + "]]>").append("</conv__qty_stduom>");
} }
mNum = distCommon.getConvQuantityFact(lsUnit, mVal1, lsItemCodeOrd, mNum1, mNum2, conn); mNum = distCommon.getConvQuantityFact(lsUnit, mVal1, lsItemCodeOrd, mNum1, mNum2, conn);
if(mNum.size()>0)
{
mqtyStr = (String)mNum.get(1);
mqty = Double.parseDouble(checkDouble(mqtyStr));
}
valueXmlString.append("<quantity__stduom>").append("<![CDATA[" + mqty + "]]>").append("</quantity__stduom>");
if(mNum.size()>0)
{
mqtyStr = (String)mNum.get(1);
mqty = Double.parseDouble(checkDouble(mqtyStr));
}
valueXmlString.append("<quantity__stduom>").append("<![CDATA[" + mqty + "]]>").append("</quantity__stduom>");
lsPlistDis = checkNull(genericUtility.getColumnValue("price_list__disc", dom1)); lsPlistDis = checkNull(genericUtility.getColumnValue("price_list__disc", dom1));
Timestamp orderDate = Timestamp.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom1), Timestamp orderDate = Timestamp.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("order_date", dom1),
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
...@@ -12216,7 +12224,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12216,7 +12224,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
mRate = 0; mRate = 0;
} }
} }
valueXmlString.append("<rate >").append("<![CDATA[" + mRate + "]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[" + mRate + "]]>").append("</rate>");
setNodeValue( dom, "rate", getAbsString( String.valueOf(mRate))); setNodeValue( dom, "rate", getAbsString( String.valueOf(mRate)));
} }
if (mVal.trim().length() == 0) if (mVal.trim().length() == 0)
...@@ -12240,7 +12248,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12240,7 +12248,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lsUnitSal = mVal; lsUnitSal = mVal;
} }
mNum = distCommon.convQtyFactor(lsUnitSal, mVal1, lsItemCodeOrd, mQty, conn); mNum = distCommon.convQtyFactor(lsUnitSal, mVal1, lsItemCodeOrd, mQty, conn);
valueXmlString.append("<unit >").append("<![CDATA[" + lsUnitSal + "]]>").append("</unit>"); valueXmlString.append("<unit>").append("<![CDATA[" + lsUnitSal + "]]>").append("</unit>");
setNodeValue( dom, "unit", getAbsString(lsUnitSal)); setNodeValue( dom, "unit", getAbsString(lsUnitSal));
} else } else
{ {
...@@ -12248,24 +12256,24 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12248,24 +12256,24 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
} }
if (ldConvQtyStduom == 0) if (ldConvQtyStduom == 0)
{ {
valueXmlString.append("<conv__qty_stduom >").append("<![CDATA[" + ldConvQtyStduom + "]]>").append("</conv__qty_stduom>"); valueXmlString.append("<conv__qty_stduom>").append("<![CDATA[" + ldConvQtyStduom + "]]>").append("</conv__qty_stduom>");
setNodeValue( dom, "conv__qty_stduom", getAbsString(String.valueOf(ldConvQtyStduom))); setNodeValue( dom, "conv__qty_stduom", getAbsString(String.valueOf(ldConvQtyStduom)));
} }
valueXmlString.append("<quantity__stduom >").append("<![CDATA[" + mNum + "]]>").append("</quantity__stduom>"); valueXmlString.append("<quantity__stduom>").append("<![CDATA[" + mNum + "]]>").append("</quantity__stduom>");
setNodeValue( dom, "quantity__stduom", getAbsString(String.valueOf(mNum))); setNodeValue( dom, "quantity__stduom", getAbsString(String.valueOf(mNum)));
if (lsContractNo == null || lsContractNo.trim().length() == 0) if (lsContractNo == null || lsContractNo.trim().length() == 0)
{ {
lsPlistDisc = String.valueOf(getDiscount(lsItemCodeOrd, mVal, mQty, dom, dom1, dom2, conn)); lsPlistDisc = String.valueOf(getDiscount(lsItemCodeOrd, mVal, mQty, dom, dom1, dom2, conn));
valueXmlString.append("<discount >").append("<![CDATA[" + lsPlistDisc + "]]>").append("</discount>"); valueXmlString.append("<discount>").append("<![CDATA[" + lsPlistDisc + "]]>").append("</discount>");
setNodeValue( dom, "discount", getAbsString(String.valueOf(lsPlistDisc))); setNodeValue( dom, "discount", getAbsString(String.valueOf(lsPlistDisc)));
} }
if ("M".equalsIgnoreCase(distCommon.getPriceListType(lsPlistDisc, conn))) if ("M".equalsIgnoreCase(distCommon.getPriceListType(lsPlistDisc, conn)))
{ {
ldRate = idRateWtDiscount; ldRate = idRateWtDiscount;
lsDiscFalg = false; lsDiscFalg = false;
valueXmlString.append("<rate >").append("<![CDATA[" + ldRate + "]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[" + ldRate + "]]>").append("</rate>");
setNodeValue( dom, "rate", getAbsString(String.valueOf(ldRate))); setNodeValue( dom, "rate", getAbsString(String.valueOf(ldRate)));
valueXmlString.append("<discount >").append("<![CDATA[" + '0' + "]]>").append("</discount>"); valueXmlString.append("<discount>").append("<![CDATA[" + '0' + "]]>").append("</discount>");
setNodeValue( dom, "discount", getAbsString("0")); setNodeValue( dom, "discount", getAbsString("0"));
} }
lsCustCode = checkNull(genericUtility.getColumnValue("cust_code", dom1)); lsCustCode = checkNull(genericUtility.getColumnValue("cust_code", dom1));
...@@ -12453,7 +12461,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12453,7 +12461,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
} }
else else
{ {
valueXmlString.append("<item_code >").append("<![CDATA[" + lsSchemeCode + "]]>").append("</item_code>"); valueXmlString.append("<item_code>").append("<![CDATA[" + lsSchemeCode + "]]>").append("</item_code>");
setNodeValue( dom, "item_code", getAbsString(lsSchemeCode)); setNodeValue( dom, "item_code", getAbsString(lsSchemeCode));
} }
sql = "select batch_qty from bom where bom_code =?"; sql = "select batch_qty from bom where bom_code =?";
...@@ -12506,7 +12514,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12506,7 +12514,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
System.out.println("lbOrdFlag>?>>>["+lbOrdFlag+"]lsItemStru>>>"+lsItemStru+"] lsSchemeCode["+lsSchemeCode+"]"); System.out.println("lbOrdFlag>?>>>["+lbOrdFlag+"]lsItemStru>>>"+lsItemStru+"] lsSchemeCode["+lsSchemeCode+"]");
if (lbOrdFlag) if (lbOrdFlag)
{ {
valueXmlString.append("<item_flg >").append("<![CDATA[" + 'I' + "]]>").append("</item_flg>"); valueXmlString.append("<item_flg>").append("<![CDATA[" + 'I' + "]]>").append("</item_flg>");
setNodeValue( dom, "item_flg", getAbsString("I")); setNodeValue( dom, "item_flg", getAbsString("I"));
valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsItemCodeOrd + "]]>").append("</item_code>"); valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsItemCodeOrd + "]]>").append("</item_code>");
setNodeValue( dom, "item_code", getAbsString(lsItemCodeOrd)); setNodeValue( dom, "item_code", getAbsString(lsItemCodeOrd));
...@@ -12537,14 +12545,14 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12537,14 +12545,14 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
if (cnt > 1) if (cnt > 1)
{ {
valueXmlString.append("<item_flg >").append("<![CDATA[" + 'B' + "]]>").append("</item_flg>"); valueXmlString.append("<item_flg>").append("<![CDATA[" + 'B' + "]]>").append("</item_flg>");
setNodeValue( dom, "item_flg", getAbsString("B")); setNodeValue( dom, "item_flg", getAbsString("B"));
valueXmlString.append("<item_code protect = \"0\">").append("<![CDATA[]]>").append("</item_code>"); valueXmlString.append("<item_code protect = \"0\">").append("<![CDATA[]]>").append("</item_code>");
} }
else else
{ {
valueXmlString.append("<item_flg >").append("<![CDATA[" + 'B' + "]]>").append("</item_flg>"); valueXmlString.append("<item_flg>").append("<![CDATA[" + 'B' + "]]>").append("</item_flg>");
setNodeValue( dom, "item_flg", getAbsString("B")); setNodeValue( dom, "item_flg", getAbsString("B"));
valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsSchemeCode + "]]>").append("</item_code>"); valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsSchemeCode + "]]>").append("</item_code>");
setNodeValue( dom, "item_code", getAbsString(lsSchemeCode)); setNodeValue( dom, "item_code", getAbsString(lsSchemeCode));
...@@ -12560,7 +12568,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12560,7 +12568,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
} }
else if (!"F".equalsIgnoreCase(lsItemStru) && lsSchemeCode.trim().length() > 0) else if (!"F".equalsIgnoreCase(lsItemStru) && lsSchemeCode.trim().length() > 0)
{ {
valueXmlString.append("<item_flg >").append("<![CDATA[" + 'B' + "]]>").append("</item_flg>"); valueXmlString.append("<item_flg>").append("<![CDATA[" + 'B' + "]]>").append("</item_flg>");
setNodeValue( dom, "item_flg", getAbsString("B")); setNodeValue( dom, "item_flg", getAbsString("B"));
valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsSchemeCode + "]]>").append("</item_code>"); valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsSchemeCode + "]]>").append("</item_code>");
setNodeValue( dom, "item_code", getAbsString(lsSchemeCode)); setNodeValue( dom, "item_code", getAbsString(lsSchemeCode));
...@@ -12592,13 +12600,13 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12592,13 +12600,13 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
if (cnt >= 1) if (cnt >= 1)
{ {
valueXmlString.append("<item_flg >").append("<![CDATA[" + 'B' + "]]>").append("</item_flg>"); valueXmlString.append("<item_flg>").append("<![CDATA[" + 'B' + "]]>").append("</item_flg>");
setNodeValue( dom, "item_flg", getAbsString("B")); setNodeValue( dom, "item_flg", getAbsString("B"));
valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsSchemeCode + "]]>").append("</item_code>"); valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsSchemeCode + "]]>").append("</item_code>");
setNodeValue( dom, "item_code", getAbsString(lsSchemeCode)); setNodeValue( dom, "item_code", getAbsString(lsSchemeCode));
} else } else
{ {
valueXmlString.append("<item_flg >").append("<![CDATA[" + 'I' + "]]>").append("</item_flg>"); valueXmlString.append("<item_flg>").append("<![CDATA[" + 'I' + "]]>").append("</item_flg>");
setNodeValue( dom, "item_flg", getAbsString("I")); setNodeValue( dom, "item_flg", getAbsString("I"));
valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsItemCodeOrd + "]]>").append("</item_code>"); valueXmlString.append("<item_code protect = \"1\">").append("<![CDATA[" + lsItemCodeOrd + "]]>").append("</item_code>");
setNodeValue( dom, "item_code", getAbsString(lsItemCodeOrd)); setNodeValue( dom, "item_code", getAbsString(lsItemCodeOrd));
...@@ -12733,9 +12741,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12733,9 +12741,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
} }
} }
lcOrdValue = mQty * lcRate; lcOrdValue = mQty * lcRate;
valueXmlString.append("<rate >").append("<![CDATA[" + lcRate + "]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[" + lcRate + "]]>").append("</rate>");
setNodeValue( dom, "rate", getAbsString(String.valueOf(lcRate))); setNodeValue( dom, "rate", getAbsString(String.valueOf(lcRate)));
valueXmlString.append("<ord_value >").append("<![CDATA[" + lcOrdValue + "]]>").append("</ord_value>"); valueXmlString.append("<ord_value>").append("<![CDATA[" + lcOrdValue + "]]>").append("</ord_value>");
setNodeValue( dom, "ord_value", getAbsString(String.valueOf(lcOrdValue))); setNodeValue( dom, "ord_value", getAbsString(String.valueOf(lcOrdValue)));
lsSiteCodeShip = checkNull(genericUtility.getColumnValue("site_code", dom1)); lsSiteCodeShip = checkNull(genericUtility.getColumnValue("site_code", dom1));
...@@ -12753,7 +12761,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12753,7 +12761,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
lcLooseQty = mQty - (lcShipperQty + lcIntQty); lcLooseQty = mQty - (lcShipperQty + lcIntQty);
String lsStr = " Shipper Quantity = " + lcShipperQty + " Integral Quantity = " + lcIntQty + " Loose Quantity = " + lcLooseQty; String lsStr = " Shipper Quantity = " + lcShipperQty + " Integral Quantity = " + lcIntQty + " Loose Quantity = " + lcLooseQty;
valueXmlString.append("<st_shrink >").append("<![CDATA[" + lsStr + "]]>").append("</st_shrink>"); valueXmlString.append("<st_shrink>").append("<![CDATA[" + lsStr + "]]>").append("</st_shrink>");
setNodeValue( dom, "st_shrink", getAbsString(lsStr)); setNodeValue( dom, "st_shrink", getAbsString(lsStr));
if (lsSchemeCode != null && lsSchemeCode.trim().length() > 0) if (lsSchemeCode != null && lsSchemeCode.trim().length() > 0)
{ {
...@@ -12785,19 +12793,19 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12785,19 +12793,19 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append("<st_scheme >").append("<![CDATA[" + lsDescr + "]]>").append("</st_scheme>"); valueXmlString.append("<st_scheme>").append("<![CDATA[" + lsDescr + "]]>").append("</st_scheme>");
setNodeValue( dom, "st_scheme", getAbsString(lsDescr)); setNodeValue( dom, "st_scheme", getAbsString(lsDescr));
} }
else else
{ {
lcIntegralQty = distCommon.getIntegralQty(lsCustCode, lsItemCodeOrd, mSiteCode, conn); lcIntegralQty = distCommon.getIntegralQty(lsCustCode, lsItemCodeOrd, mSiteCode, conn);
valueXmlString.append("<st_scheme >").append("<![CDATA[" + "Integral Quantity : " + lcIntegralQty + "]]>").append("</st_scheme>"); valueXmlString.append("<st_scheme>").append("<![CDATA[" + "Integral Quantity : " + lcIntegralQty + "]]>").append("</st_scheme>");
} }
} }
else else
{ {
lcIntegralQty = distCommon.getIntegralQty(lsCustCode, lsItemCodeOrd, mSiteCode, conn); lcIntegralQty = distCommon.getIntegralQty(lsCustCode, lsItemCodeOrd, mSiteCode, conn);
valueXmlString.append("<st_scheme >").append("<![CDATA[" + "Integral Quantity : " + lcIntegralQty + "]]>").append("</st_scheme>"); valueXmlString.append("<st_scheme>").append("<![CDATA[" + "Integral Quantity : " + lcIntegralQty + "]]>").append("</st_scheme>");
} }
lcQty1 = Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity", dom))); lcQty1 = Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity", dom)));
lcQtyFc = Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity__fc", dom))); lcQtyFc = Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity__fc", dom)));
...@@ -12806,11 +12814,11 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12806,11 +12814,11 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
if (lcQtyFc == 0 || lcQty1 != lcQtyFc) if (lcQtyFc == 0 || lcQty1 != lcQtyFc)
{ {
valueXmlString.append("<quantity__fc >").append("<![CDATA[" + lcQty1 + "]]>").append("</quantity__fc>"); valueXmlString.append("<quantity__fc>").append("<![CDATA[" + lcQty1 + "]]>").append("</quantity__fc>");
setNodeValue( dom, "quantity__fc", getAbsString(String.valueOf(lcQty1))); setNodeValue( dom, "quantity__fc", getAbsString(String.valueOf(lcQty1)));
} }
valueXmlString.append("<amount >").append("<![CDATA[" + mQty * lcRate + "]]>").append("</amount>"); valueXmlString.append("<amount>").append("<![CDATA[" + mQty * lcRate + "]]>").append("</amount>");
setNodeValue( dom, "amount", getAbsString(String.valueOf(mQty * lcRate))); setNodeValue( dom, "amount", getAbsString(String.valueOf(mQty * lcRate)));
lsSalesOrd = checkNull(genericUtility.getColumnValue("sale_order", dom)); lsSalesOrd = checkNull(genericUtility.getColumnValue("sale_order", dom));
...@@ -13149,7 +13157,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13149,7 +13157,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
System.out.println("Exception ::" + e.getMessage()); System.out.println("Exception ::" + e.getMessage());
throw new ITMException(e); throw new ITMException(e);
} }
return saleContractNo+"@"+contractLineNo; return contractNo+"@"+contractLineNo;
} }
// gbf_itemchangeddet1 // gbf_itemchangeddet1
......
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