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”.
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.
@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?
The currency symbol inside the field can be determined by the option field property of the field. I did not find any other way.
Except to use fmt_money which is python based or to use frappe.utils.fmt_money which is jinja based.
I tried to use frappe.utils.fmt_money in .js file but it did not work. I tried this: frappe.utils.fmt_money(doc.outstanding_amount, currency="LBP"); But it is not working in javascript.
Is there a method to be used with javascript?
I added @Denmark_Del_Puso because he used frappe.utils.fmt_money in jinja in this link:
this is not working for me.
I tried to use the “Fetch from” option in the field definition of the field of type Currency linking to the field which links to DocType Currency. Now I do see a currency symbol, but the numeric input control for the currency value is disabled.
I cannot clearly understand how you did it but I suspect the reason the field is read-only is because the ‘Fetch on Save if Empty’ checkbox is unchecked. Check it and you should be able to input values into the field.
I see.
Remove the fetch and instead add the field name of the field that links to currency(Wahrung) in the options field of the currency amount field.(See image: undo what is crossed in red & add wahrung as the value in Options)
Assumption: the fieldname for the field labelled ‘Wahrung’ is wahrung