CRM-17305 - Fix handling of processor fees in Participant Listing report.
authorDave Greenberg <dave@civicrm.org>
Tue, 13 Oct 2015 22:06:54 +0000 (15:06 -0700)
committerDave Greenberg <dave@civicrm.org>
Tue, 13 Oct 2015 22:06:54 +0000 (15:06 -0700)
----------------------------------------
* CRM-17305: Contribution fees are affecting reporting of total paid and balanace
  https://issues.civicrm.org/jira/browse/CRM-17305

CRM/Report/Form/Event/ParticipantListing.php

index 3be767c3547c25b2fe325c30ba4a0feed3f58653..e985c2f92729a0452cc4f9855c2bf533938a4418 100644 (file)
@@ -543,9 +543,12 @@ ORDER BY  cv.label
                   ON (eft.entity_id = {$this->_aliases['civicrm_contribution']}.id)
             LEFT JOIN civicrm_financial_account fa
                   ON (fa.account_type_code = 'AR')
+            LEFT JOIN civicrm_financial_account fae
+                  ON (fae.account_type_code = 'EXP')
             LEFT JOIN civicrm_financial_trxn ft
                   ON (ft.id = eft.financial_trxn_id AND eft.entity_table = 'civicrm_contribution') AND
-                     (ft.to_financial_account_id != fa.id)
+                     (ft.to_financial_account_id != fa.id) AND
+                     (ft.to_financial_account_id != fae.id)
       ";
     }
   }