[ 1965015 ] Posting not balanced when is producing more than 1 produc

Fix a rounding problem found
This commit is contained in:
Carlos Ruiz 2008-07-18 03:46:07 +00:00
parent f3c01a4356
commit 1e41bbd864
1 changed files with 1 additions and 2 deletions

View File

@ -194,8 +194,7 @@ public class Doc_Production extends Doc
if (line.getQty() != mpp.getProductionQty()) {
// if the line doesn't correspond with the whole qty produced then apply prorate
// costs = costs * line_qty / production_qty
costs = costs.multiply(line.getQty(),
new MathContext(as.getCostingPrecision(), RoundingMode.valueOf(BigDecimal.ROUND_HALF_UP)));
costs = costs.multiply(line.getQty());
costs = costs.divide(mpp.getProductionQty(), as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
}
}