--CRM-15187, Added warning message when membership type is changed
authorPradeep Nayak <pradpnayak@gmail.com>
Mon, 27 Jul 2015 18:12:28 +0000 (23:42 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Mon, 27 Jul 2015 18:12:28 +0000 (23:42 +0530)
CRM/Member/Form/Membership.php

index a771e5b5b14876ddc0bea8d6da2c1493e2a5e8e5..d4d8b0e39fda8e59fd46d45a089b51eb0f57e795 100644 (file)
@@ -1791,7 +1791,18 @@ 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)) {
+      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')
+      );
+      CRM_Core_Session::setStatus(
+        ts('The cost of the old and new membership types are different. You may want to edit the contribution associated with this membership to adjust its amount.'),
+        ts('Warning')
+      );
+    }
     return $createdMemberships;
   }