SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
577 stars 348 forks source link

Rock Default Contribution Statement Template has deprecated CurrencySymbol Lava #5969

Closed bmurphy-dev closed 2 months ago

bmurphy-dev commented 2 months ago

Description

The Rock Default statement template is still using the deprecated CurrencySymbol and not using the current | FormatAsCurrency filter. Most churches use this Rock Default template as a basis for their initial custom templates by copy/pasting the code here as a starting point. Here is the initial migration that inserted this new statement template. Correcting this Rock Default template will require a new migration with these code changes --> Here is a diff of the code needed in the migration What's kind of odd is that this was being deprecated the same time this new template system was being issue in v12.4 on the move to v13 according to the Technical Release Notes Changelog.

Currency - 4/15/2021 A new "OrganizationStandardCurrencyCode" global attribute has been implemented (and is used by the FormatAsCurrency Lava filter, as such usage of the older "CurrencySymbol" global attribute is now deprecated starting with v13. Use the CurrencyBox.Value property when setting the value of a currency (not the .Text property). It will also handle formatting the currency symbol as needed.

Actual Behavior

The amount fields rendered in the statements do not format correctly with , thousands separators. Example of fields missing the separators: image

Expected Behavior

The lava in this Rock Default template be up to current standards and display currency values in a sensible manner.

Steps to Reproduce

Issue Confirmation

Rock Version

v13.0 and up

Client Culture Setting

en-US

bmurphy-dev commented 2 months ago

I'm sure this also affects the actual currency symbol depending on an instance's culture settings but someone else would have to test that.

PraveenMathew92 commented 2 months ago

We have updated the template in v16.7 of Rock as part of the commit: https://github.com/SparkDevNetwork/Rock/commit/caa324780c061fb9b286bb62b592192e723b299c