From dd9db60b33c3143bebc564ced11482e6e2ce46e9 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 3 May 2015 20:47:35 +1200 Subject: [PATCH] CRM-16367 (Backoffice Contribution Form) remove pointless check & add comment --- CRM/Contribute/Form/Contribution.php | 4 +--- CRM/Core/BAO/FinancialTrxn.php | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index db3c4427e2..58dceac36c 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -1714,9 +1714,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP if (empty($params['non_deductible_amount'])) { $contributionType = new CRM_Financial_DAO_FinancialType(); $contributionType->id = $params['financial_type_id']; - if (!$contributionType->find(TRUE)) { - CRM_Core_Error::fatal('Could not find a system table'); - } + if ($contributionType->is_deductible) { if (isset($formValues['product_name'][0])) { diff --git a/CRM/Core/BAO/FinancialTrxn.php b/CRM/Core/BAO/FinancialTrxn.php index f6cfc85918..4b4424026e 100644 --- a/CRM/Core/BAO/FinancialTrxn.php +++ b/CRM/Core/BAO/FinancialTrxn.php @@ -314,6 +314,13 @@ WHERE ceft.entity_id = %1"; /** * Create financial transaction for premium. * + * @param array $params + * - oldPremium + * - financial_type_id + * - contributionId + * - isDeleted + * - cost + * - currency */ public static function createPremiumTrxn($params) { if ((empty($params['financial_type_id']) || empty($params['contributionId'])) && empty($params['oldPremium'])) { -- 2.25.1