Simplify handing when name not present (new contribution)
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 20 Dec 2021 01:17:24 +0000 (14:17 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 29 Dec 2021 22:02:53 +0000 (11:02 +1300)
CRM/Contribute/BAO/Contribution/Utils.php
CRM/Event/Form/Participant.php
CRM/Member/Form/MembershipRenewal.php

index d00a4a23c12404bae0cb832378203f4d7453eea8..bec62eef8857a990b38e9e2fbdea7b72885ce5a5 100644 (file)
@@ -228,14 +228,7 @@ LIMIT 1
     ];
     // on create fetch statuses on basis of component
     if (!$name) {
-      $statusNamesToUnset = array_merge($statusNamesToUnset, [
-        'Refunded',
-        'Chargeback',
-        'Pending refund',
-        'In Progress',
-        'Overdue',
-        'Partially paid',
-      ]);
+      return self::getPendingCompleteFailedAndCancelledStatuses();
     }
     else {
       switch ($name) {
index 4d694d102ebe3be3046519210411ee89b55ef24f..9426a585a72445c6e7663b9e3e1d9fa7ee4b52c3 100644 (file)
@@ -1733,7 +1733,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
         }
 
         $form->add('select', 'contribution_status_id',
-          ts('Payment Status'), CRM_Contribute_BAO_Contribution_Utils::getPendingAndCompleteStatuses('participant')
+          ts('Payment Status'), CRM_Contribute_BAO_Contribution_Utils::getPendingAndCompleteStatuses()
         );
 
         $form->add('text', 'check_number', ts('Check Number'),
index 2bd26231ae386fae7c82785000f5da9bb128f09e..51f1dd01f5d7963a118fa52bd06f6a3e8930270c 100644 (file)
@@ -359,7 +359,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form {
       );
 
       $this->add('select', 'contribution_status_id', ts('Payment Status'),
-        CRM_Contribute_BAO_Contribution_Utils::getPendingAndCompleteStatuses('membership')
+        CRM_Contribute_BAO_Contribution_Utils::getPendingAndCompleteStatuses()
       );
 
       $this->add('text', 'check_number', ts('Check Number'),