CRM-17848: Round tax amount when calculated for contribution pages.
authorFrancis Whittle <francis@agileware.com.au>
Wed, 20 Jan 2016 05:30:16 +0000 (16:30 +1100)
committerAgielware Support <support@agileware.com.au>
Tue, 26 Jan 2016 22:03:47 +0000 (09:03 +1100)
CRM/Contribute/BAO/Contribution/Utils.php

index 5b7595fcc28e30be7744dda28a1670610bd0ef52..a450bc81e5c30c2761c457bbac9d1d69c1c39ca9 100644 (file)
@@ -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;
   }