projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd364ea
)
dev/core#2009 filter grant dashboard to exclude trashed contacts
author
Brian Shaughnessy
<brian@lcdservices.biz>
Thu, 10 Sep 2020 19:10:09 +0000
(15:10 -0400)
committer
Brian Shaughnessy
<brian@lcdservices.biz>
Thu, 10 Sep 2020 19:10:09 +0000
(15:10 -0400)
CRM/Grant/BAO/Grant.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Grant/BAO/Grant.php
b/CRM/Grant/BAO/Grant.php
index d38aeb5c41b418a384ce37a5452e899516c12e05..e203d546f5585b0b371fe3a7441603de8d5eb630 100644
(file)
--- a/
CRM/Grant/BAO/Grant.php
+++ b/
CRM/Grant/BAO/Grant.php
@@
-25,8
+25,13
@@
class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant {
*/
public static function getGrantSummary($admin = FALSE) {
$query = "
- SELECT status_id, count(id) as status_total
- FROM civicrm_grant GROUP BY status_id";
+ SELECT status_id, count(g.id) as status_total
+ FROM civicrm_grant g
+ JOIN civicrm_contact c
+ ON g.contact_id = c.id
+ WHERE c.is_deleted = 0
+ GROUP BY status_id
+ ";
$dao = CRM_Core_DAO::executeQuery($query);