Hi,
I've got a field that I'm trying to calculate tax on and then display. This is the template tag I'm using...
<% Price * 1.125 %>
but what I want to do is get it to round the result to two decimal places using these rules:
1. If the 3rd number after decimal point is 4 or below, it rounds the result down.
2. If the 3rd number after decimal point is 5 or above, it rounds the result up.
Can anyone help me out with how? It's sounding like a global job as I'm not sure if it's something that can be done in the templates.
Thanks
Regan.
I've got a field that I'm trying to calculate tax on and then display. This is the template tag I'm using...
<% Price * 1.125 %>
but what I want to do is get it to round the result to two decimal places using these rules:
1. If the 3rd number after decimal point is 4 or below, it rounds the result down.
2. If the 3rd number after decimal point is 5 or above, it rounds the result up.
Can anyone help me out with how? It's sounding like a global job as I'm not sure if it's something that can be done in the templates.
Thanks
Regan.