From 800f0fd3b0d99783ffffb0344b6ae064b7e2f558 Mon Sep 17 00:00:00 2001 From: Klaas Eikelboom Date: Wed, 28 Dec 2016 18:10:51 -0500 Subject: [PATCH] Added Left joins to show refunds CRM-19803 --- CRM/Contribute/BAO/Contribution.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 7e20ab4e55..1a3c47e6e4 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4076,9 +4076,9 @@ WHERE eft.financial_trxn_id IN ({$trxnId}, {$baseTrxnId['financialTrxnId']}) LEFT JOIN civicrm_entity_financial_trxn eft ON (eft.entity_id = con.id AND eft.entity_table = 'civicrm_contribution') INNER JOIN civicrm_financial_trxn ft ON ft.id = eft.financial_trxn_id AND ft.to_financial_account_id != %2 - INNER JOIN civicrm_entity_financial_trxn ef ON (ef.financial_trxn_id = ft.id AND ef.entity_table = 'civicrm_financial_item') + LEFT JOIN civicrm_entity_financial_trxn ef ON (ef.financial_trxn_id = ft.id AND ef.entity_table = 'civicrm_financial_item') LEFT JOIN civicrm_financial_item fi ON fi.id = ef.entity_id - INNER JOIN civicrm_financial_account fa ON fa.id = fi.financial_account_id + LEFT JOIN civicrm_financial_account fa ON fa.id = fi.financial_account_id WHERE con.id = %1 AND ft.is_payment = 1 GROUP BY ft.id"; -- 2.25.1