Make sure financialType is availabel (& preferred). This commit does not attempt to
change any existing templates
);
if ($contributionTypeId = CRM_Utils_Array::value('financial_type_id', $values)) {
- $tplParams['contributionTypeId'] = $contributionTypeId;
- $tplParams['contributionTypeName'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType',
+ $tplParams['financialTypeId'] = $contributionTypeId;
+ $tplParams['financialTypeName'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType',
$contributionTypeId);
+ // Legacy support
+ $tplParams['contributionTypeName'] = $tplParams['financialTypeName'];
+ $tplParams['contributionTypeId'] = $contributionTypeId;
}
if ($contributionPageId = CRM_Utils_Array::value('id', $values)) {
}
//insert financial type name in receipt.
+ $this->assign('financialTypeName', CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType',
+ $contributionParams['financial_type_id']));
+ // legacy support
$this->assign('contributionTypeName', CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $contributionParams['financial_type_id']));
$contributionParams['skipLineItem'] = 1;
if ($this->_id) {
</tr>
{/if}
- {if $contributionTypeName}
+ {if $financialTypeName}
<tr>
<td {$labelStyle}>
{ts}Financial Type{/ts}
</td>
<td {$valueStyle}>
- {$contributionTypeName}
+ {$financialTypeName}
</td>
</tr>
{/if}
{if $receive_date}
{ts}Transaction Date{/ts}: {$receive_date|crmDate}
{/if}
-{if $contributionTypeName}
-{ts}Financial Type{/ts}: {$contributionTypeName}
+{if $financialTypeName}
+{ts}Financial Type{/ts}: {$financialTypeName}
{/if}
{if $trxn_id}
{ts}Transaction #{/ts}: {$trxn_id}
</tr>
{/if}
- {if $contributionTypeName}
+ {if $financialTypeName}
<tr>
<td {$labelStyle}>
{ts}Financial Type{/ts}
</td>
<td {$valueStyle}>
- {$contributionTypeName}
+ {$financialTypeName}
</td>
</tr>
{/if}
{if $receive_date}
{ts}Transaction Date{/ts}: {$receive_date|crmDate}
{/if}
-{if $contributionTypeName}
-{ts}Financial Type{/ts}: {$contributionTypeName}
+{if $financialTypeName}
+{ts}Financial Type{/ts}: {$financialTypeName}
{/if}
{if $trxn_id}
{ts}Transaction #{/ts}: {$trxn_id}