From: Francis Whittle Date: Wed, 20 Jan 2016 05:30:16 +0000 (+1100) Subject: CRM-17848: Round tax amount when calculated for contribution pages. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c21d6df8bffcc1c92c0c74412327b670b671ba99;p=civicrm-core.git CRM-17848: Round tax amount when calculated for contribution pages. --- diff --git a/CRM/Contribute/BAO/Contribution/Utils.php b/CRM/Contribute/BAO/Contribution/Utils.php index 5b7595fcc2..a450bc81e5 100644 --- a/CRM/Contribute/BAO/Contribution/Utils.php +++ b/CRM/Contribute/BAO/Contribution/Utils.php @@ -467,7 +467,7 @@ LIMIT 1 */ public static function calculateTaxAmount($amount, $taxRate) { $taxAmount = array(); - $taxAmount['tax_amount'] = ($taxRate / 100) * CRM_Utils_Rule::cleanMoney($amount); + $taxAmount['tax_amount'] = round(($taxRate / 100) * CRM_Utils_Rule::cleanMoney($amount), 2); return $taxAmount; }