From 0c5345fc65931212d6b5c2c4a70e96989b7efe4d Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 11 Feb 2020 12:19:00 +1300 Subject: [PATCH] Add deprecation notices on PartialAmount params We've removed all the places that pass these in so these 2 places handling them are the only remaining references. All calling code now uses Payment.create to add the payments - yay. Removing these fully will clean up the code notably --- CRM/Contribute/BAO/Contribution.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 00b4047fa9..aeb2722aff 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -180,6 +180,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { $setPrevContribution = TRUE; // CRM-13964 partial payment if (!empty($params['partial_payment_total']) && !empty($params['partial_amount_to_pay'])) { + CRM_Core_Error::deprecatedFunctionWarning('partial_amount params are deprecated from Contribution.create - use Payment.create'); $partialAmtTotal = $params['partial_payment_total']; $partialAmtPay = $params['partial_amount_to_pay']; $params['total_amount'] = $partialAmtTotal; @@ -3489,6 +3490,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac if ($contributionStatus == 'Partially paid' && !empty($params['partial_payment_total']) && !empty($params['partial_amount_to_pay']) ) { + CRM_Core_Error::deprecatedFunctionWarning('partial_amount params are deprecated from Contribution.create - use Payment.create'); $partialAmtPay = CRM_Utils_Rule::cleanMoney($params['partial_amount_to_pay']); $partialAmtTotal = CRM_Utils_Rule::cleanMoney($params['partial_payment_total']); -- 2.25.1