From: eileenmcnaugton Date: Sun, 30 Oct 2016 23:03:06 +0000 (+1300) Subject: CRM-19583 show financial type of line items whenbackoffice users view them X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=64525daee65589e0a605456d60f29b462e1f7b32;p=civicrm-core.git CRM-19583 show financial type of line items whenbackoffice users view them --- diff --git a/CRM/Contribute/Form/ContributionView.php b/CRM/Contribute/Form/ContributionView.php index 2f001debd8..78ac04e1dc 100644 --- a/CRM/Contribute/Form/ContributionView.php +++ b/CRM/Contribute/Form/ContributionView.php @@ -160,6 +160,7 @@ class CRM_Contribute_Form_ContributionView extends CRM_Core_Form { } $this->assign('lineItem', empty($lineItems) ? FALSE : $lineItems); $values['totalAmount'] = $values['total_amount']; + $this->assign('displayLineItemFinancialType', TRUE); //do check for campaigns if ($campaignId = CRM_Utils_Array::value('campaign_id', $values)) { diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index 586fbd68d6..0511af4b10 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -295,6 +295,7 @@ AND li.entity_id = {$entityId} 'entity_table' => $dao->entity_table, 'contribution_id' => $dao->contribution_id, 'financial_type_id' => $dao->financial_type_id, + 'financial_type' => CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_Contribution', 'financial_type_id', $dao->financial_type_id), 'membership_type_id' => $dao->membership_type_id, 'membership_num_terms' => $dao->membership_num_terms, 'tax_amount' => $dao->tax_amount, diff --git a/templates/CRM/Price/Page/LineItem.tpl b/templates/CRM/Price/Page/LineItem.tpl index c61c50e261..2d0807a0df 100644 --- a/templates/CRM/Price/Page/LineItem.tpl +++ b/templates/CRM/Price/Page/LineItem.tpl @@ -36,6 +36,9 @@ + {if $displayLineItemFinancialType} + + {/if} {if $context EQ "Membership"} {else} @@ -60,6 +63,9 @@ {foreach from=$value item=line} + {if $displayLineItemFinancialType} + + {/if} {if $context NEQ "Membership"}
{ts}Item{/ts}{ts}Financial Type{/ts}{ts}Fee{/ts}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description}
{/if}
{$line.financial_type}{$line.qty} {$line.unit_price|crmMoney}