diff --git a/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java b/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java index 55f0fa943..c4459f34c 100644 --- a/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java +++ b/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java @@ -55,11 +55,23 @@ public class NumberUtil { } public static String displayCurrency(final BigDecimal value, final IEssentials ess) { - return tl("currency", ess.getSettings().getCurrencySymbol(), formatAsPrettyCurrency(value)); + String currency = formatAsPrettyCurrency(value); + String sign = ""; + if (value.signum() < 0) { + currency = currency.substring(1); + sign = "-"; + } + return sign + tl("currency", ess.getSettings().getCurrencySymbol(), currency); } public static String displayCurrencyExactly(final BigDecimal value, final IEssentials ess) { - return tl("currency", ess.getSettings().getCurrencySymbol(), value.toPlainString()); + String currency = value.toPlainString(); + String sign = ""; + if (value.signum() < 0) { + currency = currency.substring(1); + sign = "-"; + } + return sign + tl("currency", ess.getSettings().getCurrencySymbol(), currency); } public static boolean isInt(final String sInt) {