Commit fc119b23 authored by kshinde's avatar kshinde

Rate not setting properly Bug Fix


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105330 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a9934e4e
...@@ -2671,7 +2671,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -2671,7 +2671,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
if(siteCodeShip!=null) if(siteCodeShip!=null)
{ {
minQty=distCommon.getIntegralQty("", itemCode, siteCodeShip, conn); minQty=distCommon.getIntegralQty("", itemCode, siteCodeShip, conn)
} }
else else
{ {
...@@ -9741,6 +9741,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9741,6 +9741,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
mPriceList = checkNull(genericUtility.getColumnValue("price_list", dom1)); mPriceList = checkNull(genericUtility.getColumnValue("price_list", dom1));
lsItemFlg = checkNull(genericUtility.getColumnValue("item_flg", dom)); lsItemFlg = checkNull(genericUtility.getColumnValue("item_flg", dom));
lsNature = checkNull(genericUtility.getColumnValue("nature", dom)); lsNature = checkNull(genericUtility.getColumnValue("nature", dom));
Double quantity=Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity", dom)));
System.out.print("Quantity1++++++++"+quantity);
if ("F".equalsIgnoreCase(lsNature) || "B".equalsIgnoreCase(lsNature) || "S".equalsIgnoreCase(lsNature)) if ("F".equalsIgnoreCase(lsNature) || "B".equalsIgnoreCase(lsNature) || "S".equalsIgnoreCase(lsNature))
{ {
...@@ -9749,7 +9751,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -9749,7 +9751,8 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
{ {
if (mPriceList != null && mPriceList.trim().length() > 0) if (mPriceList != null && mPriceList.trim().length() > 0)
{ {
mRate = distCommon.pickRate(mPriceList, lrdateStr, lsItemCodeOrd, conn); mRate = distCommon.pickRate(mPriceList, lrdateStr, lsItemCodeOrd,"","L",quantity, conn);
System.out.print("mrate inside item 752++++++++"+mRate);
} }
if (mPriceList != null && mPriceList.trim().length() > 0) if (mPriceList != null && mPriceList.trim().length() > 0)
{ {
...@@ -10068,7 +10071,11 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -10068,7 +10071,11 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
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); Double quantity= Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity", dom)));
System.out.print("Quantity2 mrateClg++++++++"+quantity);
mRateClg = distCommon.pickRate(mPriceList, lrdateStr, lsItemCode,"","L",quantity, conn);
System.out.print("mRateClg++++++++"+mRateClg);
lsListType = distCommon.getPriceListType(mPriceListClg, conn); lsListType = distCommon.getPriceListType(mPriceListClg, conn);
...@@ -12153,10 +12160,13 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12153,10 +12160,13 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
else else
{ {
mPriceListClg = checkNull(genericUtility.getColumnValue("price_list__clg", dom1)); mPriceListClg = checkNull(genericUtility.getColumnValue("price_list__clg", dom1));
Double quantity = Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity", dom)));
System.out.print("Quantity3++++++++"+quantity);
System.out.println("mPriceListClg rate "+lsListType); System.out.println("mPriceListClg rate "+lsListType);
if (mPriceListClg != null && mPriceListClg.trim().length() > 0) if (mPriceListClg != null && mPriceListClg.trim().length() > 0)
{ {
mRateClg = distCommon.pickRate(mPriceListClg, ldtDateStr, mItem, "", "L", conn); mRateClg = distCommon.pickRate(mPriceListClg, ldtDateStr, mItem, "", "L",quantity, conn);
System.out.print("mRateClg gbfICRATE++++++++"+mRateClg);
} }
lsListType = distCommon.getPriceListType(mPriceListClg, conn); lsListType = distCommon.getPriceListType(mPriceListClg, conn);
System.out.println("lsListType"+lsListType); System.out.println("lsListType"+lsListType);
...@@ -12462,7 +12472,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12462,7 +12472,9 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
if (lsPriceList != null || lsPriceList.trim().length() > 0) if (lsPriceList != null || lsPriceList.trim().length() > 0)
{ {
mRate = distCommon.pickRate(lsPriceList, ldtDateStr, lsItemCodeOrd,"","L", conn); mRate = distCommon.pickRate(lsPriceList, ldtDateStr, lsItemCodeOrd,"","L",mQty, conn);
System.out.print("mRate gbfICquantity++++++++"+mRate);
System.out.print("mqty++++++++"+mQty);
} }
lsListType = distCommon.getPriceListType(lsPriceList, conn); lsListType = distCommon.getPriceListType(lsPriceList, conn);
...@@ -13010,9 +13022,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -13010,9 +13022,15 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
// } // }
} }
} }
System.out.println("mqty comment"+mQty);
System.out.println("lcRate comment"+lcRate);
if(lcRate<0)
{
lcRate=0;
}
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)));
......
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