From 01615c462e4c117d62f11dda4237aecc7d115a47 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Wed, 16 Sep 2015 15:58:31 -0700 Subject: [PATCH] CRM-16029 - fix for create new financial type in when account relationship types are localized. ---------------------------------------- * CRM-16029: Creating a financial type in a localised civicrm install breaks https://issues.civicrm.org/jira/browse/CRM-16029 --- CRM/Financial/BAO/FinancialTypeAccount.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Financial/BAO/FinancialTypeAccount.php b/CRM/Financial/BAO/FinancialTypeAccount.php index f13166a1e6..3e4da2f00a 100644 --- a/CRM/Financial/BAO/FinancialTypeAccount.php +++ b/CRM/Financial/BAO/FinancialTypeAccount.php @@ -225,8 +225,9 @@ WHERE cog.name = 'payment_instrument' "; */ public static function createDefaultFinancialAccounts($financialType) { $titles = array(); - $financialAccountTypeID = CRM_Core_PseudoConstant::accountOptionValues('financial_account_type'); - $accountRelationship = CRM_Core_PseudoConstant::accountOptionValues('account_relationship'); + $financialAccountTypeID = CRM_Core_OptionGroup::values('financial_account_type', FALSE, FALSE, FALSE, NULL, 'name'); + $accountRelationship = CRM_Core_OptionGroup::values('account_relationship', FALSE, FALSE, FALSE, NULL, 'name'); + $relationships = array( array_search('Accounts Receivable Account is', $accountRelationship) => array_search('Asset', $financialAccountTypeID), array_search('Expense Account is', $accountRelationship) => array_search('Expenses', $financialAccountTypeID), -- 2.25.1