Examples of movePointLeft()


Examples of java.math.BigDecimal.movePointLeft()

                parsed = true;
            } catch (NumberFormatException e) {
            }

            if (parsed) {
                price = price.movePointLeft(2);
                trans.modifyPrice(sku, price);

                // re-calc tax
                trans.calcTax();
            }
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

                BigDecimal amt = ZERO;
                String amountStr = input.value();
                if (UtilValidate.isNotEmpty(amountStr)) {
                    try {
                        amt = new BigDecimal(amountStr);
                        amt = amt.movePointLeft(2);
                    } catch (NumberFormatException e)
                    {
                        Debug.logError(e, module);
                    }
                }
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

            String lastValue = input.value();
            if (UtilValidate.isNotEmpty(lastValue)) {

                try {
                    BigDecimal amt = new BigDecimal(lastValue);
                    amt = amt.movePointLeft(2);
                    lastValue = amt.toString();
                } catch (NumberFormatException e) {
                    Debug.logError(e, module);
                }
                if (UtilValidate.isNotEmpty(func[1])) {
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

        if (null != mapInOut.get("amount")) {
            String amount = (String) mapInOut.get("amount");
            BigDecimal amt = ZERO;
            try {
                amt = new BigDecimal(amount);
                amt = amt.movePointLeft(2);
            } catch (NumberFormatException e) {
                Debug.logError(e, module);
                return;
            }
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

                if (s instanceof CDRInputStream) {
                    o = ((CDRInputStream)s).read_fixed(typeCode.fixed_digits(),
                                                                typeCode.fixed_scale());
                } else {
                    BigDecimal bigDecimal = s.read_fixed();
                    o = bigDecimal.movePointLeft((int)typeCode.fixed_scale());
                }
            } catch (BadKind badKind) { // impossible
            }
            break;
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

    public static BigDecimal getDecimalValue(int value) {
        if (value < 0 || value > 100) {
            throw new IllegalArgumentException("Value is not between 0 and 100 but is " + value);
        }
        BigDecimal tmpValue = new BigDecimal(value);
        return tmpValue.movePointLeft(2);
    }

    /**
     * Returns an integer value between 0 and 100 from the given value, which must be comprised between 0 and 1
     *
 
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

    // Initial x - use double root - multiply by halfBack to unshift - set new scale
    BigDecimal x = new BigDecimal( "" + root, nMC );
    x = x.multiply( halfBack, nMC );                          // x0 ~ sqrt()
    if ( scale != 0 ) {
      x = x.movePointLeft( scale );
    }

    if ( prec < nInit ) // for prec 15 root x0 must surely be OK
    {
      return x.round( rootMC );        // return small prec roots without iterations
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

                parsed = true;
            } catch (NumberFormatException e) {
            }

            if (parsed) {
                price = price.movePointLeft(2);
                trans.modifyPrice(sku, price);

                // re-calc tax
                trans.calcTax();
            }
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

                BigDecimal amt = ZERO;
                String amountStr = input.value();
                if (UtilValidate.isNotEmpty(amountStr)) {
                    try {
                        amt = new BigDecimal(amountStr);
                        amt = amt.movePointLeft(2);
                    } catch (NumberFormatException e)
                    {
                        Debug.logError(e, module);
                    }
                }
View Full Code Here

Examples of java.math.BigDecimal.movePointLeft()

            String lastValue = input.value();
            if (UtilValidate.isNotEmpty(lastValue)) {

                try {
                    BigDecimal amt = new BigDecimal(lastValue);
                    amt = amt.movePointLeft(2);
                    lastValue = amt.toString();
                } catch (NumberFormatException e) {
                    Debug.logError(e, module);
                }
                if (UtilValidate.isNotEmpty(func[1])) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.