From a13f764f6613a3d71c681d3f2b21f00a189d2636 Mon Sep 17 00:00:00 2001 From: dpradeep Date: Mon, 28 Jul 2014 10:49:09 +0530 Subject: [PATCH] VAT-568 Tax labels are changed as per tax label settings. --- CRM/Price/BAO/PriceField.php | 8 ++++---- templates/CRM/Price/Form/PriceSet.tpl | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 108708415c..f8004695ca 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -363,11 +363,11 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { } else if ($displayOpt == 'Inclusive') { $opt['label'] = '' . CRM_Utils_Money::format($opt[$valueFieldName] + $taxAmount) . ' ' . $opt['label'] . ''; - $opt['label'] .= ' (includes '.round($opt['tax_rate'],2).'% ' . $taxTerm . ' - ' . CRM_Utils_Money::format($taxAmount) . ')'; + $opt['label'] .= ' (includes ' . $taxTerm . ' of ' . CRM_Utils_Money::format($opt['tax_amount']) . ')'; } else { $opt['label'] = '' . CRM_Utils_Money::format($opt[$valueFieldName]) . ' ' . $opt['label'] . ''; - $opt['label'] .= ' + '. CRM_Utils_Money::format($opt['tax_amount']) . ' - ' . round($opt['tax_rate'],2).'% ' . $taxTerm . ''; + $opt['label'] .= ' + '. CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . ''; } } else { @@ -746,11 +746,11 @@ WHERE id IN (" . implode(',', array_keys($priceFields)) . ')'; } else if ($displayOpt == 'Inclusive') { $label = CRM_Utils_Money::format($opt[$valueFieldName] + $opt['tax_amount']); - $label .= ' (includes '.round($opt['tax_rate'],2).'% ' . $taxTerm . ' - ' . CRM_Utils_Money::format($opt['tax_amount']) . ')'; + $label .= ' (includes ' . $taxTerm . ' of ' . CRM_Utils_Money::format($opt['tax_amount']) . ')'; } else { $label = CRM_Utils_Money::format($opt[$valueFieldName]); - $label .= ' + '. CRM_Utils_Money::format($opt['tax_amount']) . ' - ' . round($opt['tax_rate'],2).'% ' . $taxTerm . ''; + $label .= ' + '. CRM_Utils_Money::format($opt['tax_amount']) . ' ' . $taxTerm . ''; } return $label; diff --git a/templates/CRM/Price/Form/PriceSet.tpl b/templates/CRM/Price/Form/PriceSet.tpl index b051f04cde..7171e5983e 100644 --- a/templates/CRM/Price/Form/PriceSet.tpl +++ b/templates/CRM/Price/Form/PriceSet.tpl @@ -77,10 +77,10 @@ {$amount|crmMoney} {elseif $displayOpt == 'Inclusive'} {$amount|crmMoney} - (includes {$option.tax_rate|round:2}% {$taxTerm} - {$option.tax_amount|crmMoney}) + (includes {$taxTerm} of {$option.tax_amount|crmMoney}) {else} {$option.amount|crmMoney} - + {$option.tax_amount|crmMoney} - {$option.tax_rate|round:2}% {$taxTerm} + + {$option.tax_amount|crmMoney} {$taxTerm} {/if} {else} {$option.amount|crmMoney} -- 2.25.1