Hi,
Well, rounding normally works like that:
When you have 0.001, 0.002, 0.003 or 0.004, rounding it to 2 decimals means it would output 0.00.
When you have 0.006, 0.007, 0.008 or 0.009, rounding it to 2 decimals means it would output 0.01.
So it's normal the system displays -1.04 for -1.0363 as that's how rounding normally works. You can read more about rounding numbers here:
www.mathsisfun.com/rounding-numbers.html
Now, it is possible to change the way rounding works in PHP:
www.php.net/manual/en/function.round.php
The round function (which we use in HikaShop) has a third argument you can use to change the mode for 0.005.
If you want to change it, you can change the line:
return round($price, $round);
For example, you could change it to:
return round($price, $round, PHP_ROUND_HALF_DOWN);
in the file administrator/components/com_hikashop/classes/currency.php
But even so, it doesn't handle truncate. So for example, you can't have 1.039, or 1.036 to output 1.03 with that function. So, in your example, it wouldn't change what is displayed. If you want to achieve a truncate instead of a rounding, you would have to add a truncate function like:
function truncate($number, $precision = 2)
{
$fig = (int) str_pad('1', $precision, '0');
return (floor($number * $fig) / $fig);
}
and use that function instead of the round function of PHP there.
However, I don't recommend it. This will affect all calculations, including tax calculations. Also, I think it might not be legally allowed to do that in some countries. So before changing the way the rounding is done, I would recommend you to check with your accountant what they suggest.