Added decimals to taxes (#327), added totals rounding matching decimals (#327 #307, #429)

This commit is contained in:
FrancescoUK committed 2016-04-02 13:59:01 +01:00
1 parent 3d7756f177
commit afcb1641b7
36 files changed
+163 -73

No files matched your search

+3 -3
View File
@@ -565,14 +565,14 @@ class Sale_lib
foreach($tax_info as $tax)
{
$name = $tax['percent'].'% ' . $tax['name'];
$tax_percentage = $tax['percent'];
$tax_amount = $this->get_item_tax($item['quantity'], $item['price'], $item['discount'], $tax_percentage);
$name = to_tax_decimals($tax['percent']) . '% ' . $tax['name'];
$tax_amount = $this->get_item_tax($item['quantity'], $item['price'], $item['discount'], $tax['percent']);
if (!isset($taxes[$name]))
{
$taxes[$name] = 0;
}
$taxes[$name] = bcadd($taxes[$name], $tax_amount, PRECISION);
}
}