[ 2530003 ] It is not rolling up correctly the lower level costs
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2530003&group_id=176962 Fixing precision issues.
This commit is contained in:
parent
ec11810ad2
commit
332822670d
|
@ -167,10 +167,11 @@ public class MPPProductBOMLine extends X_PP_Product_BOMLine
|
||||||
*/
|
*/
|
||||||
public BigDecimal getQty(boolean includeScrapQty)
|
public BigDecimal getQty(boolean includeScrapQty)
|
||||||
{
|
{
|
||||||
final int precision = getPrecision();
|
int precision = getPrecision();
|
||||||
BigDecimal qty;
|
BigDecimal qty;
|
||||||
if (isQtyPercentage())
|
if (isQtyPercentage())
|
||||||
{
|
{
|
||||||
|
precision += 2;
|
||||||
qty = getQtyBatch().divide(Env.ONEHUNDRED, precision, RoundingMode.HALF_UP);
|
qty = getQtyBatch().divide(Env.ONEHUNDRED, precision, RoundingMode.HALF_UP);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -186,7 +187,7 @@ public class MPPProductBOMLine extends X_PP_Product_BOMLine
|
||||||
//
|
//
|
||||||
if (qty.scale() > precision)
|
if (qty.scale() > precision)
|
||||||
{
|
{
|
||||||
qty = qty.setScale(getPrecision(), RoundingMode.HALF_UP);
|
qty = qty.setScale(precision, RoundingMode.HALF_UP);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
return qty;
|
return qty;
|
||||||
|
|
Loading…
Reference in New Issue