From 137d1facd04203b4050dc2de87e271b09e19afcc Mon Sep 17 00:00:00 2001 From: Web Access Date: Thu, 25 Feb 2016 18:19:06 +0530 Subject: [PATCH] CRM-18050: Cannot create price set with auto-renewing memberships --- CRM/Price/BAO/PriceSet.php | 6 ++++++ 1 file changed, 6 insertions(+) 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()) { -- 2.25.1