Why print format cannot showing currency format style

  1. I just create new Print Format with full custom Html & Css. But why the {{doc.total}} cannot generate format currency.


    In my expectation is “Rp 101.617”

  2. In the “In Words” i also custom to replace word “only/in bahasa is saja” to “Rupiah” and word “IDR” to “(empty)” but after i click “Print” the preview still showing IDR and only.

Thankyou for your help

Hi,

Please use as follows:

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

Thanks,

Divyesh M.

Oke its Work. Thankyou Divyesh.

Maybe you know regarding number two too?

To remove one specific word from a string in Jinja2, you can use the replace filter. Here’s a general example of how you would remove a word from a text:

jinja

Copy code

{{ text_variable | replace('word_to_remove', '') }}

Example:

If you want to remove the word “remove” from a sentence:

jinja

Copy code

{{ "This is the word to remove from the text" | replace('remove', '') }}

This will output:

vbnet

Copy code

This is the word to  from the text

If you want to ensure there are no extra spaces left, you could use the replace filter to remove an additional space:

jinja

Copy code

{{ text_variable | replace('word_to_remove ', '') }}

This will remove both the word and the space after it.

In Print Format custom form or where is the code i would to custom that?

Hi,

You can use this Jinja code in Print Format.

Thanks,

Divyesh Mangroliya