In the following code (posted earlier)...
PHP Code:
// Calculates Tax rounding the result
function zen_calculate_tax($price, $tax) {
global $currencies;
// $result = bcmul($price, $tax, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
// $result = bcdiv($result, 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
// return $result;
return zen_round($price * $tax / 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
}
... all of the lines preceded with "// have no effect as they are commented.
The line that says:
PHP Code:
return zen_round($price * $tax / 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
Change:
$tax / 100
to
$tax / 20
I really don't know if this will work, but my logic is that 100 divided by 20 is 5 - and as you are looking for a rounding factor of 5, then dividing by 20 may give you the desired result.
In your currency setting in Admin, leave the number of decimal places at 2.
Bookmarks