Commit 985c2952 authored by msharma's avatar msharma

Rounded value upto 3 decimal instead of 2 decimal


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100334 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c3cc798c
...@@ -3503,7 +3503,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3503,7 +3503,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
rcpQtyList = GetRcpQtyCommon("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); rcpQtyList = GetRcpQtyCommon("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
receiptLast=rcpQtyList.get(0); receiptLast=rcpQtyList.get(0);
//receiptRate=rcpQtyList.get(1); //receiptRate=rcpQtyList.get(1);
rcpquantityRate=getRequiredDcml(rcpQtyList.get(1),2); rcpquantityRate=getRequiredDcml(rcpQtyList.get(1),3);
//System.out.println("receiptRate@@@@@@@@@>>>>>>"+receiptRate); //System.out.println("receiptRate@@@@@@@@@>>>>>>"+receiptRate);
//receiptAmount=receiptLast*receiptRate; //receiptAmount=receiptLast*receiptRate;
...@@ -3514,7 +3514,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3514,7 +3514,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
rcpFreesLast=0.0; rcpFreesLast=0.0;
rcpFreeQtyList = GetFreeQtyCommon("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); rcpFreeQtyList = GetFreeQtyCommon("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
rcpFreesLast=rcpFreeQtyList.get(0); rcpFreesLast=rcpFreeQtyList.get(0);
rcpFreesValue=getRequiredDcml(rcpFreeQtyList.get(1),2); rcpFreesValue=getRequiredDcml(rcpFreeQtyList.get(1),3);
System.out.println("rcpFreesLast :"+rcpFreesLast); System.out.println("rcpFreesLast :"+rcpFreesLast);
//rcpFreesAmount=rcpFreesLast*receiptRate; //rcpFreesAmount=rcpFreesLast*receiptRate;
//System.out.println("rcpFreesAmount :"+rcpFreesAmount); //System.out.println("rcpFreesAmount :"+rcpFreesAmount);
...@@ -3543,7 +3543,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3543,7 +3543,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
transitQtyList=null; transitQtyList=null;
transitQtyList=GetRcpQtyCommon("T",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); transitQtyList=GetRcpQtyCommon("T",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
transitQty=transitQtyList.get(0); transitQty=transitQtyList.get(0);
transitQuantityRate=getRequiredDcml(rcpQtyList.get(1),2); transitQuantityRate=getRequiredDcml(rcpQtyList.get(1),3);
System.out.println("transitQty quantity cal for avaible transcation id :"+transitQty); System.out.println("transitQty quantity cal for avaible transcation id :"+transitQty);
System.out.println("receiptLast :"+receiptLast); System.out.println("receiptLast :"+receiptLast);
...@@ -3554,7 +3554,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3554,7 +3554,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
transitQtyFreesLast=0.0; transitQtyFreesLast=0.0;
transitFreeQtyList=GetFreeQtyCommon("T",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); transitFreeQtyList=GetFreeQtyCommon("T",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
transitQtyFreesLast=transitFreeQtyList.get(0); transitQtyFreesLast=transitFreeQtyList.get(0);
transitFreeValue=getRequiredDcml(transitFreeQtyList.get(1),2); transitFreeValue=getRequiredDcml(transitFreeQtyList.get(1),3);
System.out.println("transitQtyFreesLast :"+transitQtyFreesLast); System.out.println("transitQtyFreesLast :"+transitQtyFreesLast);
transitCharQty=0.0; transitCharQty=0.0;
...@@ -3571,7 +3571,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3571,7 +3571,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
cmrcpQtyList = GetRcpQtyCM("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); cmrcpQtyList = GetRcpQtyCM("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCodeLast,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
System.out.println("cmrcpQtyList>>>>>>>"+cmrcpQtyList+"iTEMcODE@@@@@@"+itemCode); System.out.println("cmrcpQtyList>>>>>>>"+cmrcpQtyList+"iTEMcODE@@@@@@"+itemCode);
cmQuantity=cmrcpQtyList.get(0); cmQuantity=cmrcpQtyList.get(0);
cmValue=getRequiredDcml(cmrcpQtyList.get(1),2); cmValue=getRequiredDcml(cmrcpQtyList.get(1),3);
descrLast=""; descrLast="";
...@@ -3601,6 +3601,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3601,6 +3601,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
returnTransitRepl=replQtyList.get(2); returnTransitRepl=replQtyList.get(2);
billRetQtyBonus=replQtyList.get(3); billRetQtyBonus=replQtyList.get(3);
sretRate=replQtyList.get(4); sretRate=replQtyList.get(4);
sretRate=getRequiredDcml(sretRate,3);
System.out.println("replQtyAll>>>>>>"+replQtyAll+">>>>>>"+itemCode); System.out.println("replQtyAll>>>>>>"+replQtyAll+">>>>>>"+itemCode);
sretQtyAllTot= billRetQty - replQtyAll -retFreeQtyAll ; sretQtyAllTot= billRetQty - replQtyAll -retFreeQtyAll ;
System.out.println("sretQtyAllTot @@@@@@@@@@@!!!!!!:"+sretQtyAllTot); System.out.println("sretQtyAllTot @@@@@@@@@@@!!!!!!:"+sretQtyAllTot);
...@@ -3659,11 +3660,11 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3659,11 +3660,11 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
valueXmlString.append("<loc_type>").append("<![CDATA["+locTypeLast+"]]>").append("</loc_type>"); valueXmlString.append("<loc_type>").append("<![CDATA["+locTypeLast+"]]>").append("</loc_type>");
if(!Double.isNaN(rateLast)) if(!Double.isNaN(rateLast))
{ {
valueXmlString.append("<rate>").append("<![CDATA["+getRequiredDecimal(rateLast,2)+"]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA["+getRequiredDecimal(rateLast,3)+"]]>").append("</rate>");
} }
if(!Double.isNaN(rateOrg)) if(!Double.isNaN(rateOrg))
{ {
valueXmlString.append("<rate__org>").append("<![CDATA["+getRequiredDecimal(rateOrg,2)+"]]>").append("</rate__org>"); valueXmlString.append("<rate__org>").append("<![CDATA["+getRequiredDecimal(rateOrg,3)+"]]>").append("</rate__org>");
} }
//valueXmlString.append("<op_stock protect='1'>").append("<![CDATA["+(long)Math.round(opStockLast)+"]]>").append("</op_stock>"); //valueXmlString.append("<op_stock protect='1'>").append("<![CDATA["+(long)Math.round(opStockLast)+"]]>").append("</op_stock>");
if(isPreviusItem || "V".equalsIgnoreCase(editFlag)) if(isPreviusItem || "V".equalsIgnoreCase(editFlag))
...@@ -3706,8 +3707,8 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3706,8 +3707,8 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
valueXmlString.append("<chg_date>").append("<![CDATA["+sdf.format(currentDate)+"]]>").append("</chg_date>"); valueXmlString.append("<chg_date>").append("<![CDATA["+sdf.format(currentDate)+"]]>").append("</chg_date>");
valueXmlString.append("<rate_old>").append("<![CDATA["+rateOld+"]]>").append("</rate_old>"); valueXmlString.append("<rate_old>").append("<![CDATA["+getRequiredDecimal(rateOld,3)+"]]>").append("</rate_old>");
valueXmlString.append("<rate_org_old>").append("<![CDATA["+rateOrgOld+"]]>").append("</rate_org_old>"); valueXmlString.append("<rate_org_old>").append("<![CDATA["+getRequiredDecimal(rateOrgOld,3)+"]]>").append("</rate_org_old>");
valueXmlString.append("<rcp_value>").append("<![CDATA["+getRequiredDecimal(rcpquantityRate,3)+"]]>").append("</rcp_value>"); valueXmlString.append("<rcp_value>").append("<![CDATA["+getRequiredDecimal(rcpquantityRate,3)+"]]>").append("</rcp_value>");
valueXmlString.append("<repl_value>").append("<![CDATA["+getRequiredDecimal(returnReciptRepl*sretRate,3)+"]]>").append("</repl_value>"); valueXmlString.append("<repl_value>").append("<![CDATA["+getRequiredDecimal(returnReciptRepl*sretRate,3)+"]]>").append("</repl_value>");
valueXmlString.append("<cm_invoice>").append("<![CDATA["+getRequiredDecimal(cmQuantity,3)+"]]>").append("</cm_invoice>"); valueXmlString.append("<cm_invoice>").append("<![CDATA["+getRequiredDecimal(cmQuantity,3)+"]]>").append("</cm_invoice>");
...@@ -3827,12 +3828,14 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3827,12 +3828,14 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
rcpQtyList = GetRcpQtyCommon("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); rcpQtyList = GetRcpQtyCommon("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
rcpQtyAll=rcpQtyList.get(0); rcpQtyAll=rcpQtyList.get(0);
rcpquantityRate=rcpQtyList.get(1); rcpquantityRate=rcpQtyList.get(1);
rcpquantityRate=getRequiredDcml(rcpquantityRate,3);
rcpFreesAll=0.0; rcpFreesAll=0.0;
rcpFreeQtyList=null; rcpFreeQtyList=null;
rcpFreeQtyList = GetFreeQtyCommon("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); rcpFreeQtyList = GetFreeQtyCommon("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
rcpFreesAll=rcpFreeQtyList.get(0); rcpFreesAll=rcpFreeQtyList.get(0);
rcpFreesValue=rcpFreeQtyList.get(1); rcpFreesValue=rcpFreeQtyList.get(1);
rcpFreesValue=getRequiredDcml(rcpFreesValue,3);
System.out.println("rcpFreesAll :"+rcpFreesAll); System.out.println("rcpFreesAll :"+rcpFreesAll);
//receiptRate = GetRateCommon(custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); //receiptRate = GetRateCommon(custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
...@@ -3856,6 +3859,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3856,6 +3859,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
returnTransitRepl=replQtyList.get(2); returnTransitRepl=replQtyList.get(2);
billRetQtyBonus=replQtyList.get(3); billRetQtyBonus=replQtyList.get(3);
sretRate=replQtyList.get(4); sretRate=replQtyList.get(4);
sretRate=getRequiredDcml(sretRate,3);
System.out.println("replQtyAll>>>>>>"+replQtyAll+">>>>>>"+itemCode+"Rate>>>>>"+sretRate); System.out.println("replQtyAll>>>>>>"+replQtyAll+">>>>>>"+itemCode+"Rate>>>>>"+sretRate);
sretQtyAllTot= billRetQty - replQtyAll -billRetQtyBonus ; sretQtyAllTot= billRetQty - replQtyAll -billRetQtyBonus ;
System.out.println("sretQtyAllTot @@@@@@@@@@@!!!!!!:"+sretQtyAllTot); System.out.println("sretQtyAllTot @@@@@@@@@@@!!!!!!:"+sretQtyAllTot);
...@@ -3890,7 +3894,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3890,7 +3894,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
transitQtyList=null; transitQtyList=null;
transitQtyList = GetRcpQtyCommon("T",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); transitQtyList = GetRcpQtyCommon("T",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
transitQtyAll=transitQtyList.get(0); transitQtyAll=transitQtyList.get(0);
transitQuantityRate=getRequiredDcml(rcpQtyList.get(1),2); transitQuantityRate=getRequiredDcml(rcpQtyList.get(1),3);
//transitQtyRate=transitQtyList.get(1); //transitQtyRate=transitQtyList.get(1);
System.out.println("transitQtyAll@@@@@@@"+transitQtyAll+">>>>>>"+itemSerHd); System.out.println("transitQtyAll@@@@@@@"+transitQtyAll+">>>>>>"+itemSerHd);
System.out.println("transitQtyRate@@@@@@@"+transitQtyRate); System.out.println("transitQtyRate@@@@@@@"+transitQtyRate);
...@@ -3901,7 +3905,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3901,7 +3905,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
transitFreeQtyList=null; transitFreeQtyList=null;
transitFreeQtyList = GetFreeQtyCommon("T",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); transitFreeQtyList = GetFreeQtyCommon("T",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
transitQtyFrees=transitFreeQtyList.get(0); transitQtyFrees=transitFreeQtyList.get(0);
transitFreeValue=getRequiredDcml(transitFreeQtyList.get(1),2); transitFreeValue=getRequiredDcml(transitFreeQtyList.get(1),3);
System.out.println("transitQtyFrees :"+transitQtyFrees); System.out.println("transitQtyFrees :"+transitQtyFrees);
transitCharQtyAll = 0.0; transitCharQtyAll = 0.0;
...@@ -3912,7 +3916,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -3912,7 +3916,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
cmrcpQtyList = GetRcpQtyCM("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn); cmrcpQtyList = GetRcpQtyCM("R",custCodeHd,orderType,itemSerHd,siteCodeHd,selectedInvList,transitInvList,itemCode,frmDateTstmp,toDateTstmp,prdFrmDateTstmp,prdtoDateTstmp,conn);
System.out.println("cmrcpQtyList>>>>>>>"+cmrcpQtyList+"iTEMcODE@@@@@@"+itemCode); System.out.println("cmrcpQtyList>>>>>>>"+cmrcpQtyList+"iTEMcODE@@@@@@"+itemCode);
cmQuantity=cmrcpQtyList.get(0); cmQuantity=cmrcpQtyList.get(0);
cmValue=getRequiredDcml(cmrcpQtyList.get(1),2); cmValue=getRequiredDcml(cmrcpQtyList.get(1),3);
/* /*
rateAll=0.0; rateAll=0.0;
...@@ -4071,15 +4075,16 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4071,15 +4075,16 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
valueXmlString.append("<formula_value>").append("<![CDATA["+itemMap.get("formulaValue@"+itemDomId).toString()+"]]>").append("</formula_value>"); valueXmlString.append("<formula_value>").append("<![CDATA["+itemMap.get("formulaValue@"+itemDomId).toString()+"]]>").append("</formula_value>");
valueXmlString.append("<free_value>").append("<![CDATA["+getRequiredDecimal(Double.parseDouble(itemMap.get("freeValue@"+itemDomId).toString()),3)+"]]>").append("</free_value>"); valueXmlString.append("<free_value>").append("<![CDATA["+getRequiredDecimal(Double.parseDouble(itemMap.get("freeValue@"+itemDomId).toString()),3)+"]]>").append("</free_value>");
valueXmlString.append("<sret_vale>").append("<![CDATA["+getRequiredDecimal(Double.parseDouble(itemMap.get("sretValue@"+itemDomId).toString()),3)+"]]>").append("</sret_vale>"); valueXmlString.append("<sret_vale>").append("<![CDATA["+getRequiredDecimal(Double.parseDouble(itemMap.get("sretValue@"+itemDomId).toString()),3)+"]]>").append("</sret_vale>");
valueXmlString.append("<pur_value>").append("<![CDATA["+(long)Math.round(Double.parseDouble(itemMap.get("rcpValue@"+itemDomId).toString()))+"]]>").append("</pur_value>"); valueXmlString.append("<pur_value>").append("<![CDATA["+getRequiredDecimal(Double.parseDouble(itemMap.get("rcpValue@"+itemDomId).toString()),3)+"]]>").append("</pur_value>");
//valueXmlString.append("<pur_value>").append("<![CDATA["+(long)Math.round(Double.parseDouble(itemMap.get("rcpValue@"+itemDomId).toString()))+"]]>").append("</pur_value>");
openingValue=getRequiredDcml((Double.parseDouble(itemMap.get("mopStk@"+itemDomId).toString()))*(Double.parseDouble(itemMap.get("oldRate@"+itemDomId).toString())),2); openingValue=getRequiredDcml((Double.parseDouble(itemMap.get("mopStk@"+itemDomId).toString()))*(Double.parseDouble(itemMap.get("oldRate@"+itemDomId).toString())),3);
System.out.println("net secondary salesopeningValue>>>>>>"+openingValue); System.out.println("net secondary salesopeningValue>>>>>>"+openingValue);
salesValueCal=openingValue+Double.parseDouble(itemMap.get("rcpValue@"+itemDomId).toString()) salesValueCal=openingValue+Double.parseDouble(itemMap.get("rcpValue@"+itemDomId).toString())
+ Double.parseDouble(itemMap.get("replValue@"+itemDomId).toString()) + Double.parseDouble(itemMap.get("replValue@"+itemDomId).toString())
- Double.parseDouble(itemMap.get("sretValue@"+itemDomId).toString()); - Double.parseDouble(itemMap.get("sretValue@"+itemDomId).toString());
valueXmlString.append("<op_value>").append("<![CDATA["+getRequiredDecimal(openingValue, 2)+"]]>").append("</op_value>"); valueXmlString.append("<op_value>").append("<![CDATA["+getRequiredDecimal(openingValue, 3)+"]]>").append("</op_value>");
valueXmlString.append("<sales_value>").append("<![CDATA["+ getRequiredDecimal(salesValueCal,2)+"]]>").append("</sales_value>"); valueXmlString.append("<sales_value>").append("<![CDATA["+ getRequiredDecimal(salesValueCal,3)+"]]>").append("</sales_value>");
valueXmlString.append("<cl_value>").append("<![CDATA[0]]>").append("</cl_value>"); valueXmlString.append("<cl_value>").append("<![CDATA[0]]>").append("</cl_value>");
...@@ -4100,11 +4105,12 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4100,11 +4105,12 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
System.out.println("repl value>>>>>>"+Double.parseDouble(itemMap.get("replValue@"+itemDomId).toString())); System.out.println("repl value>>>>>>"+Double.parseDouble(itemMap.get("replValue@"+itemDomId).toString()));
System.out.println("free value>>>>>>"+Double.parseDouble(itemMap.get("freeValue@"+itemDomId).toString())); System.out.println("free value>>>>>>"+Double.parseDouble(itemMap.get("freeValue@"+itemDomId).toString()));
System.out.println("sret value>>>>>>"+Double.parseDouble(itemMap.get("sretValue@"+itemDomId).toString())); System.out.println("sret value>>>>>>"+Double.parseDouble(itemMap.get("sretValue@"+itemDomId).toString()));
grosSalesValueCal= getRequiredDcml(Double.parseDouble(itemMap.get("mopStk@"+itemDomId).toString())*Double.parseDouble(itemMap.get("oldRateOrg@"+itemDomId).toString()),2) grosSalesValueCal= getRequiredDcml(Double.parseDouble(itemMap.get("mopStk@"+itemDomId).toString())*Double.parseDouble(itemMap.get("oldRateOrg@"+itemDomId).toString()),3)
+Double.parseDouble(itemMap.get("rcpValue@"+itemDomId).toString()) +Double.parseDouble(itemMap.get("rcpValue@"+itemDomId).toString())
+Double.parseDouble(itemMap.get("replValue@"+itemDomId).toString()) +Double.parseDouble(itemMap.get("replValue@"+itemDomId).toString())
+Double.parseDouble(itemMap.get("freeValue@"+itemDomId).toString()) +Double.parseDouble(itemMap.get("freeValue@"+itemDomId).toString())
-Double.parseDouble(itemMap.get("sretValue@"+itemDomId).toString()); -Double.parseDouble(itemMap.get("sretValue@"+itemDomId).toString());
grosSalesValueCal= getRequiredDcml(grosSalesValueCal,3);
System.out.println("grosSalesValueCal>>>>"+grosSalesValueCal); System.out.println("grosSalesValueCal>>>>"+grosSalesValueCal);
if(grossSecondaryQty>0) if(grossSecondaryQty>0)
...@@ -4116,7 +4122,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4116,7 +4122,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
grossSecondaryRateCal=0; grossSecondaryRateCal=0;
} }
valueXmlString.append("<rate__org>").append("<![CDATA["+getRequiredDecimal(grossSecondaryRateCal, 2)+"]]>").append("</rate__org>"); valueXmlString.append("<rate__org>").append("<![CDATA["+getRequiredDecimal(grossSecondaryRateCal, 3)+"]]>").append("</rate__org>");
valueXmlString.append("<sales__org>").append("<![CDATA["+(long)Math.round(Double.parseDouble(itemMap.get("salesOrg@"+itemDomId).toString()))+"]]>").append("</sales__org>"); valueXmlString.append("<sales__org>").append("<![CDATA["+(long)Math.round(Double.parseDouble(itemMap.get("salesOrg@"+itemDomId).toString()))+"]]>").append("</sales__org>");
valueXmlString.append("</Detail3>"); valueXmlString.append("</Detail3>");
...@@ -4317,6 +4323,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4317,6 +4323,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
formulaValue=formulaValue-formulaValue; formulaValue=formulaValue-formulaValue;
System.out.println("closing value>>>>"+closingValue); System.out.println("closing value>>>>"+closingValue);
} }
closingValue=getRequiredDcml(closingValue,3);
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -4344,6 +4351,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4344,6 +4351,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
rateAll = discmn.pickRate(priceList,sysDate,itemCode1,conn); rateAll = discmn.pickRate(priceList,sysDate,itemCode1,conn);
System.out.println("rateAll>>>>>"+rateAll); System.out.println("rateAll>>>>>"+rateAll);
closingValue=closingValue+formulaValue*rateAll; closingValue=closingValue+formulaValue*rateAll;
closingValue=getRequiredDcml(closingValue,3);
} }
if(clStock>0) if(clStock>0)
...@@ -4353,6 +4361,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4353,6 +4361,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
{ {
closingRate=0.0; closingRate=0.0;
} }
closingRate=getRequiredDcml(closingRate,3);
System.out.println("closingRate@@@@@@@@@"+closingRate); System.out.println("closingRate@@@@@@@@@"+closingRate);
grossSecondaryQty=opStkDom+rcpQtmDom+rcpReplQtmDom+rcpFreeQtmDom-retQtyDom-clStock; grossSecondaryQty=opStkDom+rcpQtmDom+rcpReplQtmDom+rcpFreeQtmDom-retQtyDom-clStock;
...@@ -4385,7 +4394,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4385,7 +4394,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
System.out.println("closingValue>>>>>>>"+closingValue);*/ System.out.println("closingValue>>>>>>>"+closingValue);*/
//grossClosingValue=grossClosingRate*clStock; //grossClosingValue=grossClosingRate*clStock;
netSecondarySalesValue=(opStkDom*rateOld)+rcpValue+replValue-retValue-closingValue; netSecondarySalesValue=(opStkDom*rateOld)+rcpValue+replValue-retValue-closingValue;
netSecondarySalesValue=getRequiredDcml(netSecondarySalesValue,3);
System.out.println("netSecondarySalesValue>>>>>>>"+netSecondarySalesValue); System.out.println("netSecondarySalesValue>>>>>>>"+netSecondarySalesValue);
/*secondaryQty=opStkDom+rcpQtmDom+rcpReplQtmDom-retQtyDom-clStock; /*secondaryQty=opStkDom+rcpQtmDom+rcpReplQtmDom-retQtyDom-clStock;
System.out.println("secondaryQty>>>>"+secondaryQty); System.out.println("secondaryQty>>>>"+secondaryQty);
...@@ -4393,6 +4402,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4393,6 +4402,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
System.out.println("netSecondaryRate>>>"+netSecondaryRate);*/ System.out.println("netSecondaryRate>>>"+netSecondaryRate);*/
grossSecondarySalesValue=(opStkDom*rateOrgOld)+rcpValue+replValue+rcpFreeValue-retValue-closingValue; grossSecondarySalesValue=(opStkDom*rateOrgOld)+rcpValue+replValue+rcpFreeValue-retValue-closingValue;
grossSecondarySalesValue=getRequiredDcml(grossSecondarySalesValue,3);
System.out.println("rcpFreeValue>>>>"+rcpFreeValue); System.out.println("rcpFreeValue>>>>"+rcpFreeValue);
System.out.println("grossSecondarySalesValue>>>>"+grossSecondarySalesValue); System.out.println("grossSecondarySalesValue>>>>"+grossSecondarySalesValue);
System.out.println("grossSecondaryQty>>>>"+grossSecondaryQty); System.out.println("grossSecondaryQty>>>>"+grossSecondaryQty);
...@@ -4405,6 +4415,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4405,6 +4415,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
{ {
grossSecondaryRate=0.0; grossSecondaryRate=0.0;
} }
grossSecondaryRate=getRequiredDcml(grossSecondaryRate,3);
System.out.println("grossSecondaryRate>>>"+grossSecondaryRate); System.out.println("grossSecondaryRate>>>"+grossSecondaryRate);
//End by chandrashekar on 29-dec-2015 //End by chandrashekar on 29-dec-2015
salesQtyCal = opStkDom + (rcpQtmDom + rcpReplQtmDom) - (retQtyDom + retQtyFreeDom) - clStock; salesQtyCal = opStkDom + (rcpQtmDom + rcpReplQtmDom) - (retQtyDom + retQtyFreeDom) - clStock;
...@@ -4420,14 +4431,14 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4420,14 +4431,14 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
if(!Double.isNaN(closingRate)) if(!Double.isNaN(closingRate))
{ {
/*valueXmlString.append("<rate>").append("<![CDATA[" + getRequiredDecimal(netSecondaryRate,2) + "]]>").append("</rate>");*/ /*valueXmlString.append("<rate>").append("<![CDATA[" + getRequiredDecimal(netSecondaryRate,2) + "]]>").append("</rate>");*/
valueXmlString.append("<rate>").append("<![CDATA[" + getRequiredDecimal(closingRate,2) + "]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[" + getRequiredDecimal(closingRate,3) + "]]>").append("</rate>");
}else }else
{ {
valueXmlString.append("<rate>").append("<![CDATA[0]]>").append("</rate>"); valueXmlString.append("<rate>").append("<![CDATA[0]]>").append("</rate>");
} }
if(!Double.isNaN(grossSecondaryRate)) if(!Double.isNaN(grossSecondaryRate))
{ {
valueXmlString.append("<rate__org>").append("<![CDATA[" + getRequiredDecimal(grossSecondaryRate,2) + "]]>").append("</rate__org>"); valueXmlString.append("<rate__org>").append("<![CDATA[" + getRequiredDecimal(grossSecondaryRate,3) + "]]>").append("</rate__org>");
}else }else
{ {
valueXmlString.append("<rate__org>").append("<![CDATA[0]]>").append("</rate__org>"); valueXmlString.append("<rate__org>").append("<![CDATA[0]]>").append("</rate__org>");
...@@ -4442,15 +4453,15 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal, ...@@ -4442,15 +4453,15 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
} }
if(!Double.isNaN(closingValue)) if(!Double.isNaN(closingValue))
{ {
valueXmlString.append("<cl_value>").append("<![CDATA[" + getRequiredDcml(closingValue,2) + "]]>").append("</cl_value>"); valueXmlString.append("<cl_value>").append("<![CDATA[" + getRequiredDcml(closingValue,3) + "]]>").append("</cl_value>");
} }
if(!Double.isNaN(netSecondarySalesValue)) if(!Double.isNaN(netSecondarySalesValue))
{ {
valueXmlString.append("<sales_value>").append("<![CDATA[" + getRequiredDcml(netSecondarySalesValue,2) + "]]>").append("</sales_value>"); valueXmlString.append("<sales_value>").append("<![CDATA[" + getRequiredDcml(netSecondarySalesValue,3) + "]]>").append("</sales_value>");
} }
if(!Double.isNaN(opStkDom*rateOld)) if(!Double.isNaN(opStkDom*rateOld))
{ {
valueXmlString.append("<op_value>").append("<![CDATA[" + getRequiredDcml((opStkDom*rateOld),2) + "]]>").append("</op_value>"); valueXmlString.append("<op_value>").append("<![CDATA[" + getRequiredDcml((opStkDom*rateOld),3) + "]]>").append("</op_value>");
} }
valueXmlString.append("</Detail3>\r\n"); valueXmlString.append("</Detail3>\r\n");
......
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