Related to issue 38459: Use currency standard precision instead of costing precision
authorAlvaro Ferraz <alvaro.ferraz@openbravo.com>
Wed, 09 May 2018 13:30:44 +0200
changeset 33940 a8dc1bea4612
parent 33939 94997b80fc70
child 33941 2be7d3efe606
child 34560 7fe4457d0237
Related to issue 38459: Use currency standard precision instead of costing precision
src/org/openbravo/costing/AverageAlgorithm.java
--- a/src/org/openbravo/costing/AverageAlgorithm.java	Wed May 09 12:25:30 2018 +0200
+++ b/src/org/openbravo/costing/AverageAlgorithm.java	Wed May 09 13:30:44 2018 +0200
@@ -143,7 +143,7 @@
     cost.setQuantity(transaction.getMovementQuantity());
     cost.setTotalMovementQuantity(currentStock.add(transaction.getMovementQuantity()));
     cost.setTotalStockValuation(currentValuedStock.add(trxCost.setScale(costCurrency
-        .getCostingPrecision().intValue(), RoundingMode.HALF_UP)));
+        .getStandardPrecision().intValue(), RoundingMode.HALF_UP)));
     if (transaction.getMovementQuantity().signum() == 0) {
       cost.setPrice(newCost);
     } else {