Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-6391

Subsequent calls to CRM_Utils_Rule::cleanMoney() misrepresent the cleaned value

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Blocker
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.5
    • Fix Version/s: 3.1.6, 3.2
    • Component/s: CiviContribute, CiviMember
    • Labels:
      None

      Description

      1. Make sure you have a locale with thousand delimiter set to a dot (like pl_PL) via locale -a.
      2. Switch your monetary locale to that value.
      3. Edit two event fees, one to 40,00 and the other to 12,34
      4. Test drive both events.

      Result: civicrm_participant.fee_amount values are right in both cases, but civicrm_contribution.fee_amount values are 40.00 (right) and 12.34 (wrong).

      This is because if the thousand delimiter is a dot, the first call changes 12,34 to 12.34 and the second call turns it into 1234

        Attachments

          Activity

            People

            • Assignee:
              shot Piotr Szotkowski
              Reporter:
              shot Piotr Szotkowski
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: