|
|
|
@ -52,7 +52,7 @@ fun Double.formatted(): String { |
|
|
|
|
|
|
|
|
|
|
|
fun Double.toCurrency(currency: Currency? = null): String { |
|
|
|
fun Double.toCurrency(currency: Currency? = null): String { |
|
|
|
|
|
|
|
|
|
|
|
val currencyFormatter = NumberFormat.getCurrencyInstance(currency?.locale ?: Locale.getDefault()) |
|
|
|
val currencyFormatter = NumberFormat.getCurrencyInstance(Locale.getDefault()) |
|
|
|
currency?.let { |
|
|
|
currency?.let { |
|
|
|
currencyFormatter.currency = currency |
|
|
|
currencyFormatter.currency = currency |
|
|
|
} |
|
|
|
} |
|
|
|
|