CRM-15374 - adjust query in getPaymentInfo to prevent extraneous fee-related rows...
authorDave Greenberg <dave@civicrm.org>
Tue, 7 Oct 2014 17:25:56 +0000 (10:25 -0700)
committerDave Greenberg <dave@civicrm.org>
Tue, 7 Oct 2014 17:25:56 +0000 (10:25 -0700)
----------------------------------------
* CRM-15374:
  https://issues.civicrm.org/jira/browse/CRM-15374

CRM/Contribute/BAO/Contribution.php

index fde8e741e67d224f747121fe397a66556b3fa19e..5c9dc2d9b98cb8aac74782630413ebc74c52a0b8 100644 (file)
@@ -3409,7 +3409,7 @@ WHERE eft.financial_trxn_id IN ({$trxnId}, {$baseTrxnId['financialTrxnId']})
 SELECT ft.total_amount, con.financial_type_id, ft.payment_instrument_id, ft.trxn_date, ft.trxn_id, ft.status_id, ft.check_number
 FROM civicrm_contribution con
   LEFT JOIN civicrm_entity_financial_trxn eft ON (eft.entity_id = con.id AND eft.entity_table = 'civicrm_contribution')
-  LEFT JOIN civicrm_financial_trxn ft ON ft.id = eft.financial_trxn_id AND ft.to_financial_account_id != {$feeFinancialAccount}
+  INNER JOIN civicrm_financial_trxn ft ON ft.id = eft.financial_trxn_id AND ft.to_financial_account_id != {$feeFinancialAccount}
 WHERE con.id = {$contributionId}
 ";