Currency format to remove cent

Hi,

i wonder how i can remove the cent in my currecy…

floating percise is minimum 2?..why there is no 0?

I had been tried to set it to format #.### but the cent still showed…

thanks

@bobzz_zone I can help you with print-format.

Can you please explain me two things?

  1. Currently what is showing in Print e.g. $ 958.00
  2. What you want to show in print e.g $ 958

For setting float precision you can refer( but this not provide to set 0 precision)
https://kb.erpnext.com/kb/customize/set-precision-for-float-currency-and-percent-fields

i want it to be displayed IDR 2.000 instead of IDR 2.000,00
and i want it in both print format and the document in the web as well

do i need to changes the codes ?

thanks

This is quick fix for printing
You can use which is more accurate to your business use case.
{{ doc.get_formatted(“grand_total”, doc) | replace(“,00”, “”) }}

{{ ‘{:20,.0f}’.format(doc.grand_total) }}

{{ ‘IDR 2.000,00’ | replace(“,00”, “”) }}

For document, you will need to modify number format code
https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/misc/number_format.js#L61

HI

in my case i used “#,###” there should be already percission 0 and there is no decimal_str … what should i do?

thanks