From d5ac6cb5d41ab5f238b39bf89832ab619a8796bd Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 1 Feb 2007 07:18:50 +0000 Subject: [PATCH] * [ 1649453 ] bomQtyAvailable sqlj function throw ArithmeticException --- sqlj/src/org/compiere/sqlj/Product.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sqlj/src/org/compiere/sqlj/Product.java b/sqlj/src/org/compiere/sqlj/Product.java index a9b8d62404..834d612e7e 100644 --- a/sqlj/src/org/compiere/sqlj/Product.java +++ b/sqlj/src/org/compiere/sqlj/Product.java @@ -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;