ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

How to show currency Symbol inside the field


#1

Can anyone please show me how to add the currncy symbol in a currency field?

I have tried add a field labeled “Currncy” and set it as a link field and put “Currency” inside the option. After that , I put “currency” inside the option for those fields I want to set this “currency”. I can see those fields will show this Currency Symbol if they are in list view.

But what i want is to to show the currency symbol within the field whose type had been set to “Currency”.


#2

@Terry,

Set the fieldtype as Currency the frappe framework will automatically render the currency symbol before the value.

Thanks


#3

@makarand_b, thanks for the reply.

All the fields has been set field type currncy. But the currency symbol is not showing.


#4

@Terry,

Did you try reloading & clearing cache after changing the fieldtype ?


#5

I am not sure if the below information is helping or not.

In the item master, i added some custom fields which are used to calculate the item cost and suggested selling price. Those field are set to filed type “currency”.
For the costing part, i want to set it in euro, and for the suggested price, i want to set it in USD.


#6

@makarand_b, yes I did reload.
The currency field just showing the number with 2 decimals, but no symbol.


#7

Have you submitted the document ?


#8

@Terry In Global Defaults, check if you have selected No for Hide Currency Symbol.


#9

@Pawan. Thanks, I am working on the Item master, there is no “Summit” botton but i did saved. The symbol still not showing up after saved.

@KanchanChauhan, Thanks, I have checked that “Hide Currency Symbol” is set to “No” is the Global Defaults".

Another question, If i have two price lists, one is for buying and one is for selling, they are using different currency, lets say, buying is using Euro, and selling is using USD. Is there something i need to type in for the option field or write custom script?


#10

No you should be fine. No need to add any script.


#11

@KanchanChauhan, sorry for keep asking silly question. but how to set field is A use currency Euro and set field B use USD?


#12

I think that you should also need to set the Symbol for the currency.
For instance I set “TL” in desk#Form/Currency/TRY
image


#13

Hello @Terry
Was you able to find solution on below:

but how to set field is A use currency Euro and set field B use USD?

Regards
Bilal


Change Currency Docfield Symbol
#15

Hi Bilal,

check out fmt_money

To find code that calls that method try this search:

frappe@ubuntu:~/frappe-bench$ find . -name '*.py' | xargs grep fmt_money

fmt_money is called here for eg