CRM-15187 - Only show Change Membership Type warnings when action is UPDATE.
authorDave Greenberg <dave@civicrm.org>
Thu, 6 Aug 2015 00:24:41 +0000 (17:24 -0700)
committerDave Greenberg <dave@civicrm.org>
Thu, 6 Aug 2015 00:24:41 +0000 (17:24 -0700)
----------------------------------------
* CRM-15187: Accounting implications of Membership Type changes
  https://issues.civicrm.org/jira/browse/CRM-15187

CRM/Member/Form/Membership.php

index f58e7dd9dff2348d4e266b069f0dccbb2337cc2b..f9650ed85991b11fd3779989f643091d9182e497 100644 (file)
@@ -1793,7 +1793,7 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
     CRM_Core_Session::setStatus($statusMsg, ts('Complete'), 'success');
     //CRM-15187
     // dusplay message when membership type is changed
-    if ($this->_id && !in_array($this->_memType, $this->_memTypeSelected)) {
+    if (($this->_action & CRM_Core_Action::UPDATE) && $this->_id && !in_array($this->_memType, $this->_memTypeSelected)) {
       CRM_Core_Session::setStatus(
         ts('The financial types associated with the old and new membership types are different. You may want to edit the contribution associated with this membership to adjust its financial type.'),
         ts('Warning')