+ if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) {
+ $finTypeId = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipType', $values['membership_type_id'], 'financial_type_id');
+ $finType = CRM_Contribute_PseudoConstant::financialType($finTypeId);
+ if (!CRM_Core_Permission::check('view contributions of type ' . $finType)) {
+ CRM_Core_Error::fatal(ts('You do not have permissionn to access this page.'));
+ }
+ }
+ $this->assign('financialTypeId', $finType);