How to use get_formatted to format date

Hello,

in a template, I need to format an amount. I am using

{{ doc.get_formatted("total") }}

However, that way the number is formatted with decimals… format defined in currency is not taken into account.

I tried

 {{ doc.get_formatted("rounded_total", frappe.db.get_value("Currency", doc.currency, "number_format")) }}

But it does not work.

Regards
Jaime

I created an example Jinja2 file here - in it are several different number formats (with comments) which might be useful