Fix for CRm-16228
authorWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 7 Apr 2015 14:02:16 +0000 (19:32 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 7 Apr 2015 14:02:16 +0000 (19:32 +0530)
CRM/Price/BAO/LineItem.php

index e7157584abbbe3611d5fc1e61ab247375eae0156..0f3662ce3fdee2d3fa81c25872aaf41ba630d347 100644 (file)
@@ -542,10 +542,10 @@ AND li.entity_id = {$entityId}
       return FALSE;
     }
     if ($lineItemId['html_type'] == 'Text') {
-      $tax = $lineItemId['tax_amount'] / ($lineItemId['unit_price'] * $lineItemId['qty']) * 100;
+      $tax = round($lineItemId['tax_amount'] / ($lineItemId['unit_price'] * $lineItemId['qty']) * 100, 2);
     }
     else {
-      $tax = ($lineItemId['tax_amount'] / $lineItemId['unit_price']) * 100;
+      $tax = round(($lineItemId['tax_amount'] / $lineItemId['unit_price']) * 100, 2);
     }
     return $tax;
   }