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.