How to format Currency?

how to format the docfield into currency in print format.

my problem is my docfield is Read only to another doctype.

1 Like

this is my print format

image

Hi @Denmark_Del_Puso,

in your print format html code, you can use the following Jinja syntax:

{{ doc.get_formatted('grand_total') }} 

Enter your field and it will format it accordingly. This requires the field to be defined as β€œCurrency” (see DocType/Customization).

Hope this helps.

5 Likes

hi!

@lasalesi thanks for your response, ill try your code but it doesnt work.

my COST($) is Read Only from another doctype and i think thats the reason why i cannot format.

1 Like

You can try

{{ frappe.utils.fmt_money(doc.cost,currency=β€œ$”) }}

6 Likes

hi!

@magic-overflow thankyou it works

{{ frappe.utils.fmt_money(doc.cost,currency=β€œ$”) }}

1 Like

you may closed this topic