* [ 1649453 ] bomQtyAvailable sqlj function throw ArithmeticException

This commit is contained in:
Heng Sin Low 2007-02-01 07:18:50 +00:00
parent 09bc99eabb
commit d5ac6cb5d4
1 changed files with 4 additions and 2 deletions

View File

@ -341,8 +341,10 @@ public class Product
// Get Rounding Precision
int uomPrecision = getUOMPrecision(M_ProductBOM_ID);
// How much can we make with this product
productQuantity = productQuantity.setScale(uomPrecision)
.divide(bomQty, uomPrecision, BigDecimal.ROUND_HALF_UP);
//hengsin, [ 1649453 ] bomQtyAvailable sqlj function throw ArithmeticException
//productQuantity = productQuantity.setScale(uomPrecision)
// .divide(bomQty, uomPrecision, BigDecimal.ROUND_HALF_UP);
productQuantity = productQuantity.divide(bomQty, uomPrecision, BigDecimal.ROUND_HALF_UP);
// How much can we make overall
if (productQuantity.compareTo(quantity) < 0)
quantity = productQuantity;