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

CRM_Contribute_BAO_Contribution::getSoftContributionTotals() returns formatted currency string (should return float)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.2
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      CRM_Contribute_BAO_Contribution::getSoftContributionTotals() returns a formatted currency string. This makes it very difficult to use for anything other than printing. Formatting the value into a Money format should be done at the template level.

      NOTE: We need to pass the currency from the related contribution records into the template so total and average are properly formatted. This breaks down if the soft contributions for a given contact are in > 1 currency. However, this problem existed prior to this change (since we are grabbing a single SUM and AVG aggregate).

        Attachments

          Activity

            People

            • Assignee:
              sushant Sushant Paste
              Reporter:
              mrfelton Tom Kirkpatrick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: