CRM-14085 - wrong syntax on inner join for contribution report
authorDonald A. Lobo <lobo@civicrm.org>
Wed, 29 Jan 2014 22:11:24 +0000 (14:11 -0800)
committerDonald A. Lobo <lobo@civicrm.org>
Wed, 29 Jan 2014 22:11:24 +0000 (14:11 -0800)
http://issues.civicrm.org/jira/browse/CRM-14085

CRM/Report/Form/Member/ContributionDetail.php

index 442c6f856c8a9b3b0767934a970d65f3608b8035..e3aefcf087fb58dc01445e7f5a46841d1ec70cf1 100644 (file)
@@ -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);