Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,008
    • Issues 1,008
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • Core
  • Issues
  • #2344

Closed
Open
Created Jan 31, 2021 by Chabadrichmond@Chabadrichmond

Error creating thank you letter with multiple contributions.

Overview: I'm creating a custom thank you following the instructions here

https://docs.civicrm.org/user/en/latest/contributions/manual-receipts-and-thank-yous/

However the {contribution.total_amount} token is causing an error saying

Invalid currency "USD****~~~~USD****~~~~USD****~~~~USD****~~~~USD"

This is happening when setting grouping to contact and there are multiple contributions.

I tested this on D7 and WP sites with civi 5.31 or before and it worked fine but when using civi 5.32 and later (including the Dmaster and WPmaster demo's I am getting this error.

So it seems to be something relatively new causing this.

Same issue can be found on SE at https://civicrm.stackexchange.com/questions/38540/invalid-currency-error-when-using-custom-template

Reproduction steps

  1. Select multiple contributions from same contact in find contribution.
  2. selected send thank you letters.
  3. Put the token {contribution.total_amount} into the thank you letter and set grouping to contact (so that it groups multiple transactions into one letter)
  4. Error shown above is shown and no letter is created.

Current behavior

I get an error saying Invalid currency "USD****~~~~USD****~~~~USD****~~~~USD****~~~~USD" when trying to create a thank you letter with multiple transactions from the same contact.

Expected behaviour

Letter should be created.

Environment information -->

  • __CiviCRM: Error seems to have started from version 5.32 and onward. Tested on versions prior to and up to 5.31 and it went fine.
  • __CMS:Drupal Tested on WP and D7
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
5.34.0
Milestone
5.34.0
Assign milestone
Time tracking
None
Due date
None