示例#1
0
 /**
  * Set Movement Qty - enforce Product UOM
  *
  * @param MovementQty
  */
 public void setMovementQty(BigDecimal MovementQty) {
   MProduct product = getProduct();
   if (MovementQty != null && product != null) {
     int precision = product.getUOMPrecision();
     MovementQty = MovementQty.setScale(precision, BigDecimal.ROUND_HALF_UP);
   }
   super.setMovementQty(MovementQty);
 } //	setMovementQty
示例#2
0
 /**
  * Set Qty Ordered - enforce Product UOM
  *
  * @param QtyOrdered
  */
 @Override
 public void setQtyOrdered(BigDecimal QtyOrdered) {
   MProduct product = getProduct();
   if (QtyOrdered != null && product != null) {
     int precision = product.getUOMPrecision();
     QtyOrdered = QtyOrdered.setScale(precision, BigDecimal.ROUND_HALF_UP);
   }
   super.setQtyOrdered(QtyOrdered);
 } // setQtyOrdered