From a875500e15deae23d8c28f884ec689f43241f046 Mon Sep 17 00:00:00 2001 From: Edsel Date: Thu, 23 Apr 2015 16:05:18 +0530 Subject: [PATCH] CIVI-28 Added perms for price field option display --- CRM/Price/BAO/PriceFieldValue.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Price/BAO/PriceFieldValue.php b/CRM/Price/BAO/PriceFieldValue.php index 441c33a617..67387a40ad 100644 --- a/CRM/Price/BAO/PriceFieldValue.php +++ b/CRM/Price/BAO/PriceFieldValue.php @@ -155,6 +155,7 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { * */ public static function getValues($fieldId, &$values, $orderBy = 'weight', $isActive = FALSE) { + CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($financialTypes); $fieldValueDAO = new CRM_Price_DAO_PriceFieldValue(); $fieldValueDAO->price_field_id = $fieldId; $fieldValueDAO->orderBy($orderBy, 'label'); @@ -164,6 +165,9 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { $fieldValueDAO->find(); while ($fieldValueDAO->fetch()) { + if (!in_array($fieldValueDAO->financial_type_id, array_keys($financialTypes))) { + continue; + } CRM_Core_DAO::storeValues($fieldValueDAO, $values[$fieldValueDAO->id]); } -- 2.25.1