From d9c96ec48760db68c99b317ee85fbcc1b09f8262 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 14 Apr 2022 17:10:14 +1200 Subject: [PATCH] Remove unused function --- CRM/Core/BAO/FinancialTrxn.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/CRM/Core/BAO/FinancialTrxn.php b/CRM/Core/BAO/FinancialTrxn.php index b26a125333..41b43eb3b6 100644 --- a/CRM/Core/BAO/FinancialTrxn.php +++ b/CRM/Core/BAO/FinancialTrxn.php @@ -191,29 +191,6 @@ LIMIT 1;"; return self::getFinancialTrxnId($contributionID, 'DESC', FALSE, " AND cft.status_id = $refundStatusID"); } - /** - * Given an entity_id and entity_table, check for corresponding entity_financial_trxn and financial_trxn record. - * @todo This should be moved to separate BAO for EntityFinancialTrxn when we start adding more code for that object. - * - * @param int $entity_id - * Id of the entity usually the contactID. - * - * @return array - * array of category id's the contact belongs to. - * - */ - public static function getFinancialTrxnTotal($entity_id) { - $query = " - SELECT (ft.amount+SUM(ceft.amount)) AS total FROM civicrm_entity_financial_trxn AS ft -LEFT JOIN civicrm_entity_financial_trxn AS ceft ON ft.financial_trxn_id = ceft.entity_id -WHERE ft.entity_table = 'civicrm_contribution' AND ft.entity_id = %1 - "; - - $sqlParams = [1 => [$entity_id, 'Integer']]; - return CRM_Core_DAO::singleValueQuery($query, $sqlParams); - - } - /** * Given an financial_trxn_id check for previous entity_financial_trxn. * -- 2.25.1