* [ 1649453 ] bomQtyAvailable sqlj function throw ArithmeticException
This commit is contained in:
parent
09bc99eabb
commit
d5ac6cb5d4
|
@ -341,8 +341,10 @@ public class Product
|
||||||
// Get Rounding Precision
|
// Get Rounding Precision
|
||||||
int uomPrecision = getUOMPrecision(M_ProductBOM_ID);
|
int uomPrecision = getUOMPrecision(M_ProductBOM_ID);
|
||||||
// How much can we make with this product
|
// How much can we make with this product
|
||||||
productQuantity = productQuantity.setScale(uomPrecision)
|
//hengsin, [ 1649453 ] bomQtyAvailable sqlj function throw ArithmeticException
|
||||||
.divide(bomQty, uomPrecision, BigDecimal.ROUND_HALF_UP);
|
//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
|
// How much can we make overall
|
||||||
if (productQuantity.compareTo(quantity) < 0)
|
if (productQuantity.compareTo(quantity) < 0)
|
||||||
quantity = productQuantity;
|
quantity = productQuantity;
|
||||||
|
|
Loading…
Reference in New Issue