From: Tyrell Cook Date: Fri, 27 Mar 2015 22:12:55 +0000 (-0400) Subject: Fixed errors with CRM-16107 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=94e8ea9e7e557817394580f4fad40211fd56bf91;p=civicrm-core.git Fixed errors with CRM-16107 --- diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index 44e48000ac..7863ea057c 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -532,17 +532,19 @@ ORDER BY cv.label $this->_from .= " LEFT JOIN civicrm_line_item line_item_civireport ON line_item_civireport.entity_table = 'civicrm_participant' AND - line_item_civireport.entity_id = {$this->_aliases['civicrm_participant']}.id + line_item_civireport.entity_id = {$this->_aliases['civicrm_participant']}.id AND + line_item_civireport.qty > 0 "; } if ($this->_balance) { $this->_from .= " LEFT JOIN civicrm_entity_financial_trxn eft - ON (eft.entity_id = contribution_civireport.id) + 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_trxn ft - ON (ft.id = eft.financial_trxn_id AND eft.entity_table = 'civicrm_contribution') AND (ft.from_financial_account_id = fa.id) + ON (ft.id = eft.financial_trxn_id AND eft.entity_table = 'civicrm_contribution') AND + (ft.to_financial_account_id != fa.id) "; } }