From: Dave Greenberg Date: Tue, 20 Aug 2013 00:08:24 +0000 (-0700) Subject: CRM-13241 add financial_type to contribution tokens X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8b712d49a91e48279c3448ce15638ac6b4d7d264;p=civicrm-core.git CRM-13241 add financial_type to contribution tokens ---------------------------------------- * CRM-13241: Thank You Letter for Contributions - Tokens details missing -getContributionTokenDetails http://issues.civicrm.org/jira/browse/CRM-13241 --- diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php index 2a796fbcfb..0e9981f882 100644 --- a/CRM/Utils/Token.php +++ b/CRM/Utils/Token.php @@ -1155,6 +1155,12 @@ class CRM_Utils_Token { $details[$dao->id]['campaign'] = $campaigns[$campaignId]; } + if (CRM_Utils_Array::value('financial_type_id', $details[$dao->id])) { + $financialtypeId = $details[$dao->id]['financial_type_id']; + $ftis = CRM_Contribute_PseudoConstant::financialType(); + $details[$dao->id]['financial_type'] = $ftis[$financialtypeId]; + } + // TODO: call a hook to get token contribution details } }