phpr 5.3 build 7474
I have a decimal field in my db, type = decimal(9,2)
If I setup Editor: View as: Number = 2
Field shows up ok with 2 decimal places. I also require font to be red if > .01.
So I do custom Editor: View as: Custom
if ($value>0)
$color="red";
else
$color="black";
$value="<font color='$color'>$value</font>";
Now my decimal places no longer show up. Number is 1 instead of 1.00.
I tried:
if ($value>0)
$color="red";
else
$color="black";
$value="<font color='$color'>$value</font>";
number_format($value,2);
It does work ok, however the TOTAL for total of col is not showing decimal places. what is solution? for grand total col at bottom of col for two decimals?
If I choose View As: Number with 2 decimals: TOTAL for col is proper, however color font format does not work.
thank you for all answers.