From 89ac6b6d2f55df2af44395d5477b2b104b2abbb1 Mon Sep 17 00:00:00 2001 From: Edsel Date: Thu, 23 Apr 2015 17:15:19 +0530 Subject: [PATCH] CIVI-28 Added perms for price field display --- CRM/Price/Page/Field.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Price/Page/Field.php b/CRM/Price/Page/Field.php index a1bdab423f..6db0b76ddc 100644 --- a/CRM/Price/Page/Field.php +++ b/CRM/Price/Page/Field.php @@ -145,6 +145,10 @@ class CRM_Price_Page_Field extends CRM_Core_Page { CRM_Price_BAO_PriceFieldValue::retrieve($params, $optionValues); $financialTypeId = $optionValues['financial_type_id']; + if (!array_key_exists($financialTypeId, $financialTypes)) { + unset($priceField[$priceFieldBAO->id]); + continue; + } $priceField[$priceFieldBAO->id]['price'] = CRM_Utils_Array::value('amount', $optionValues); if ($invoicing && isset($taxRate[$financialTypeId])) { $priceField[$priceFieldBAO->id]['tax_rate'] = $taxRate[$financialTypeId]; -- 2.25.1