Tax rates unit rounded in printable copy

Hello everybody.

I'm about to put online my new webshop using this amazing solution, yes, i talk about "litecart" :)

I just got a unsolved problem regarding taxes rates specified in the printable copy, they are displayed rounded at the unit.

Sorry guys to let you know that, but swiss VAT rate is 7.7%

As a tested, the calculated amounts are correct: done with 7.7%, but, as you can see in the attachment, the printable copy displays 8%.
As you can imagine, this is really annoying.

Any idea to fix that ?

Thanks for the support
With Kind regards
Marc

tim

LiteCart does not save percentages and so we have to reverse calculate it. And because of rounding exceeding decimals to cents this could sometimes display 24.998 for 25%. Therefore the reverse calculation is rounded.

You can change the code that does the rounding in includes/templates/*/pages/printable_order_copy.inc.php.

Thanks Tim for your help.

Just in case other users needs to fix that small issue, here is the implemented code modification:
<td class="text-right"><?php echo currency::format($item['tax'], false, $order['currency_code'], $order['currency_value']); ?> (<?php echo @round($item['tax']/$item['price']*100,1); ?> %)</td>

Þessum þræði hefur verið lokað vegna langrar óvirkni. Get ekki sent inn á það.