Displaying $ sign before the total
keysar7 - April 1, 2007 - 01:07
| Project: | Views Calc |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
I have a column sum displayed properly and all (fantastic module KarenS, and suggestion JohnG!).
I changed the word "Sum" to "Total" successfully in the .module file... However, I need to also display a $ sign next to the number itself... Any suggestions?

#1
I created a patch to add support for:
- formatting numbers
- prefix
- suffix
#2
The patch is great. Unfortunately it's tacking on the .00 to the end of the amount instead of adding the decimal in two spots in.
ie 27058 become 27058.00 instead of 270.58.
UPDATE:
checked the code in the patch, and I realize it's formatted for the cck number.module. I'm using the Money module.
views_calc totals everything properly but ignores the decimal, so i'm left with 2 numbers on the end that should be behind a decimal. For whatever reason, views_calc, isn't handling the money.module properly. I'll post that as a bug.
I've updated the patch to have 2 options for the 9,999.99 section. One that has that standard handling, and one that moves the decimal over 2 places. Not the ideal way of fixing the problem, but it does the job.
I also added converted spaces to non-breaking spaces in the prefix and suffix as they sometimes would be broken onto other lines.
I have not uploaded the updated patch here as this is a quick and dirty fix for the money issue, and not the actual solution. If it doesn't get fixed however, and you are interested, let me know.
#3
#4
hi
i'm interested to format in € do you want help me?
the submitted patch return me blank screen not work!
thanks!
sorry for my bad english...
#5
i find a error in line 122
= array('' => '');
change in
$options = array('' => '');
thanks!
#6
This has become old and needs reworking.