This topic is locked

total rounding

9/10/2008 6:50:20 AM
PHPRunner General questions
G
garethp authorDevClub member

Hi
I have a problem of a total field.
The field only contains 2 decimal places but the total is diplayed differently - the value field is calculated after an inline edit d in an inline edit - the field is a double type.
value

line 0.73

total 0.7315
If you then click refresh the problem is solved to...

value

line 0.73

total 0.73
This is used for accounting purposes and therefore after the inline edit I need the total to be displayed to 2 decimal places also after the inline edit and not need to refresh every time.
Any help would be greatly appreciated.
Gareth

G
garethp authorDevClub member 9/10/2008

solved by rounding in the calculation first - round(number,2) for those who don;t know