Works for me !!! Big thanks.
In effect the rounding is applied to all number calculations. I just needed to final VAT field to behave. I wonder if there is a more elegant way of resolving rounding.
Works for me !!! Big thanks.
In effect the rounding is applied to all number calculations. I just needed to final VAT field to behave. I wonder if there is a more elegant way of resolving rounding.
// Wrapper function for round()
function zen_round($number, $precision) {
/// fix rounding error on GVs etc.
$number = round($number / 5, $precision) * 5;
return $number;
}
I have done the above to /includes/functions/functions_general.php
and it shows correctly in my website.
However, the invoice at admin>order is showing without rounding off.
I then add the above to the file myadmin/includes/functions/functions_general.php, the Price (inc) is showing with round off but Price (ex) is not.
FYI I don't set tax for my products.
Please advise.
another problem i found is, after rounding off to nearest 5 cents, the total value might be incorrect.
eg.
subtotal 23.40 (actual 23.39)
shipping 8.65 (actual 8.63)
total 32.00 (actual 32.02)
any solution?
Bookmarks