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

Contribution Search - Total Amount and Avg Amount in Search Results are Incorrect

    Details

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

      Description

      The Total Amount and passed to the template ($total_amount - from Contribution/Form/Search.php) reflects on the rows in the current page. This causes the calculated Avg Amount to be incorrect (since it divides total_amount by total rows in result-set).

      We should modify the query so that it selects SUM(civicrm_contribution.total_amount) AS search_total_amount, assign that to the tpl and modify templates/CRM/Contribute/Page/ContributionTotals.tpl to use $search_total_amount instead of $total_amount. We could also get search_avg_amount from the query, rather than doing the division in the tpl file.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: