dev/financial#163 Rename / remove internal references to contributionTypeID
authoreileen <emcnaughton@wikimedia.org>
Thu, 10 Dec 2020 21:26:34 +0000 (10:26 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 10 Dec 2020 21:26:34 +0000 (10:26 +1300)
https://lab.civicrm.org/dev/financial/-/issues/163

CRM/Event/Form/Participant.php
tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php
tests/phpunit/api/v3/MembershipPaymentTest.php
tests/phpunit/api/v3/MembershipStatusTest.php

index a42a8d1b1d8d85efb7da0c42f4f0f471615c12b0..86b6264647e0bdca5abc8789051d9f7120b499c4 100644 (file)
@@ -480,12 +480,12 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
       $statuses = array_flip(CRM_Event_PseudoConstant::participantStatus());
       $defaults[$this->_id]['status_id'] = $statuses['Registered'] ?? NULL;
       if (!empty($defaults[$this->_id]['event_id'])) {
-        $contributionTypeId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event',
+        $financialTypeID = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event',
           $defaults[$this->_id]['event_id'],
           'financial_type_id'
         );
-        if ($contributionTypeId) {
-          $defaults[$this->_id]['financial_type_id'] = $contributionTypeId;
+        if ($financialTypeID) {
+          $defaults[$this->_id]['financial_type_id'] = $financialTypeID;
         }
       }
 
index 0959ad2af15f4d7c299e86e537deb1bfd76d739d..4e1bab5c6bc04706e190282926de4c1e454833d6 100644 (file)
@@ -147,7 +147,6 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase {
       'email' => 'john.smith@example.com',
       'contactID' => $contactId,
       'contributionID' => $contribution['id'],
-      'contributionTypeID' => $this->_financialTypeId,
       'contributionRecurID' => $recur['id'],
     ]);
 
index 8aa94d018db9f1de6e28e8ca772e83181ec5a376..92b689ce39d2e329b575093d5003f3090c2f9a76 100644 (file)
@@ -19,7 +19,6 @@
 class api_v3_MembershipPaymentTest extends CiviUnitTestCase {
   protected $_apiversion = 3;
   protected $_contactID;
-  protected $_contributionTypeID;
   protected $_membershipTypeID;
   protected $_membershipStatusID;
   protected $_contribution = [];
index 6c0614a43e668a646bb37367fb1d04aba1d5bade..fbdf71a43e1e1d5a6fc33b62f6a9ec5041a3aa39 100644 (file)
@@ -16,7 +16,6 @@
 class api_v3_MembershipStatusTest extends CiviUnitTestCase {
 
   protected $_contactID;
-  protected $_contributionTypeID;
   protected $_membershipTypeID;
   protected $_membershipStatusID;