From 65fd91eada52109bd7c387111dd0bcc2fed996c0 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Wed, 29 Jan 2014 14:11:24 -0800 Subject: [PATCH] CRM-14085 - wrong syntax on inner join for contribution report http://issues.civicrm.org/jira/browse/CRM-14085 --- CRM/Report/Form/Member/ContributionDetail.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Report/Form/Member/ContributionDetail.php b/CRM/Report/Form/Member/ContributionDetail.php index 442c6f856c..e3aefcf087 100644 --- a/CRM/Report/Form/Member/ContributionDetail.php +++ b/CRM/Report/Form/Member/ContributionDetail.php @@ -631,11 +631,12 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form { INSERT INTO civireport_membership_contribution_detail (contribution_id, contact_id, membership_id) SELECT contribution.id, contact.id, m.id FROM civicrm_contribution contribution - INNER JOIN civicrm_contact contact {$this->_aclFrom} + INNER JOIN civicrm_contact contact ON contact.id = contribution.contact_id AND contribution.is_test = 0 - LEFT JOIN civicrm_membership_payment mp + {$this->_aclFrom} + LEFT JOIN civicrm_membership_payment mp ON contribution.id = mp.contribution_id - LEFT JOIN civicrm_membership m + LEFT JOIN civicrm_membership m ON mp.membership_id = m.id AND m.is_test = 0 "; CRM_Core_DAO::executeQuery($fillTemp); -- 2.25.1