svn commit: r783244 - /ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r783244 - /ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy

jacopoc
Author: jacopoc
Date: Wed Jun 10 07:41:11 2009
New Revision: 783244

URL: http://svn.apache.org/viewvc?rev=783244&view=rev
Log:
Set number of decimals for sell-through data.

Modified:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy?rev=783244&r1=783243&r2=783244&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ComputeProductSellThroughData.groovy Wed Jun 10 07:41:11 2009
@@ -17,6 +17,9 @@
  * under the License.
  */
 
+import java.math.MathContext;
+
+
 if (parameters.fromDateSellThrough) {
     Timestamp fromDate = null;
     Timestamp thruDate = null;
@@ -29,6 +32,6 @@
         inventoryShippedForSalesResult = dispatcher.runSync("countProductInventoryShippedForSales", [productId : productId, facilityId : facilityId, fromDate : fromDate, thruDate : thruDate, userLogin : userLogin]);
         context.sellThroughInitialInventory = inventoryCountResult.quantityOnHandTotal;
         context.sellThroughInventorySold = inventoryShippedForSalesResult.quantityOnHandTotal;
-        context.sellThroughPercentage = inventoryShippedForSalesResult.quantityOnHandTotal / inventoryCountResult.quantityOnHandTotal * 100;
+        context.sellThroughPercentage = new BigDecimal(inventoryShippedForSalesResult.quantityOnHandTotal / inventoryCountResult.quantityOnHandTotal * 100, new java.math.MathContext(2));
     }
 }