Set number of decimals for sell-through data.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@783244 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+4
-1
@@ -17,6 +17,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import java.math.MathContext;
|
||||
|
||||
|
||||
if (parameters.fromDateSellThrough) {
|
||||
Timestamp fromDate = null;
|
||||
Timestamp thruDate = null;
|
||||
@@ -29,6 +32,6 @@ if (parameters.fromDateSellThrough) {
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user