Skip to content

Commit

Permalink
CRM-16228, rounding off to $taxAmount variable
Browse files Browse the repository at this point in the history
----------------------------------------
* CRM-16228: Tax Math is not correct due to premature rounding
  https://issues.civicrm.org/jira/browse/CRM-16228
  • Loading branch information
pradpnayak committed Jan 5, 2017
1 parent 7f55cb7 commit c6b38b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CRM/Price/BAO/PriceSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -1672,8 +1672,9 @@ public static function setLineItem($field, $lineItem, $optionValueId, &$totalTax
else {
$taxAmount = $field['options'][$optionValueId]['tax_amount'];
}
$taxAmount = round($taxAmount, 2);
$taxRate = $field['options'][$optionValueId]['tax_rate'];
$lineItem[$optionValueId]['tax_amount'] = round($taxAmount, 2);
$lineItem[$optionValueId]['tax_amount'] = $taxAmount;
$lineItem[$optionValueId]['tax_rate'] = $taxRate;
$totalTax += $taxAmount;
return $lineItem;
Expand Down

0 comments on commit c6b38b8

Please sign in to comment.