CRM-13472 fix for - the total number of amount and count didn't matched with its...
authorPratik Joshi <pratik.joshi@webaccess.co.in>
Mon, 30 Sep 2013 10:22:24 +0000 (15:52 +0530)
committerPratik Joshi <pratik.joshi@webaccess.co.in>
Mon, 30 Sep 2013 10:22:24 +0000 (15:52 +0530)
----------------------------------------
* CRM-13472: Contribution Dashboard "Table Layout" query inaccurate
  http://issues.civicrm.org/jira/browse/CRM-13472

CRM/Contribute/Page/DashBoard.php

index ec6591b2b6aacb4b687f208a076e1f9d35095fb1..8e70cd0192e18dfe2f2ae41c877fd120bed16f6c 100644 (file)
@@ -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"
         );