Patch: adds the ability to choose the number of decimal places to round results to
| Project: | Views Calc |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Hi,
Please consider this patch for inclusion in the next release. It adds some config options to the Views Calc Table display settings. We needed to do it for a client. Overview of changes:
1. Moves "Calculations" field to a fieldset, so the UI does not become too cluttered
2. Adds a new fieldset called "Round result"
3. Provides a text box (validated to ensure it is a number) for Sum, Average, Minimum and Maximum rounding options
4. Alters themed output of Sum and Average type calculations in the display to respect the new settings
Please see attached PNG for a screenshot (though just a note, the checkbox interface was trialled but was too fiddly to work back in in sensible time, so reverted to current select list UI).
Patch definitely applies to 6.x-1.3 and should apply to 6.x-dev too.
If you do commit this, please credit Pascal Morin - he wrote it:
http://drupal.org/user/320744
| Attachment | Size |
|---|---|
| views_calc_rounding.png | 63.87 KB |
| patch_views_calc_round_result.patch | 4.06 KB |

#1
Excellent patch! Exactly what I needed!