src/main/java/com/teamunify/i18n/I.java
public static String longToCurrencyString(long amount, boolean bCurrencySign) {
    int scale = getCurrencyFractionDigits();
    int divisor = scale > 0 ? (int) Math.pow(10, scale) : 1;
    BigDecimal b = new BigDecimal(amount);
    b = b.divide(new BigDecimal(divisor), scale, RoundingMode.HALF_UP);
    return numberToCurrencyString(b, bCurrencySign);
  }
/**
   * Assume that the input is an integer that has been multiplied by a power of 10 sufficient to not lose data. E.g. for
   * the US, this would be dollars * 100.
   * <p/>
   * This function properly divides the integer, and then formats it as a currency.
   * <p/>
   * <b>IMPORTANT</b>: Make sure you convert the <i>amount</i> of the currency, as needed. E.g. You stored dollars, but
   * are showing a value in Euros. This funciton assumes the amount is in the correct, current, locale money unit.
   *
   * @param amount The amount of money, as stored in an long (e.g. as cents)
   * @return A number that has be correctly divided to have the right number of fractional digits.
   */
Assume that the input is an integer that has been multiplied by a power of 10 sufficient to not lose data.

@param amount The amount of money, as stored in an long
@return A number that has be correctly divided to have the right number of fractional digits.
Assume that the input is an integer that has been multiplied by a power of 10 sufficient to not lose data . @param amount The amount of money as stored in an long @return A number that has be correctly divided to have the right number of fractional digits .
public static String longToCurrencyString(long amount, boolean bCurrencySign) {
    int scale = getCurrencyFractionDigits();
    int divisor = scale > 0 ? (int) Math.pow(10, scale) : 1;
    BigDecimal b = new BigDecimal(amount);
    b = b.divide(new BigDecimal(divisor), scale, RoundingMode.HALF_UP);
    return numberToCurrencyString(b, bCurrencySign);
  }
public static String longToCurrencyString ( long amount , boolean bCurrencySign ) { int scale = getCurrencyFractionDigits ( ) ; int divisor = scale > 0 ? ( int ) Math . pow ( 10 , scale ) : 1 ; BigDecimal b = new BigDecimal ( amount ) ; b = b . divide ( new BigDecimal ( divisor ) , scale , RoundingMode . HALF_UP ) ; return numberToCurrencyString ( b , bCurrencySign ) ; }
Assume that the input is an integer that has been multiplied by a power of 10 sufficient to not lose data.
Assume that the input is an integer that has been multiplied by a power of 10 sufficient to not lose data .