src/main/java/com/teamunify/i18n/I.java
public static long currencyStringToLong(String amount, long defaultValue) {
    Number n = currencyStringToNumber(amount, new Long(defaultValue));
    int scale = getCurrencyFractionDigits();
    int multiple = scale > 0 ? (int) Math.pow(10, scale) : 1;
    BigDecimal b = new BigDecimal(n.toString());
    return b.multiply(new BigDecimal(multiple)).longValue();
  }
/**
   * Take a string that represents a currency amount (with or without the currency symbol), mulitplies it by the correct
   * power of 10 to push the fractional digits into an integer form, and returns the result as a long.
   * <p/>
   * E.g. In US: 100.34 -> 10034<br/>
   * In France/Germany: 100,34 -> 10034<br/>
   * etc.<br/>
   * <p/>
   * <b>This function is quite tolerant of user input</b>, and will accept anything that is "normal" when writing a
   * currency in that locale.
   * <p/>
   * <pre>
   * // locale is en
   * I.currencyStringToLong(&quot;$1,345.66&quot;, 0L); // returns 134566
   * I.currencyStringToLong(&quot;1345.66&quot;, 0L); // returns 134566
   * // locale is fr
   * I.currencyStringToLong(&quot;1 345,66&quot;, 0L); // returns 134566
   * I.currencyStringToLong(&quot;1345.66 &amp;euro&quot;, 0L); // returns 134566
   * </pre>
   *
   * @param amount       The string representing a user-input amount of currency.
   * @param defaultValue The value to return if the parsing fails.
   * @return A long, multiplied by the correct power of 10 for the current fractional storage for the currency.
   */
Take a string that represents a currency amount (with or without the currency symbol), mulitplies it by the correct
power of 10 to push the fractional digits into an integer form, and returns the result as a long.

@param amount       The string representing a user-input amount of currency.
@param defaultValue The value to return if the parsing fails.
@return A long, multiplied by the correct power of 10 for the current fractional storage for the currency.
Take a string that represents a currency amount ( with or without the currency symbol ) mulitplies it by the correct power of 10 to push the fractional digits into an integer form and returns the result as a long . @param amount The string representing a user - input amount of currency . @param defaultValue The value to return if the parsing fails . @return A long multiplied by the correct power of 10 for the current fractional storage for the currency .
public static long currencyStringToLong(String amount, long defaultValue) {
    Number n = currencyStringToNumber(amount, new Long(defaultValue));
    int scale = getCurrencyFractionDigits();
    int multiple = scale > 0 ? (int) Math.pow(10, scale) : 1;
    BigDecimal b = new BigDecimal(n.toString());
    return b.multiply(new BigDecimal(multiple)).longValue();
  }
public static long currencyStringToLong ( String amount , long defaultValue ) { Number n = currencyStringToNumber ( amount , new Long ( defaultValue ) ) ; int scale = getCurrencyFractionDigits ( ) ; int multiple = scale > 0 ? ( int ) Math . pow ( 10 , scale ) : 1 ; BigDecimal b = new BigDecimal ( n . toString ( ) ) ; return b . multiply ( new BigDecimal ( multiple ) ) . longValue ( ) ; }
Take a string that represents a currency amount (with or without the currency symbol), mulitplies it by the correct
 power of 10 to push the fractional digits into an integer form, and returns the result as a long.
Take a string that represents a currency amount ( with or without the currency symbol ) mulitplies it by the correct power of 10 to push the fractional digits into an integer form and returns the result as a long .