Commit d823cf67 authored by steurwadkar's avatar steurwadkar

Changes made for Group scheme in Sales Order html wizard screen

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@179915 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 225b6a1a
...@@ -620,8 +620,8 @@ public class SorderAct extends ActionHandlerEJB implements SorderActLocal, Sorde ...@@ -620,8 +620,8 @@ public class SorderAct extends ActionHandlerEJB implements SorderActLocal, Sorde
System.out.println("Total Purchased Item for Scheme Type 2 is "+itemCodeListScheme.size()); System.out.println("Total Purchased Item for Scheme Type 2 is "+itemCodeListScheme.size());
if(itemCodeListScheme.size() > 0) if(itemCodeListScheme.size() > 0)
{ {
double purcAmt = 0.0; double xmlQty = 0.0;
for(int cntr=0; cntr<itemCodeListScheme.size();cntr++) /*for(int cntr=0; cntr<itemCodeListScheme.size();cntr++)
{ {
double xmlQty = 0.0; double xmlQty = 0.0;
itemCodeSchm = itemCodeListScheme.get(cntr); itemCodeSchm = itemCodeListScheme.get(cntr);
...@@ -629,23 +629,32 @@ public class SorderAct extends ActionHandlerEJB implements SorderActLocal, Sorde ...@@ -629,23 +629,32 @@ public class SorderAct extends ActionHandlerEJB implements SorderActLocal, Sorde
xmlQty = itemQuantityMap.get(itemCodeSchm); xmlQty = itemQuantityMap.get(itemCodeSchm);
freeItemListApplcbleType2.add(itemCodeSchm); freeItemListApplcbleType2.add(itemCodeSchm);
purcAmt += (finRate * xmlQty); purcAmt += (finRate * xmlQty);
}*/
for(int cntr=0; cntr<itemCodeListScheme.size();cntr++)
{
itemCodeSchm = itemCodeListScheme.get(cntr);
xmlQty += itemQuantityMap.get(itemCodeSchm);
freeItemListApplcbleType2.add(itemCodeSchm);
} }
if(itemQuantityMap.containsKey(itemCodeSchm)) if(itemQuantityMap.containsKey(itemCodeSchm))
{ {
double xmlQty = itemQuantityMap.get(itemCodeSchm); //double xmlQty = itemQuantityMap.get(itemCodeSchm);
finRate = itemRateMap.get(itemCodeSchm); finRate = itemRateMap.get(itemCodeSchm);
System.out.println("Applicable Rate for Scheme Type 2 is ==["+finRate+"]"+"Quantity in XML is ::["+xmlQty+"]" + "\t" +"Purchased Items ["+itemCodeSchm+"]"+ "Quantity Applicable for Scheme is ::["+purcBase+"]"); System.out.println("Applicable Rate for Scheme Type 2 is ==["+finRate+"]"+"Quantity in XML is ::["+xmlQty+"]" + "\t" +"Purchased Items ["+itemCodeSchm+"]"+ "Quantity Applicable for Scheme is ::["+purcBase+"]");
if(purcAmt >= purcBase) if(xmlQty >= purcBase)
{ {
//double freeQty = (int)(xmlQty / purcBase); System.out.println("freeQty is ::["+freeQty+"]"); //double freeQty = (int)(xmlQty / purcBase); System.out.println("freeQty is ::["+freeQty+"]");
//freeQty = freeQty * schAllowence1; //freeQty = freeQty * schAllowence1;
//Added by sarita on 2FEB2018 //Added by sarita on 2FEB2018
//double chargedQty = (finRate * xmlQty); //double chargedQty = (finRate * xmlQty);
int freeQty = (int) ((purcAmt * schAllowence1)/purcBase); //int freeQty = (int) ((purcAmt * schAllowence1)/purcBase);
System.out.println("purcAmt ["+purcAmt+"]" + "freeQty ["+freeQty+"]"); double freeQty = (xmlQty / purcBase); System.out.println("freeQty is ::["+freeQty+"]");
freeQty = freeQty * schAllowence1;
System.out.println("xmlQty ["+xmlQty+"]" + "freeQty ["+freeQty+"]");
System.out.println("Items Applicable for Free Schemes :::"+itemCodeSchm + "free quantity"+(int)freeQty); System.out.println("Items Applicable for Free Schemes :::"+itemCodeSchm + "free quantity"+(int)freeQty);
freeItemListApplcbleType2.add(itemCodeSchm); freeItemListApplcbleType2.add(itemCodeSchm);
itemValues = getItemCode(freeItemListApplcbleType2); itemValues = getItemCode(freeItemListApplcbleType2);
...@@ -913,8 +922,8 @@ public class SorderAct extends ActionHandlerEJB implements SorderActLocal, Sorde ...@@ -913,8 +922,8 @@ public class SorderAct extends ActionHandlerEJB implements SorderActLocal, Sorde
valueXmlString.append("<item_code>").append("<![CDATA[").append(item_Code).append("]]>").append("</item_code>\r\n"); valueXmlString.append("<item_code>").append("<![CDATA[").append(item_Code).append("]]>").append("</item_code>\r\n");
//valueXmlString.append("<item_code__ord>").append("<![CDATA[").append(item_Code).append("]]>").append("</item_code__ord>\r\n"); //valueXmlString.append("<item_code__ord>").append("<![CDATA[").append(item_Code).append("]]>").append("</item_code__ord>\r\n");
//valueXmlString.append("<item_code__ord>").append("<![CDATA[").append(item_Code).append("]]>").append("</item_code__ord>\r\n"); //valueXmlString.append("<item_code__ord>").append("<![CDATA[").append(item_Code).append("]]>").append("</item_code__ord>\r\n");
//valueXmlString.append("<item_descr>").append("<![CDATA[").append(itemDescription).append("]]>").append("</item_descr>\r\n"); valueXmlString.append("<item_descr>").append("<![CDATA[").append(itemDescription).append("]]>").append("</item_descr>\r\n");
valueXmlString.append("<item_descr>").append("<![CDATA[").append(schemeDescr).append("]]>").append("</item_descr>\r\n"); valueXmlString.append("<scheme_descr>").append("<![CDATA[").append(schemeDescr).append("]]>").append("</scheme_descr>\r\n");
valueXmlString.append("<free_quantity>").append("<![CDATA[").append(freeQty).append("]]>").append("</free_quantity>\r\n"); valueXmlString.append("<free_quantity>").append("<![CDATA[").append(freeQty).append("]]>").append("</free_quantity>\r\n");
valueXmlString.append("<discount>").append("<![CDATA[").append(discount).append("]]>").append("</discount>\r\n"); valueXmlString.append("<discount>").append("<![CDATA[").append(discount).append("]]>").append("</discount>\r\n");
valueXmlString.append("<nature>").append("<![CDATA[").append(nature).append("]]>").append("</nature>\r\n"); valueXmlString.append("<nature>").append("<![CDATA[").append(nature).append("]]>").append("</nature>\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