From 106f4f2d8957051621d792522247dd33442aee83 Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Mon, 30 Sep 2013 15:52:24 +0530 Subject: [PATCH] CRM-13472 fix for - the total number of amount and count didn't matched with its corresponding search result because the receive date value varied in sql queries for both cases ---------------------------------------- * CRM-13472: Contribution Dashboard "Table Layout" query inaccurate http://issues.civicrm.org/jira/browse/CRM-13472 --- CRM/Contribute/Page/DashBoard.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Page/DashBoard.php b/CRM/Contribute/Page/DashBoard.php index ec6591b2b6..8e70cd0192 100644 --- a/CRM/Contribute/Page/DashBoard.php +++ b/CRM/Contribute/Page/DashBoard.php @@ -69,8 +69,12 @@ class CRM_Contribute_Page_DashBoard extends CRM_Core_Page { $now = $yearNow; } + // appending end date i.e $now with time + // to also calculate records of end date till mid-night + $nowWithTime = $now . '235959'; + foreach ($status as $s) { - ${$aName}[$s] = CRM_Contribute_BAO_Contribution::getTotalAmountAndCount($s, $$dName, $now); + ${$aName}[$s] = CRM_Contribute_BAO_Contribution::getTotalAmountAndCount($s, $$dName, $nowWithTime); ${$aName}[$s]['url'] = CRM_Utils_System::url('civicrm/contribute/search', "reset=1&force=1&status=1&start={$$dName}&end=$now&test=0" ); -- 2.25.1