Skip to Content
Menu
This question has been flagged
2 Replies
2268 Views

Hello Everyone,

 how to cut down 2 digits after decimal,there actually in default  it display many digits.

For example:

if value is 42.566666666 it will be cut down as 42,57

if value is 481.0000 then it should displayed as 481,00

Please help me to resolve this situation.


Avatar
Discard

can you provide your mail template syntax/code ?

Best Answer

Hello,

See if below works in your case for amounting format.

<strong>${format_amount(object.amount_total, object.pricelist_id.currency_id)}</strong>

Thanks



Avatar
Discard
Best Answer

You can try using random function of python:

a = 42.566666666
b = "%.2f" % round(a, 2)
print(b)

O/p: 42.57

Avatar
Discard