From: Web Access Date: Thu, 25 Feb 2016 12:49:06 +0000 (+0530) Subject: CRM-18050: Cannot create price set with auto-renewing memberships X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=137d1facd04203b4050dc2de87e271b09e19afcc;p=civicrm-core.git CRM-18050: Cannot create price set with auto-renewing memberships --- diff --git a/CRM/Price/BAO/PriceSet.php b/CRM/Price/BAO/PriceSet.php index b02055c3e7..726e222162 100644 --- a/CRM/Price/BAO/PriceSet.php +++ b/CRM/Price/BAO/PriceSet.php @@ -1444,6 +1444,12 @@ GROUP BY mt.member_of_contact_id"; $dao = CRM_Core_DAO::executeQuery($query, $params); + //CRM-18050: Check count of price set fields which has been set with auto-renew option. + //If price set field is already present with auto-renew option then, it will restrict for adding another price set field with auto-renew option. + if ($dao->N == 0) { + return 0; + } + $autoRenewOption = 2; $priceFields = array(); while ($dao->fetch()) {