Help

5

What is the syntax to round numbers in the email templates?

Avatar
Josh Stover

For sales orders, purchase orders, and invoice emails the total amount doesn't round to 2 digits each time like it should. We are sending invoices that indicate a dollar value of $1,000.1 is owed for instance instead of $1,000.10 which would be the proper format.

What is the appropriate syntax to edit these templates to get the rounding correct? I've set up the decimal accuracy already but that doesn't fix this. I've tried round() and formatLang() inside the {$ } but that isn't working.

Thanks!

2 Comments
Avatar
Discard
Avatar
Helen Hoffman
-

I have this same issue - anyone figure out how to get the 2 decimal places to show? It shows correctly in the actual invoice but not in the email template... Thanks!

Avatar
Andreas Marpmann
-

I have this same issue, also in official screen shots.

1 Answer
0
Avatar
subbarao
Best Answer

you can try this

${format_amount(object.amount_total, object.currency_id)}

Avatar
Discard