Removing unsupported status change options when the contribution is completed
authorDiego Goes Bauleo <diego@bauleo.com.br>
Sun, 28 Feb 2016 21:37:32 +0000 (18:37 -0300)
committerDiego Goes Bauleo <diego@bauleo.com.br>
Sun, 28 Feb 2016 21:37:32 +0000 (18:37 -0300)
CRM/Contribute/Form/Contribution.php

index 4e286e39979ec54966928ee1c67d292fd927d20c..18c54ab474c0d0cc9b3289784845386600281de4 100644 (file)
@@ -705,6 +705,11 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
       $name = CRM_Utils_Array::value($contributionStatus, $statusName);
       switch ($name) {
         case 'Completed':
+                 // [CRM-17498] Removing unsupported status change options.
+          unset($status[CRM_Utils_Array::key('Pending', $statusName)]);
+          unset($status[CRM_Utils_Array::key('Failed', $statusName)]);
+          unset($status[CRM_Utils_Array::key('Partially paid', $statusName)]);
+          unset($status[CRM_Utils_Array::key('Pending refund', $statusName)]);
         case 'Cancelled':
         case 'Chargeback':
         case 'Refunded':