From 6ef0e9c0bb4c76492253148ef478c6740a830981 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 5 Feb 2021 15:42:57 +1300 Subject: [PATCH] [REF] use financial_type_id from getTemplateContribution (which already has handling) The removed code is already incorporated into getTemplateContribution and has test cover in testRepeatTransactionPassedInFinancialType --- CRM/Contribute/BAO/Contribution.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 3b1c15b868..cc46162c2c 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2484,15 +2484,7 @@ LEFT JOIN civicrm_contribution contribution ON ( componentPayment.contribution_ $input['line_item'] = $contributionParams['line_item'] = $templateContribution['line_item']; $contributionParams['status_id'] = 'Pending'; - if (isset($contributionParams['financial_type_id']) && count($input['line_item']) === 1) { - // We permit the financial type to be overridden for single line items. - // More comments on this are in getTemplateTransaction. - $contribution->financial_type_id = $contributionParams['financial_type_id']; - } - else { - $contributionParams['financial_type_id'] = $templateContribution['financial_type_id']; - } - foreach (['contact_id', 'currency', 'source', 'amount_level', 'address_id', 'on_behalf', 'source_contact_id', 'tax_amount', 'contribution_page_id'] as $fieldName) { + foreach (['contact_id', 'financial_type_id', 'currency', 'source', 'amount_level', 'address_id', 'on_behalf', 'source_contact_id', 'tax_amount', 'contribution_page_id'] as $fieldName) { if (isset($templateContribution[$fieldName])) { $contributionParams[$fieldName] = $templateContribution[$fieldName]; } -- 2.25.1