Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,372
    • Issues 1,372
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • CiviCRM 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
Time tracking