Currency prefix/postfix

Hi,
is there any way to change the position of currency sign from prefix to postfix?
Here “€ 100,00” is wrong and “100,00 €” is correct.
Thanks,
Matej

3 Likes

Hello Matej,

Sorry as this is not configurable for now. Can you please create Github Issue for it?

@nabinhait any chance we could do it in the Print Format?

Hello Umair

Same request than Matej, currency position with possible selection prefix or postfix should be a great feature typically in countries wherein the currency should clearly highligthed after a long number ie 250.000.000,00 CFA

One point around currency : CFA currency (for central Africa area ‘Gabon, Congo’ is missing in the installation currency list.

Hope you will add the currency CFA in your installation package and currency position prefix/postfix feature in the future upgrade

Regards

Hi,

I have the same problem with this. Can ERPNext developer team show where to modify the code for this prefix / postfix in Frappe source code? I look around but still not found the position of code.

@Tai_Tran1 You can take a look at format_currency for formatting on web pages

function format_currency(v, currency, decimals) {
	var format = get_number_format(currency);
	var symbol = get_currency_symbol(currency);
	if(decimals === undefined) {
		decimals = frappe.boot.sysdefaults.currency_precision || null;
	}

	if (symbol)
		return symbol + " " + format_number(v, format, decimals);
	else
		return format_number(v, format, decimals);
}

and fmt_money for prints

...
	if currency and frappe.defaults.get_global_default("hide_currency_symbol") != "Yes":
		symbol = frappe.db.get_value("Currency", currency, "symbol") or currency
		amount = symbol + " " + amount

	return amount

number_format.js, data.py

3 Likes

Great! It take a lot of my effort to look for this code :slight_smile: